From b95f4c7bdc099c5ecbdb1f0e830c2f5ea5d862c1 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Thu, 7 Dec 2023 11:05:55 -0500 Subject: [PATCH 01/20] feat(x/data): enable off-chain coordination of media extensions, digest algorithms, canonicalization, and merkle trees --- proto/regen/data/v1/types.proto | 69 ++++++++++++++++++++++++++++----- 1 file changed, 60 insertions(+), 9 deletions(-) diff --git a/proto/regen/data/v1/types.proto b/proto/regen/data/v1/types.proto index 9287d7e69c..64d60c2000 100644 --- a/proto/regen/data/v1/types.proto +++ b/proto/regen/data/v1/types.proto @@ -6,7 +6,7 @@ option go_package = "github.com/regen-network/regen-ledger/x/data"; // ContentHash specifies a hash-based content identifier for a piece of data. message ContentHash { - + // Deprecated: use RawV2 instead. // Raw specifies "raw" data which does not specify a deterministic, canonical // encoding. Users of these hashes MUST maintain a copy of the hashed data // which is preserved bit by bit. All other content encodings specify a @@ -14,12 +14,27 @@ message ContentHash { // variety of alternative formats for transport and encoding while maintaining // the guarantee that the canonical hash will not change. The media type for // "raw" data is defined by the MediaType enum. - Raw raw = 1; + Raw raw = 1 [deprecated = true]; + // Deprecated: use GraphV2 instead. // Graph specifies graph data that conforms to the RDF data model. // The canonicalization algorithm used for an RDF graph is specified by // GraphCanonicalizationAlgorithm. - Graph graph = 2; + Graph graph = 2 [deprecated = true]; + + // raw_v2 specifies "raw" data which does not specify a deterministic, canonical + // encoding. Users of these hashes MUST maintain a copy of the hashed data + // which is preserved bit by bit. All other content encodings specify a + // deterministic, canonical encoding allowing implementations to choose from a + // variety of alternative formats for transport and encoding while maintaining + // the guarantee that the canonical hash will not change. The media type for + // "raw" data is defined by the MediaType enum. + RawV2 raw_v2 = 3; + + // graph_v2 specifies graph data that conforms to the RDF data model. + // The canonicalization algorithm used for an RDF graph is specified by + // GraphCanonicalizationAlgorithm. + GraphV2 graph_v2 = 4; // Raw is the content hash type used for raw data. message Raw { @@ -50,11 +65,50 @@ message ContentHash { // merkle_tree is the merkle tree type used for the graph hash, if any. GraphMerkleTree merkle_tree = 4; } + + // RawV2 is the content hash type used for raw data. + message RawV2 { + // hash represents the hash of the data based on the specified + // digest_algorithm. + bytes hash = 1; + + // digest_algorithm represents the hash digest algorithm. + uint32 digest_algorithm = 2; + + // file_extension represents the file extension for raw data. It can be + // up to six characters long, must be all lower-case and should represent + // the canonical extension for the media type. + // + // A list of canonical extensions which should be used is provided here + // and SHOULD be used by implementations: txt, json, csv, xml, pdf, tiff, + // jpg, png, svg, webp, avif, gif, apng, mpeg, mp4, webm, ogg, heic, raw. + // + // The above list should be updated as new media types come into common usage + // especially when there are two or more possible extensions (i.e. jpg vs jpeg or tif vs tiff). + string file_extension = 3; + } + + // GraphV2 is the content hash type used for RDF graph data. + message GraphV2 { + // hash represents the hash of the data based on the specified + // digest_algorithm. + bytes hash = 1; + + // digest_algorithm represents the hash digest algorithm and should be a value from the DigestAlgorithm enum. + uint32 digest_algorithm = 2; + + // graph_canonicalization_algorithm represents the RDF graph + // canonicalization algorithm and should be a value from the GraphCanonicalizationAlgorithm enum. + uint32 canonicalization_algorithm = 3; + + // merkle_tree is the merkle tree type used for the graph hash, if any and should be a value from the GraphMerkleTree enum + // or left unspecified. + uint32 merkle_tree = 4; + } } // DigestAlgorithm is the hash digest algorithm enum DigestAlgorithm { - // unspecified and invalid DIGEST_ALGORITHM_UNSPECIFIED = 0; @@ -62,9 +116,9 @@ enum DigestAlgorithm { DIGEST_ALGORITHM_BLAKE2B_256 = 1; } +// Deprecated: use RawV2 instead. // RawMediaType defines MIME media types to be used with a ContentHash.Raw hash. enum RawMediaType { - // RAW_MEDIA_TYPE_UNSPECIFIED can be used for raw binary data RAW_MEDIA_TYPE_UNSPECIFIED = 0; @@ -128,7 +182,6 @@ enum RawMediaType { // GraphCanonicalizationAlgorithm is the graph canonicalization algorithm enum GraphCanonicalizationAlgorithm { - // unspecified and invalid GRAPH_CANONICALIZATION_ALGORITHM_UNSPECIFIED = 0; @@ -138,14 +191,12 @@ enum GraphCanonicalizationAlgorithm { // GraphMerkleTree is the graph merkle tree type used for hashing, if any enum GraphMerkleTree { - // unspecified and valid GRAPH_MERKLE_TREE_NONE_UNSPECIFIED = 0; } // ContentHashes contains list of content ContentHash. message ContentHashes { - // data is a list of content hashes which the resolver claims to serve. repeated ContentHash content_hashes = 1; -} +} \ No newline at end of file From d2710b1b0decbb3623289af903d8b465b6b21301 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Thu, 7 Dec 2023 12:29:27 -0500 Subject: [PATCH 02/20] update proto files and validation --- api/regen/data/v1/types.pulsar.go | 1916 +++++++++++++++++++++++++---- proto/regen/data/v1/types.proto | 12 +- scripts/protocgen.sh | 2 - scripts/protocgen2.sh | 2 +- x/data/types.go | 64 +- x/data/types.pb.go | 828 ++++++++++++- 6 files changed, 2531 insertions(+), 293 deletions(-) diff --git a/api/regen/data/v1/types.pulsar.go b/api/regen/data/v1/types.pulsar.go index a53e594d24..eebcdd0b06 100644 --- a/api/regen/data/v1/types.pulsar.go +++ b/api/regen/data/v1/types.pulsar.go @@ -13,9 +13,11 @@ import ( ) var ( - md_ContentHash protoreflect.MessageDescriptor - fd_ContentHash_raw protoreflect.FieldDescriptor - fd_ContentHash_graph protoreflect.FieldDescriptor + md_ContentHash protoreflect.MessageDescriptor + fd_ContentHash_raw protoreflect.FieldDescriptor + fd_ContentHash_graph protoreflect.FieldDescriptor + fd_ContentHash_raw_v2 protoreflect.FieldDescriptor + fd_ContentHash_graph_v2 protoreflect.FieldDescriptor ) func init() { @@ -23,6 +25,8 @@ func init() { md_ContentHash = File_regen_data_v1_types_proto.Messages().ByName("ContentHash") fd_ContentHash_raw = md_ContentHash.Fields().ByName("raw") fd_ContentHash_graph = md_ContentHash.Fields().ByName("graph") + fd_ContentHash_raw_v2 = md_ContentHash.Fields().ByName("raw_v2") + fd_ContentHash_graph_v2 = md_ContentHash.Fields().ByName("graph_v2") } var _ protoreflect.Message = (*fastReflection_ContentHash)(nil) @@ -102,6 +106,18 @@ func (x *fastReflection_ContentHash) Range(f func(protoreflect.FieldDescriptor, return } } + if x.RawV2 != nil { + value := protoreflect.ValueOfMessage(x.RawV2.ProtoReflect()) + if !f(fd_ContentHash_raw_v2, value) { + return + } + } + if x.GraphV2 != nil { + value := protoreflect.ValueOfMessage(x.GraphV2.ProtoReflect()) + if !f(fd_ContentHash_graph_v2, value) { + return + } + } } // Has reports whether a field is populated. @@ -121,6 +137,10 @@ func (x *fastReflection_ContentHash) Has(fd protoreflect.FieldDescriptor) bool { return x.Raw != nil case "regen.data.v1.ContentHash.graph": return x.Graph != nil + case "regen.data.v1.ContentHash.raw_v2": + return x.RawV2 != nil + case "regen.data.v1.ContentHash.graph_v2": + return x.GraphV2 != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash")) @@ -141,6 +161,10 @@ func (x *fastReflection_ContentHash) Clear(fd protoreflect.FieldDescriptor) { x.Raw = nil case "regen.data.v1.ContentHash.graph": x.Graph = nil + case "regen.data.v1.ContentHash.raw_v2": + x.RawV2 = nil + case "regen.data.v1.ContentHash.graph_v2": + x.GraphV2 = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash")) @@ -163,6 +187,12 @@ func (x *fastReflection_ContentHash) Get(descriptor protoreflect.FieldDescriptor case "regen.data.v1.ContentHash.graph": value := x.Graph return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "regen.data.v1.ContentHash.raw_v2": + value := x.RawV2 + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "regen.data.v1.ContentHash.graph_v2": + value := x.GraphV2 + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash")) @@ -187,6 +217,10 @@ func (x *fastReflection_ContentHash) Set(fd protoreflect.FieldDescriptor, value x.Raw = value.Message().Interface().(*ContentHash_Raw) case "regen.data.v1.ContentHash.graph": x.Graph = value.Message().Interface().(*ContentHash_Graph) + case "regen.data.v1.ContentHash.raw_v2": + x.RawV2 = value.Message().Interface().(*ContentHash_RawV2) + case "regen.data.v1.ContentHash.graph_v2": + x.GraphV2 = value.Message().Interface().(*ContentHash_GraphV2) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash")) @@ -217,6 +251,16 @@ func (x *fastReflection_ContentHash) Mutable(fd protoreflect.FieldDescriptor) pr x.Graph = new(ContentHash_Graph) } return protoreflect.ValueOfMessage(x.Graph.ProtoReflect()) + case "regen.data.v1.ContentHash.raw_v2": + if x.RawV2 == nil { + x.RawV2 = new(ContentHash_RawV2) + } + return protoreflect.ValueOfMessage(x.RawV2.ProtoReflect()) + case "regen.data.v1.ContentHash.graph_v2": + if x.GraphV2 == nil { + x.GraphV2 = new(ContentHash_GraphV2) + } + return protoreflect.ValueOfMessage(x.GraphV2.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash")) @@ -236,6 +280,12 @@ func (x *fastReflection_ContentHash) NewField(fd protoreflect.FieldDescriptor) p case "regen.data.v1.ContentHash.graph": m := new(ContentHash_Graph) return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "regen.data.v1.ContentHash.raw_v2": + m := new(ContentHash_RawV2) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "regen.data.v1.ContentHash.graph_v2": + m := new(ContentHash_GraphV2) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash")) @@ -313,6 +363,14 @@ func (x *fastReflection_ContentHash) ProtoMethods() *protoiface.Methods { l = options.Size(x.Graph) n += 1 + l + runtime.Sov(uint64(l)) } + if x.RawV2 != nil { + l = options.Size(x.RawV2) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.GraphV2 != nil { + l = options.Size(x.GraphV2) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -342,6 +400,34 @@ func (x *fastReflection_ContentHash) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.GraphV2 != nil { + encoded, err := options.Marshal(x.GraphV2) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + if x.RawV2 != nil { + encoded, err := options.Marshal(x.RawV2) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } if x.Graph != nil { encoded, err := options.Marshal(x.Graph) if err != nil { @@ -491,6 +577,78 @@ func (x *fastReflection_ContentHash) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RawV2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.RawV2 == nil { + x.RawV2 = &ContentHash_RawV2{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RawV2); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GraphV2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.GraphV2 == nil { + x.GraphV2 = &ContentHash_GraphV2{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.GraphV2); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -852,7 +1010,1092 @@ func (x *fastReflection_ContentHash_Raw) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ContentHash_Raw) + x := input.Message.Interface().(*ContentHash_Raw) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.MediaType != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.MediaType)) + i-- + dAtA[i] = 0x18 + } + if x.DigestAlgorithm != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.DigestAlgorithm)) + i-- + dAtA[i] = 0x10 + } + if len(x.Hash) > 0 { + i -= len(x.Hash) + copy(dAtA[i:], x.Hash) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Hash))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ContentHash_Raw) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContentHash_Raw: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContentHash_Raw: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Hash = append(x.Hash[:0], dAtA[iNdEx:postIndex]...) + if x.Hash == nil { + x.Hash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DigestAlgorithm", wireType) + } + x.DigestAlgorithm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.DigestAlgorithm |= DigestAlgorithm(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MediaType", wireType) + } + x.MediaType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.MediaType |= RawMediaType(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_ContentHash_Graph protoreflect.MessageDescriptor + fd_ContentHash_Graph_hash protoreflect.FieldDescriptor + fd_ContentHash_Graph_digest_algorithm protoreflect.FieldDescriptor + fd_ContentHash_Graph_canonicalization_algorithm protoreflect.FieldDescriptor + fd_ContentHash_Graph_merkle_tree protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v1_types_proto_init() + md_ContentHash_Graph = File_regen_data_v1_types_proto.Messages().ByName("ContentHash").Messages().ByName("Graph") + fd_ContentHash_Graph_hash = md_ContentHash_Graph.Fields().ByName("hash") + fd_ContentHash_Graph_digest_algorithm = md_ContentHash_Graph.Fields().ByName("digest_algorithm") + fd_ContentHash_Graph_canonicalization_algorithm = md_ContentHash_Graph.Fields().ByName("canonicalization_algorithm") + fd_ContentHash_Graph_merkle_tree = md_ContentHash_Graph.Fields().ByName("merkle_tree") +} + +var _ protoreflect.Message = (*fastReflection_ContentHash_Graph)(nil) + +type fastReflection_ContentHash_Graph ContentHash_Graph + +func (x *ContentHash_Graph) ProtoReflect() protoreflect.Message { + return (*fastReflection_ContentHash_Graph)(x) +} + +func (x *ContentHash_Graph) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v1_types_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ContentHash_Graph_messageType fastReflection_ContentHash_Graph_messageType +var _ protoreflect.MessageType = fastReflection_ContentHash_Graph_messageType{} + +type fastReflection_ContentHash_Graph_messageType struct{} + +func (x fastReflection_ContentHash_Graph_messageType) Zero() protoreflect.Message { + return (*fastReflection_ContentHash_Graph)(nil) +} +func (x fastReflection_ContentHash_Graph_messageType) New() protoreflect.Message { + return new(fastReflection_ContentHash_Graph) +} +func (x fastReflection_ContentHash_Graph_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ContentHash_Graph +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ContentHash_Graph) Descriptor() protoreflect.MessageDescriptor { + return md_ContentHash_Graph +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ContentHash_Graph) Type() protoreflect.MessageType { + return _fastReflection_ContentHash_Graph_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ContentHash_Graph) New() protoreflect.Message { + return new(fastReflection_ContentHash_Graph) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ContentHash_Graph) Interface() protoreflect.ProtoMessage { + return (*ContentHash_Graph)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ContentHash_Graph) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Hash) != 0 { + value := protoreflect.ValueOfBytes(x.Hash) + if !f(fd_ContentHash_Graph_hash, value) { + return + } + } + if x.DigestAlgorithm != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.DigestAlgorithm)) + if !f(fd_ContentHash_Graph_digest_algorithm, value) { + return + } + } + if x.CanonicalizationAlgorithm != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.CanonicalizationAlgorithm)) + if !f(fd_ContentHash_Graph_canonicalization_algorithm, value) { + return + } + } + if x.MerkleTree != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.MerkleTree)) + if !f(fd_ContentHash_Graph_merkle_tree, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ContentHash_Graph) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v1.ContentHash.Graph.hash": + return len(x.Hash) != 0 + case "regen.data.v1.ContentHash.Graph.digest_algorithm": + return x.DigestAlgorithm != 0 + case "regen.data.v1.ContentHash.Graph.canonicalization_algorithm": + return x.CanonicalizationAlgorithm != 0 + case "regen.data.v1.ContentHash.Graph.merkle_tree": + return x.MerkleTree != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.Graph")) + } + panic(fmt.Errorf("message regen.data.v1.ContentHash.Graph does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContentHash_Graph) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v1.ContentHash.Graph.hash": + x.Hash = nil + case "regen.data.v1.ContentHash.Graph.digest_algorithm": + x.DigestAlgorithm = 0 + case "regen.data.v1.ContentHash.Graph.canonicalization_algorithm": + x.CanonicalizationAlgorithm = 0 + case "regen.data.v1.ContentHash.Graph.merkle_tree": + x.MerkleTree = 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.Graph")) + } + panic(fmt.Errorf("message regen.data.v1.ContentHash.Graph does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ContentHash_Graph) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v1.ContentHash.Graph.hash": + value := x.Hash + return protoreflect.ValueOfBytes(value) + case "regen.data.v1.ContentHash.Graph.digest_algorithm": + value := x.DigestAlgorithm + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "regen.data.v1.ContentHash.Graph.canonicalization_algorithm": + value := x.CanonicalizationAlgorithm + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "regen.data.v1.ContentHash.Graph.merkle_tree": + value := x.MerkleTree + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.Graph")) + } + panic(fmt.Errorf("message regen.data.v1.ContentHash.Graph does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContentHash_Graph) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v1.ContentHash.Graph.hash": + x.Hash = value.Bytes() + case "regen.data.v1.ContentHash.Graph.digest_algorithm": + x.DigestAlgorithm = (DigestAlgorithm)(value.Enum()) + case "regen.data.v1.ContentHash.Graph.canonicalization_algorithm": + x.CanonicalizationAlgorithm = (GraphCanonicalizationAlgorithm)(value.Enum()) + case "regen.data.v1.ContentHash.Graph.merkle_tree": + x.MerkleTree = (GraphMerkleTree)(value.Enum()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.Graph")) + } + panic(fmt.Errorf("message regen.data.v1.ContentHash.Graph does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContentHash_Graph) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v1.ContentHash.Graph.hash": + panic(fmt.Errorf("field hash of message regen.data.v1.ContentHash.Graph is not mutable")) + case "regen.data.v1.ContentHash.Graph.digest_algorithm": + panic(fmt.Errorf("field digest_algorithm of message regen.data.v1.ContentHash.Graph is not mutable")) + case "regen.data.v1.ContentHash.Graph.canonicalization_algorithm": + panic(fmt.Errorf("field canonicalization_algorithm of message regen.data.v1.ContentHash.Graph is not mutable")) + case "regen.data.v1.ContentHash.Graph.merkle_tree": + panic(fmt.Errorf("field merkle_tree of message regen.data.v1.ContentHash.Graph is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.Graph")) + } + panic(fmt.Errorf("message regen.data.v1.ContentHash.Graph does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ContentHash_Graph) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v1.ContentHash.Graph.hash": + return protoreflect.ValueOfBytes(nil) + case "regen.data.v1.ContentHash.Graph.digest_algorithm": + return protoreflect.ValueOfEnum(0) + case "regen.data.v1.ContentHash.Graph.canonicalization_algorithm": + return protoreflect.ValueOfEnum(0) + case "regen.data.v1.ContentHash.Graph.merkle_tree": + return protoreflect.ValueOfEnum(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.Graph")) + } + panic(fmt.Errorf("message regen.data.v1.ContentHash.Graph does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ContentHash_Graph) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v1.ContentHash.Graph", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ContentHash_Graph) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContentHash_Graph) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ContentHash_Graph) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ContentHash_Graph) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ContentHash_Graph) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Hash) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.DigestAlgorithm != 0 { + n += 1 + runtime.Sov(uint64(x.DigestAlgorithm)) + } + if x.CanonicalizationAlgorithm != 0 { + n += 1 + runtime.Sov(uint64(x.CanonicalizationAlgorithm)) + } + if x.MerkleTree != 0 { + n += 1 + runtime.Sov(uint64(x.MerkleTree)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ContentHash_Graph) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.MerkleTree != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.MerkleTree)) + i-- + dAtA[i] = 0x20 + } + if x.CanonicalizationAlgorithm != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.CanonicalizationAlgorithm)) + i-- + dAtA[i] = 0x18 + } + if x.DigestAlgorithm != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.DigestAlgorithm)) + i-- + dAtA[i] = 0x10 + } + if len(x.Hash) > 0 { + i -= len(x.Hash) + copy(dAtA[i:], x.Hash) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Hash))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ContentHash_Graph) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContentHash_Graph: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContentHash_Graph: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Hash = append(x.Hash[:0], dAtA[iNdEx:postIndex]...) + if x.Hash == nil { + x.Hash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DigestAlgorithm", wireType) + } + x.DigestAlgorithm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.DigestAlgorithm |= DigestAlgorithm(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CanonicalizationAlgorithm", wireType) + } + x.CanonicalizationAlgorithm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.CanonicalizationAlgorithm |= GraphCanonicalizationAlgorithm(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MerkleTree", wireType) + } + x.MerkleTree = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.MerkleTree |= GraphMerkleTree(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_ContentHash_RawV2 protoreflect.MessageDescriptor + fd_ContentHash_RawV2_hash protoreflect.FieldDescriptor + fd_ContentHash_RawV2_digest_algorithm protoreflect.FieldDescriptor + fd_ContentHash_RawV2_file_extension protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v1_types_proto_init() + md_ContentHash_RawV2 = File_regen_data_v1_types_proto.Messages().ByName("ContentHash").Messages().ByName("RawV2") + fd_ContentHash_RawV2_hash = md_ContentHash_RawV2.Fields().ByName("hash") + fd_ContentHash_RawV2_digest_algorithm = md_ContentHash_RawV2.Fields().ByName("digest_algorithm") + fd_ContentHash_RawV2_file_extension = md_ContentHash_RawV2.Fields().ByName("file_extension") +} + +var _ protoreflect.Message = (*fastReflection_ContentHash_RawV2)(nil) + +type fastReflection_ContentHash_RawV2 ContentHash_RawV2 + +func (x *ContentHash_RawV2) ProtoReflect() protoreflect.Message { + return (*fastReflection_ContentHash_RawV2)(x) +} + +func (x *ContentHash_RawV2) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v1_types_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ContentHash_RawV2_messageType fastReflection_ContentHash_RawV2_messageType +var _ protoreflect.MessageType = fastReflection_ContentHash_RawV2_messageType{} + +type fastReflection_ContentHash_RawV2_messageType struct{} + +func (x fastReflection_ContentHash_RawV2_messageType) Zero() protoreflect.Message { + return (*fastReflection_ContentHash_RawV2)(nil) +} +func (x fastReflection_ContentHash_RawV2_messageType) New() protoreflect.Message { + return new(fastReflection_ContentHash_RawV2) +} +func (x fastReflection_ContentHash_RawV2_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ContentHash_RawV2 +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ContentHash_RawV2) Descriptor() protoreflect.MessageDescriptor { + return md_ContentHash_RawV2 +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ContentHash_RawV2) Type() protoreflect.MessageType { + return _fastReflection_ContentHash_RawV2_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ContentHash_RawV2) New() protoreflect.Message { + return new(fastReflection_ContentHash_RawV2) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ContentHash_RawV2) Interface() protoreflect.ProtoMessage { + return (*ContentHash_RawV2)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ContentHash_RawV2) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Hash) != 0 { + value := protoreflect.ValueOfBytes(x.Hash) + if !f(fd_ContentHash_RawV2_hash, value) { + return + } + } + if x.DigestAlgorithm != uint32(0) { + value := protoreflect.ValueOfUint32(x.DigestAlgorithm) + if !f(fd_ContentHash_RawV2_digest_algorithm, value) { + return + } + } + if x.FileExtension != "" { + value := protoreflect.ValueOfString(x.FileExtension) + if !f(fd_ContentHash_RawV2_file_extension, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ContentHash_RawV2) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v1.ContentHash.RawV2.hash": + return len(x.Hash) != 0 + case "regen.data.v1.ContentHash.RawV2.digest_algorithm": + return x.DigestAlgorithm != uint32(0) + case "regen.data.v1.ContentHash.RawV2.file_extension": + return x.FileExtension != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.RawV2")) + } + panic(fmt.Errorf("message regen.data.v1.ContentHash.RawV2 does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContentHash_RawV2) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v1.ContentHash.RawV2.hash": + x.Hash = nil + case "regen.data.v1.ContentHash.RawV2.digest_algorithm": + x.DigestAlgorithm = uint32(0) + case "regen.data.v1.ContentHash.RawV2.file_extension": + x.FileExtension = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.RawV2")) + } + panic(fmt.Errorf("message regen.data.v1.ContentHash.RawV2 does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ContentHash_RawV2) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v1.ContentHash.RawV2.hash": + value := x.Hash + return protoreflect.ValueOfBytes(value) + case "regen.data.v1.ContentHash.RawV2.digest_algorithm": + value := x.DigestAlgorithm + return protoreflect.ValueOfUint32(value) + case "regen.data.v1.ContentHash.RawV2.file_extension": + value := x.FileExtension + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.RawV2")) + } + panic(fmt.Errorf("message regen.data.v1.ContentHash.RawV2 does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContentHash_RawV2) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v1.ContentHash.RawV2.hash": + x.Hash = value.Bytes() + case "regen.data.v1.ContentHash.RawV2.digest_algorithm": + x.DigestAlgorithm = uint32(value.Uint()) + case "regen.data.v1.ContentHash.RawV2.file_extension": + x.FileExtension = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.RawV2")) + } + panic(fmt.Errorf("message regen.data.v1.ContentHash.RawV2 does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContentHash_RawV2) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v1.ContentHash.RawV2.hash": + panic(fmt.Errorf("field hash of message regen.data.v1.ContentHash.RawV2 is not mutable")) + case "regen.data.v1.ContentHash.RawV2.digest_algorithm": + panic(fmt.Errorf("field digest_algorithm of message regen.data.v1.ContentHash.RawV2 is not mutable")) + case "regen.data.v1.ContentHash.RawV2.file_extension": + panic(fmt.Errorf("field file_extension of message regen.data.v1.ContentHash.RawV2 is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.RawV2")) + } + panic(fmt.Errorf("message regen.data.v1.ContentHash.RawV2 does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ContentHash_RawV2) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v1.ContentHash.RawV2.hash": + return protoreflect.ValueOfBytes(nil) + case "regen.data.v1.ContentHash.RawV2.digest_algorithm": + return protoreflect.ValueOfUint32(uint32(0)) + case "regen.data.v1.ContentHash.RawV2.file_extension": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.RawV2")) + } + panic(fmt.Errorf("message regen.data.v1.ContentHash.RawV2 does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ContentHash_RawV2) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v1.ContentHash.RawV2", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ContentHash_RawV2) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContentHash_RawV2) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ContentHash_RawV2) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ContentHash_RawV2) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ContentHash_RawV2) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Hash) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.DigestAlgorithm != 0 { + n += 1 + runtime.Sov(uint64(x.DigestAlgorithm)) + } + l = len(x.FileExtension) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ContentHash_RawV2) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -871,10 +2114,12 @@ func (x *fastReflection_ContentHash_Raw) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.MediaType != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MediaType)) + if len(x.FileExtension) > 0 { + i -= len(x.FileExtension) + copy(dAtA[i:], x.FileExtension) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FileExtension))) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x1a } if x.DigestAlgorithm != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.DigestAlgorithm)) @@ -899,7 +2144,7 @@ func (x *fastReflection_ContentHash_Raw) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ContentHash_Raw) + x := input.Message.Interface().(*ContentHash_RawV2) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -931,10 +2176,10 @@ func (x *fastReflection_ContentHash_Raw) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContentHash_Raw: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContentHash_RawV2: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContentHash_Raw: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContentHash_RawV2: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -985,16 +2230,16 @@ func (x *fastReflection_ContentHash_Raw) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.DigestAlgorithm |= DigestAlgorithm(b&0x7F) << shift + x.DigestAlgorithm |= uint32(b&0x7F) << shift if b < 0x80 { break } } case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MediaType", wireType) + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FileExtension", wireType) } - x.MediaType = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -1004,11 +2249,24 @@ func (x *fastReflection_ContentHash_Raw) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.MediaType |= RawMediaType(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.FileExtension = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1045,32 +2303,32 @@ func (x *fastReflection_ContentHash_Raw) ProtoMethods() *protoiface.Methods { } var ( - md_ContentHash_Graph protoreflect.MessageDescriptor - fd_ContentHash_Graph_hash protoreflect.FieldDescriptor - fd_ContentHash_Graph_digest_algorithm protoreflect.FieldDescriptor - fd_ContentHash_Graph_canonicalization_algorithm protoreflect.FieldDescriptor - fd_ContentHash_Graph_merkle_tree protoreflect.FieldDescriptor + md_ContentHash_GraphV2 protoreflect.MessageDescriptor + fd_ContentHash_GraphV2_hash protoreflect.FieldDescriptor + fd_ContentHash_GraphV2_digest_algorithm protoreflect.FieldDescriptor + fd_ContentHash_GraphV2_canonicalization_algorithm protoreflect.FieldDescriptor + fd_ContentHash_GraphV2_merkle_tree protoreflect.FieldDescriptor ) func init() { file_regen_data_v1_types_proto_init() - md_ContentHash_Graph = File_regen_data_v1_types_proto.Messages().ByName("ContentHash").Messages().ByName("Graph") - fd_ContentHash_Graph_hash = md_ContentHash_Graph.Fields().ByName("hash") - fd_ContentHash_Graph_digest_algorithm = md_ContentHash_Graph.Fields().ByName("digest_algorithm") - fd_ContentHash_Graph_canonicalization_algorithm = md_ContentHash_Graph.Fields().ByName("canonicalization_algorithm") - fd_ContentHash_Graph_merkle_tree = md_ContentHash_Graph.Fields().ByName("merkle_tree") + md_ContentHash_GraphV2 = File_regen_data_v1_types_proto.Messages().ByName("ContentHash").Messages().ByName("GraphV2") + fd_ContentHash_GraphV2_hash = md_ContentHash_GraphV2.Fields().ByName("hash") + fd_ContentHash_GraphV2_digest_algorithm = md_ContentHash_GraphV2.Fields().ByName("digest_algorithm") + fd_ContentHash_GraphV2_canonicalization_algorithm = md_ContentHash_GraphV2.Fields().ByName("canonicalization_algorithm") + fd_ContentHash_GraphV2_merkle_tree = md_ContentHash_GraphV2.Fields().ByName("merkle_tree") } -var _ protoreflect.Message = (*fastReflection_ContentHash_Graph)(nil) +var _ protoreflect.Message = (*fastReflection_ContentHash_GraphV2)(nil) -type fastReflection_ContentHash_Graph ContentHash_Graph +type fastReflection_ContentHash_GraphV2 ContentHash_GraphV2 -func (x *ContentHash_Graph) ProtoReflect() protoreflect.Message { - return (*fastReflection_ContentHash_Graph)(x) +func (x *ContentHash_GraphV2) ProtoReflect() protoreflect.Message { + return (*fastReflection_ContentHash_GraphV2)(x) } -func (x *ContentHash_Graph) slowProtoReflect() protoreflect.Message { - mi := &file_regen_data_v1_types_proto_msgTypes[3] +func (x *ContentHash_GraphV2) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v1_types_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1081,43 +2339,43 @@ func (x *ContentHash_Graph) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_ContentHash_Graph_messageType fastReflection_ContentHash_Graph_messageType -var _ protoreflect.MessageType = fastReflection_ContentHash_Graph_messageType{} +var _fastReflection_ContentHash_GraphV2_messageType fastReflection_ContentHash_GraphV2_messageType +var _ protoreflect.MessageType = fastReflection_ContentHash_GraphV2_messageType{} -type fastReflection_ContentHash_Graph_messageType struct{} +type fastReflection_ContentHash_GraphV2_messageType struct{} -func (x fastReflection_ContentHash_Graph_messageType) Zero() protoreflect.Message { - return (*fastReflection_ContentHash_Graph)(nil) +func (x fastReflection_ContentHash_GraphV2_messageType) Zero() protoreflect.Message { + return (*fastReflection_ContentHash_GraphV2)(nil) } -func (x fastReflection_ContentHash_Graph_messageType) New() protoreflect.Message { - return new(fastReflection_ContentHash_Graph) +func (x fastReflection_ContentHash_GraphV2_messageType) New() protoreflect.Message { + return new(fastReflection_ContentHash_GraphV2) } -func (x fastReflection_ContentHash_Graph_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ContentHash_Graph +func (x fastReflection_ContentHash_GraphV2_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ContentHash_GraphV2 } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_ContentHash_Graph) Descriptor() protoreflect.MessageDescriptor { - return md_ContentHash_Graph +func (x *fastReflection_ContentHash_GraphV2) Descriptor() protoreflect.MessageDescriptor { + return md_ContentHash_GraphV2 } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_ContentHash_Graph) Type() protoreflect.MessageType { - return _fastReflection_ContentHash_Graph_messageType +func (x *fastReflection_ContentHash_GraphV2) Type() protoreflect.MessageType { + return _fastReflection_ContentHash_GraphV2_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_ContentHash_Graph) New() protoreflect.Message { - return new(fastReflection_ContentHash_Graph) +func (x *fastReflection_ContentHash_GraphV2) New() protoreflect.Message { + return new(fastReflection_ContentHash_GraphV2) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_ContentHash_Graph) Interface() protoreflect.ProtoMessage { - return (*ContentHash_Graph)(x) +func (x *fastReflection_ContentHash_GraphV2) Interface() protoreflect.ProtoMessage { + return (*ContentHash_GraphV2)(x) } // Range iterates over every populated field in an undefined order, @@ -1125,28 +2383,28 @@ func (x *fastReflection_ContentHash_Graph) Interface() protoreflect.ProtoMessage // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_ContentHash_Graph) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_ContentHash_GraphV2) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Hash) != 0 { value := protoreflect.ValueOfBytes(x.Hash) - if !f(fd_ContentHash_Graph_hash, value) { + if !f(fd_ContentHash_GraphV2_hash, value) { return } } - if x.DigestAlgorithm != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.DigestAlgorithm)) - if !f(fd_ContentHash_Graph_digest_algorithm, value) { + if x.DigestAlgorithm != uint32(0) { + value := protoreflect.ValueOfUint32(x.DigestAlgorithm) + if !f(fd_ContentHash_GraphV2_digest_algorithm, value) { return } } - if x.CanonicalizationAlgorithm != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.CanonicalizationAlgorithm)) - if !f(fd_ContentHash_Graph_canonicalization_algorithm, value) { + if x.CanonicalizationAlgorithm != uint32(0) { + value := protoreflect.ValueOfUint32(x.CanonicalizationAlgorithm) + if !f(fd_ContentHash_GraphV2_canonicalization_algorithm, value) { return } } - if x.MerkleTree != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.MerkleTree)) - if !f(fd_ContentHash_Graph_merkle_tree, value) { + if x.MerkleTree != uint32(0) { + value := protoreflect.ValueOfUint32(x.MerkleTree) + if !f(fd_ContentHash_GraphV2_merkle_tree, value) { return } } @@ -1163,21 +2421,21 @@ func (x *fastReflection_ContentHash_Graph) Range(f func(protoreflect.FieldDescri // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_ContentHash_Graph) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_ContentHash_GraphV2) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "regen.data.v1.ContentHash.Graph.hash": + case "regen.data.v1.ContentHash.GraphV2.hash": return len(x.Hash) != 0 - case "regen.data.v1.ContentHash.Graph.digest_algorithm": - return x.DigestAlgorithm != 0 - case "regen.data.v1.ContentHash.Graph.canonicalization_algorithm": - return x.CanonicalizationAlgorithm != 0 - case "regen.data.v1.ContentHash.Graph.merkle_tree": - return x.MerkleTree != 0 + case "regen.data.v1.ContentHash.GraphV2.digest_algorithm": + return x.DigestAlgorithm != uint32(0) + case "regen.data.v1.ContentHash.GraphV2.canonicalization_algorithm": + return x.CanonicalizationAlgorithm != uint32(0) + case "regen.data.v1.ContentHash.GraphV2.merkle_tree": + return x.MerkleTree != uint32(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.Graph")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.GraphV2")) } - panic(fmt.Errorf("message regen.data.v1.ContentHash.Graph does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.data.v1.ContentHash.GraphV2 does not contain field %s", fd.FullName())) } } @@ -1187,21 +2445,21 @@ func (x *fastReflection_ContentHash_Graph) Has(fd protoreflect.FieldDescriptor) // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ContentHash_Graph) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_ContentHash_GraphV2) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "regen.data.v1.ContentHash.Graph.hash": + case "regen.data.v1.ContentHash.GraphV2.hash": x.Hash = nil - case "regen.data.v1.ContentHash.Graph.digest_algorithm": - x.DigestAlgorithm = 0 - case "regen.data.v1.ContentHash.Graph.canonicalization_algorithm": - x.CanonicalizationAlgorithm = 0 - case "regen.data.v1.ContentHash.Graph.merkle_tree": - x.MerkleTree = 0 + case "regen.data.v1.ContentHash.GraphV2.digest_algorithm": + x.DigestAlgorithm = uint32(0) + case "regen.data.v1.ContentHash.GraphV2.canonicalization_algorithm": + x.CanonicalizationAlgorithm = uint32(0) + case "regen.data.v1.ContentHash.GraphV2.merkle_tree": + x.MerkleTree = uint32(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.Graph")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.GraphV2")) } - panic(fmt.Errorf("message regen.data.v1.ContentHash.Graph does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.data.v1.ContentHash.GraphV2 does not contain field %s", fd.FullName())) } } @@ -1211,25 +2469,25 @@ func (x *fastReflection_ContentHash_Graph) Clear(fd protoreflect.FieldDescriptor // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ContentHash_Graph) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_ContentHash_GraphV2) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "regen.data.v1.ContentHash.Graph.hash": + case "regen.data.v1.ContentHash.GraphV2.hash": value := x.Hash return protoreflect.ValueOfBytes(value) - case "regen.data.v1.ContentHash.Graph.digest_algorithm": + case "regen.data.v1.ContentHash.GraphV2.digest_algorithm": value := x.DigestAlgorithm - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "regen.data.v1.ContentHash.Graph.canonicalization_algorithm": + return protoreflect.ValueOfUint32(value) + case "regen.data.v1.ContentHash.GraphV2.canonicalization_algorithm": value := x.CanonicalizationAlgorithm - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "regen.data.v1.ContentHash.Graph.merkle_tree": + return protoreflect.ValueOfUint32(value) + case "regen.data.v1.ContentHash.GraphV2.merkle_tree": value := x.MerkleTree - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + return protoreflect.ValueOfUint32(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.Graph")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.GraphV2")) } - panic(fmt.Errorf("message regen.data.v1.ContentHash.Graph does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message regen.data.v1.ContentHash.GraphV2 does not contain field %s", descriptor.FullName())) } } @@ -1243,21 +2501,21 @@ func (x *fastReflection_ContentHash_Graph) Get(descriptor protoreflect.FieldDesc // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ContentHash_Graph) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_ContentHash_GraphV2) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "regen.data.v1.ContentHash.Graph.hash": + case "regen.data.v1.ContentHash.GraphV2.hash": x.Hash = value.Bytes() - case "regen.data.v1.ContentHash.Graph.digest_algorithm": - x.DigestAlgorithm = (DigestAlgorithm)(value.Enum()) - case "regen.data.v1.ContentHash.Graph.canonicalization_algorithm": - x.CanonicalizationAlgorithm = (GraphCanonicalizationAlgorithm)(value.Enum()) - case "regen.data.v1.ContentHash.Graph.merkle_tree": - x.MerkleTree = (GraphMerkleTree)(value.Enum()) + case "regen.data.v1.ContentHash.GraphV2.digest_algorithm": + x.DigestAlgorithm = uint32(value.Uint()) + case "regen.data.v1.ContentHash.GraphV2.canonicalization_algorithm": + x.CanonicalizationAlgorithm = uint32(value.Uint()) + case "regen.data.v1.ContentHash.GraphV2.merkle_tree": + x.MerkleTree = uint32(value.Uint()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.Graph")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.GraphV2")) } - panic(fmt.Errorf("message regen.data.v1.ContentHash.Graph does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.data.v1.ContentHash.GraphV2 does not contain field %s", fd.FullName())) } } @@ -1271,52 +2529,52 @@ func (x *fastReflection_ContentHash_Graph) Set(fd protoreflect.FieldDescriptor, // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ContentHash_Graph) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_ContentHash_GraphV2) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "regen.data.v1.ContentHash.Graph.hash": - panic(fmt.Errorf("field hash of message regen.data.v1.ContentHash.Graph is not mutable")) - case "regen.data.v1.ContentHash.Graph.digest_algorithm": - panic(fmt.Errorf("field digest_algorithm of message regen.data.v1.ContentHash.Graph is not mutable")) - case "regen.data.v1.ContentHash.Graph.canonicalization_algorithm": - panic(fmt.Errorf("field canonicalization_algorithm of message regen.data.v1.ContentHash.Graph is not mutable")) - case "regen.data.v1.ContentHash.Graph.merkle_tree": - panic(fmt.Errorf("field merkle_tree of message regen.data.v1.ContentHash.Graph is not mutable")) + case "regen.data.v1.ContentHash.GraphV2.hash": + panic(fmt.Errorf("field hash of message regen.data.v1.ContentHash.GraphV2 is not mutable")) + case "regen.data.v1.ContentHash.GraphV2.digest_algorithm": + panic(fmt.Errorf("field digest_algorithm of message regen.data.v1.ContentHash.GraphV2 is not mutable")) + case "regen.data.v1.ContentHash.GraphV2.canonicalization_algorithm": + panic(fmt.Errorf("field canonicalization_algorithm of message regen.data.v1.ContentHash.GraphV2 is not mutable")) + case "regen.data.v1.ContentHash.GraphV2.merkle_tree": + panic(fmt.Errorf("field merkle_tree of message regen.data.v1.ContentHash.GraphV2 is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.Graph")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.GraphV2")) } - panic(fmt.Errorf("message regen.data.v1.ContentHash.Graph does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.data.v1.ContentHash.GraphV2 does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ContentHash_Graph) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_ContentHash_GraphV2) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "regen.data.v1.ContentHash.Graph.hash": + case "regen.data.v1.ContentHash.GraphV2.hash": return protoreflect.ValueOfBytes(nil) - case "regen.data.v1.ContentHash.Graph.digest_algorithm": - return protoreflect.ValueOfEnum(0) - case "regen.data.v1.ContentHash.Graph.canonicalization_algorithm": - return protoreflect.ValueOfEnum(0) - case "regen.data.v1.ContentHash.Graph.merkle_tree": - return protoreflect.ValueOfEnum(0) + case "regen.data.v1.ContentHash.GraphV2.digest_algorithm": + return protoreflect.ValueOfUint32(uint32(0)) + case "regen.data.v1.ContentHash.GraphV2.canonicalization_algorithm": + return protoreflect.ValueOfUint32(uint32(0)) + case "regen.data.v1.ContentHash.GraphV2.merkle_tree": + return protoreflect.ValueOfUint32(uint32(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.Graph")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.GraphV2")) } - panic(fmt.Errorf("message regen.data.v1.ContentHash.Graph does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.data.v1.ContentHash.GraphV2 does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ContentHash_Graph) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_ContentHash_GraphV2) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in regen.data.v1.ContentHash.Graph", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in regen.data.v1.ContentHash.GraphV2", d.FullName())) } panic("unreachable") } @@ -1324,7 +2582,7 @@ func (x *fastReflection_ContentHash_Graph) WhichOneof(d protoreflect.OneofDescri // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ContentHash_Graph) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_ContentHash_GraphV2) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1335,7 +2593,7 @@ func (x *fastReflection_ContentHash_Graph) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ContentHash_Graph) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_ContentHash_GraphV2) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1347,7 +2605,7 @@ func (x *fastReflection_ContentHash_Graph) SetUnknown(fields protoreflect.RawFie // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_ContentHash_Graph) IsValid() bool { +func (x *fastReflection_ContentHash_GraphV2) IsValid() bool { return x != nil } @@ -1357,9 +2615,9 @@ func (x *fastReflection_ContentHash_Graph) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_ContentHash_Graph) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_ContentHash_GraphV2) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ContentHash_Graph) + x := input.Message.Interface().(*ContentHash_GraphV2) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1394,7 +2652,7 @@ func (x *fastReflection_ContentHash_Graph) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ContentHash_Graph) + x := input.Message.Interface().(*ContentHash_GraphV2) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1446,7 +2704,7 @@ func (x *fastReflection_ContentHash_Graph) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ContentHash_Graph) + x := input.Message.Interface().(*ContentHash_GraphV2) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1478,10 +2736,10 @@ func (x *fastReflection_ContentHash_Graph) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContentHash_Graph: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContentHash_GraphV2: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContentHash_Graph: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContentHash_GraphV2: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1532,7 +2790,7 @@ func (x *fastReflection_ContentHash_Graph) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.DigestAlgorithm |= DigestAlgorithm(b&0x7F) << shift + x.DigestAlgorithm |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -1551,7 +2809,7 @@ func (x *fastReflection_ContentHash_Graph) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.CanonicalizationAlgorithm |= GraphCanonicalizationAlgorithm(b&0x7F) << shift + x.CanonicalizationAlgorithm |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -1570,7 +2828,7 @@ func (x *fastReflection_ContentHash_Graph) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.MerkleTree |= GraphMerkleTree(b&0x7F) << shift + x.MerkleTree |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -2166,6 +3424,7 @@ func (DigestAlgorithm) EnumDescriptor() ([]byte, []int) { return file_regen_data_v1_types_proto_rawDescGZIP(), []int{0} } +// Deprecated: use RawV2 instead. // RawMediaType defines MIME media types to be used with a ContentHash.Raw hash. type RawMediaType int32 @@ -2379,6 +3638,7 @@ type ContentHash struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Deprecated: use RawV2 instead. // Raw specifies "raw" data which does not specify a deterministic, canonical // encoding. Users of these hashes MUST maintain a copy of the hashed data // which is preserved bit by bit. All other content encodings specify a @@ -2386,11 +3646,28 @@ type ContentHash struct { // variety of alternative formats for transport and encoding while maintaining // the guarantee that the canonical hash will not change. The media type for // "raw" data is defined by the MediaType enum. + // + // Deprecated: Do not use. Raw *ContentHash_Raw `protobuf:"bytes,1,opt,name=raw,proto3" json:"raw,omitempty"` + // Deprecated: use GraphV2 instead. // Graph specifies graph data that conforms to the RDF data model. // The canonicalization algorithm used for an RDF graph is specified by // GraphCanonicalizationAlgorithm. + // + // Deprecated: Do not use. Graph *ContentHash_Graph `protobuf:"bytes,2,opt,name=graph,proto3" json:"graph,omitempty"` + // raw_v2 specifies "raw" data which does not specify a deterministic, canonical + // encoding. Users of these hashes MUST maintain a copy of the hashed data + // which is preserved bit by bit. All other content encodings specify a + // deterministic, canonical encoding allowing implementations to choose from a + // variety of alternative formats for transport and encoding while maintaining + // the guarantee that the canonical hash will not change. The media type for + // "raw" data is defined by the MediaType enum. + RawV2 *ContentHash_RawV2 `protobuf:"bytes,3,opt,name=raw_v2,json=rawV2,proto3" json:"raw_v2,omitempty"` + // graph_v2 specifies graph data that conforms to the RDF data model. + // The canonicalization algorithm used for an RDF graph is specified by + // GraphCanonicalizationAlgorithm. + GraphV2 *ContentHash_GraphV2 `protobuf:"bytes,4,opt,name=graph_v2,json=graphV2,proto3" json:"graph_v2,omitempty"` } func (x *ContentHash) Reset() { @@ -2413,6 +3690,7 @@ func (*ContentHash) Descriptor() ([]byte, []int) { return file_regen_data_v1_types_proto_rawDescGZIP(), []int{0} } +// Deprecated: Do not use. func (x *ContentHash) GetRaw() *ContentHash_Raw { if x != nil { return x.Raw @@ -2420,6 +3698,7 @@ func (x *ContentHash) GetRaw() *ContentHash_Raw { return nil } +// Deprecated: Do not use. func (x *ContentHash) GetGraph() *ContentHash_Graph { if x != nil { return x.Graph @@ -2427,6 +3706,20 @@ func (x *ContentHash) GetGraph() *ContentHash_Graph { return nil } +func (x *ContentHash) GetRawV2() *ContentHash_RawV2 { + if x != nil { + return x.RawV2 + } + return nil +} + +func (x *ContentHash) GetGraphV2() *ContentHash_GraphV2 { + if x != nil { + return x.GraphV2 + } + return nil +} + // ContentHashes contains list of content ContentHash. type ContentHashes struct { state protoimpl.MessageState @@ -2586,20 +3879,160 @@ func (x *ContentHash_Graph) GetMerkleTree() GraphMerkleTree { return GraphMerkleTree_GRAPH_MERKLE_TREE_NONE_UNSPECIFIED } +// RawV2 is the content hash type used for raw data. +type ContentHash_RawV2 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // hash represents the hash of the data based on the specified + // digest_algorithm. It must be at least 20 bytes long and at most 64 bytes long. + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + // digest_algorithm represents the hash digest algorithm and should be a non-zero value from the DigestAlgorithm enum. + DigestAlgorithm uint32 `protobuf:"varint,2,opt,name=digest_algorithm,json=digestAlgorithm,proto3" json:"digest_algorithm,omitempty"` + // file_extension represents the file extension for raw data. It can be + // must be between 2-6 characters long, must be all lower-case and should represent + // the canonical extension for the media type. + // + // A list of canonical extensions which should be used is provided here + // and SHOULD be used by implementations: txt, json, csv, xml, pdf, tiff, + // jpg, png, svg, webp, avif, gif, apng, mpeg, mp4, webm, ogg, heic, raw. + // + // The above list should be updated as new media types come into common usage + // especially when there are two or more possible extensions (i.e. jpg vs jpeg or tif vs tiff). + FileExtension string `protobuf:"bytes,3,opt,name=file_extension,json=fileExtension,proto3" json:"file_extension,omitempty"` +} + +func (x *ContentHash_RawV2) Reset() { + *x = ContentHash_RawV2{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v1_types_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContentHash_RawV2) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContentHash_RawV2) ProtoMessage() {} + +// Deprecated: Use ContentHash_RawV2.ProtoReflect.Descriptor instead. +func (*ContentHash_RawV2) Descriptor() ([]byte, []int) { + return file_regen_data_v1_types_proto_rawDescGZIP(), []int{0, 2} +} + +func (x *ContentHash_RawV2) GetHash() []byte { + if x != nil { + return x.Hash + } + return nil +} + +func (x *ContentHash_RawV2) GetDigestAlgorithm() uint32 { + if x != nil { + return x.DigestAlgorithm + } + return 0 +} + +func (x *ContentHash_RawV2) GetFileExtension() string { + if x != nil { + return x.FileExtension + } + return "" +} + +// GraphV2 is the content hash type used for RDF graph data. +type ContentHash_GraphV2 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // hash represents the hash of the data based on the specified + // digest_algorithm. It must be at least 20 bytes long and at most 64 bytes long. + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + // digest_algorithm represents the hash digest algorithm and should be a non-zero value from the DigestAlgorithm enum. + DigestAlgorithm uint32 `protobuf:"varint,2,opt,name=digest_algorithm,json=digestAlgorithm,proto3" json:"digest_algorithm,omitempty"` + // graph_canonicalization_algorithm represents the RDF graph + // canonicalization algorithm and should be a non-zero value from the GraphCanonicalizationAlgorithm enum. + CanonicalizationAlgorithm uint32 `protobuf:"varint,3,opt,name=canonicalization_algorithm,json=canonicalizationAlgorithm,proto3" json:"canonicalization_algorithm,omitempty"` + // merkle_tree is the merkle tree type used for the graph hash, if any and should be a value from the GraphMerkleTree enum + // or left unspecified. + MerkleTree uint32 `protobuf:"varint,4,opt,name=merkle_tree,json=merkleTree,proto3" json:"merkle_tree,omitempty"` +} + +func (x *ContentHash_GraphV2) Reset() { + *x = ContentHash_GraphV2{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v1_types_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContentHash_GraphV2) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContentHash_GraphV2) ProtoMessage() {} + +// Deprecated: Use ContentHash_GraphV2.ProtoReflect.Descriptor instead. +func (*ContentHash_GraphV2) Descriptor() ([]byte, []int) { + return file_regen_data_v1_types_proto_rawDescGZIP(), []int{0, 3} +} + +func (x *ContentHash_GraphV2) GetHash() []byte { + if x != nil { + return x.Hash + } + return nil +} + +func (x *ContentHash_GraphV2) GetDigestAlgorithm() uint32 { + if x != nil { + return x.DigestAlgorithm + } + return 0 +} + +func (x *ContentHash_GraphV2) GetCanonicalizationAlgorithm() uint32 { + if x != nil { + return x.CanonicalizationAlgorithm + } + return 0 +} + +func (x *ContentHash_GraphV2) GetMerkleTree() uint32 { + if x != nil { + return x.MerkleTree + } + return 0 +} + var File_regen_data_v1_types_proto protoreflect.FileDescriptor var file_regen_data_v1_types_proto_rawDesc = []byte{ 0x0a, 0x19, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x72, 0x65, 0x67, - 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x22, 0xb2, 0x04, 0x0a, 0x0b, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x30, 0x0a, 0x03, 0x72, 0x61, + 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x22, 0xcc, 0x07, 0x0a, 0x0b, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x34, 0x0a, 0x03, 0x72, 0x61, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, - 0x61, 0x73, 0x68, 0x2e, 0x52, 0x61, 0x77, 0x52, 0x03, 0x72, 0x61, 0x77, 0x12, 0x36, 0x0a, 0x05, - 0x67, 0x72, 0x61, 0x70, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x65, - 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x05, 0x67, - 0x72, 0x61, 0x70, 0x68, 0x1a, 0xa0, 0x01, 0x0a, 0x03, 0x52, 0x61, 0x77, 0x12, 0x12, 0x0a, 0x04, + 0x61, 0x73, 0x68, 0x2e, 0x52, 0x61, 0x77, 0x42, 0x02, 0x18, 0x01, 0x52, 0x03, 0x72, 0x61, 0x77, + 0x12, 0x3a, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x70, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x2e, 0x47, 0x72, 0x61, 0x70, + 0x68, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, 0x67, 0x72, 0x61, 0x70, 0x68, 0x12, 0x37, 0x0a, 0x06, + 0x72, 0x61, 0x77, 0x5f, 0x76, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, + 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x2e, 0x52, 0x61, 0x77, 0x56, 0x32, 0x52, 0x05, + 0x72, 0x61, 0x77, 0x56, 0x32, 0x12, 0x3d, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x70, 0x68, 0x5f, 0x76, + 0x32, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, + 0x61, 0x73, 0x68, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x56, 0x32, 0x52, 0x07, 0x67, 0x72, 0x61, + 0x70, 0x68, 0x56, 0x32, 0x1a, 0xa0, 0x01, 0x0a, 0x03, 0x52, 0x61, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x49, 0x0a, 0x10, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x72, 0x65, 0x67, @@ -2626,72 +4059,89 @@ var file_regen_data_v1_types_proto_rawDesc = []byte{ 0x0a, 0x0b, 0x6d, 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x4d, 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x54, - 0x72, 0x65, 0x65, 0x52, 0x0a, 0x6d, 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x54, 0x72, 0x65, 0x65, 0x22, - 0x52, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, - 0x12, 0x41, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, - 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x48, 0x61, 0x73, 0x68, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, - 0x68, 0x65, 0x73, 0x2a, 0x55, 0x0a, 0x0f, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x67, - 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x20, 0x0a, 0x1c, 0x44, 0x49, 0x47, 0x45, 0x53, 0x54, - 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1c, 0x44, 0x49, 0x47, 0x45, - 0x53, 0x54, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x42, 0x4c, 0x41, - 0x4b, 0x45, 0x32, 0x42, 0x5f, 0x32, 0x35, 0x36, 0x10, 0x01, 0x2a, 0xd4, 0x03, 0x0a, 0x0c, 0x52, - 0x61, 0x77, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x52, - 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x52, - 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x45, - 0x58, 0x54, 0x5f, 0x50, 0x4c, 0x41, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x41, - 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4a, 0x53, 0x4f, - 0x4e, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x53, 0x56, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x52, - 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x58, 0x4d, - 0x4c, 0x10, 0x04, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x44, 0x46, 0x10, 0x05, 0x12, 0x17, 0x0a, 0x13, 0x52, - 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x49, - 0x46, 0x46, 0x10, 0x10, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, - 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4a, 0x50, 0x47, 0x10, 0x11, 0x12, 0x16, 0x0a, 0x12, - 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, - 0x4e, 0x47, 0x10, 0x12, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, - 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x56, 0x47, 0x10, 0x13, 0x12, 0x17, 0x0a, 0x13, - 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x57, - 0x45, 0x42, 0x50, 0x10, 0x14, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, - 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x56, 0x49, 0x46, 0x10, 0x15, 0x12, 0x16, + 0x72, 0x65, 0x65, 0x52, 0x0a, 0x6d, 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x54, 0x72, 0x65, 0x65, 0x1a, + 0x6d, 0x0a, 0x05, 0x52, 0x61, 0x77, 0x56, 0x32, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x29, 0x0a, 0x10, + 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x41, 0x6c, + 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x69, 0x6c, 0x65, 0x5f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0xa8, + 0x01, 0x0a, 0x07, 0x47, 0x72, 0x61, 0x70, 0x68, 0x56, 0x32, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x29, + 0x0a, 0x10, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, + 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, + 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x3d, 0x0a, 0x1a, 0x63, 0x61, 0x6e, + 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6c, + 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x19, 0x63, + 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, + 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x65, 0x72, 0x6b, + 0x6c, 0x65, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6d, + 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x54, 0x72, 0x65, 0x65, 0x22, 0x52, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0e, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x52, 0x0d, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x2a, 0x55, 0x0a, + 0x0f, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, + 0x12, 0x20, 0x0a, 0x1c, 0x44, 0x49, 0x47, 0x45, 0x53, 0x54, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, + 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1c, 0x44, 0x49, 0x47, 0x45, 0x53, 0x54, 0x5f, 0x41, 0x4c, 0x47, + 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x42, 0x4c, 0x41, 0x4b, 0x45, 0x32, 0x42, 0x5f, 0x32, + 0x35, 0x36, 0x10, 0x01, 0x2a, 0xd4, 0x03, 0x0a, 0x0c, 0x52, 0x61, 0x77, 0x4d, 0x65, 0x64, 0x69, + 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, + 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, + 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x45, 0x58, 0x54, 0x5f, 0x50, 0x4c, 0x41, + 0x49, 0x4e, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, + 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x16, 0x0a, + 0x12, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x43, 0x53, 0x56, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, + 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x58, 0x4d, 0x4c, 0x10, 0x04, 0x12, 0x16, 0x0a, + 0x12, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x50, 0x44, 0x46, 0x10, 0x05, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, + 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x49, 0x46, 0x46, 0x10, 0x10, 0x12, 0x16, + 0x0a, 0x12, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x4a, 0x50, 0x47, 0x10, 0x11, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, + 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x4e, 0x47, 0x10, 0x12, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x47, 0x49, 0x46, 0x10, 0x16, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, - 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x50, 0x4e, 0x47, 0x10, 0x17, 0x12, + 0x5f, 0x53, 0x56, 0x47, 0x10, 0x13, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, + 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x57, 0x45, 0x42, 0x50, 0x10, 0x14, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x4d, 0x50, 0x45, 0x47, 0x10, 0x20, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x41, 0x57, 0x5f, - 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x50, 0x34, 0x10, 0x21, + 0x45, 0x5f, 0x41, 0x56, 0x49, 0x46, 0x10, 0x15, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x41, 0x57, 0x5f, + 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x49, 0x46, 0x10, 0x16, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x57, 0x45, 0x42, 0x4d, 0x10, 0x22, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x41, 0x57, - 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x47, 0x47, 0x10, - 0x23, 0x2a, 0x82, 0x01, 0x0a, 0x1e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x43, 0x61, 0x6e, 0x6f, 0x6e, - 0x69, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x72, - 0x69, 0x74, 0x68, 0x6d, 0x12, 0x30, 0x0a, 0x2c, 0x47, 0x52, 0x41, 0x50, 0x48, 0x5f, 0x43, 0x41, - 0x4e, 0x4f, 0x4e, 0x49, 0x43, 0x41, 0x4c, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, - 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2e, 0x0a, 0x2a, 0x47, 0x52, 0x41, 0x50, 0x48, 0x5f, - 0x43, 0x41, 0x4e, 0x4f, 0x4e, 0x49, 0x43, 0x41, 0x4c, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x55, 0x52, 0x44, 0x4e, 0x41, - 0x32, 0x30, 0x31, 0x35, 0x10, 0x01, 0x2a, 0x39, 0x0a, 0x0f, 0x47, 0x72, 0x61, 0x70, 0x68, 0x4d, - 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x54, 0x72, 0x65, 0x65, 0x12, 0x26, 0x0a, 0x22, 0x47, 0x52, 0x41, - 0x50, 0x48, 0x5f, 0x4d, 0x45, 0x52, 0x4b, 0x4c, 0x45, 0x5f, 0x54, 0x52, 0x45, 0x45, 0x5f, 0x4e, - 0x4f, 0x4e, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x42, 0xb5, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, - 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x31, 0x3b, 0x64, - 0x61, 0x74, 0x61, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x58, 0xaa, 0x02, 0x0d, 0x52, 0x65, - 0x67, 0x65, 0x6e, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x52, 0x65, - 0x67, 0x65, 0x6e, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x52, 0x65, - 0x67, 0x65, 0x6e, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x3a, - 0x3a, 0x44, 0x61, 0x74, 0x61, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x50, 0x45, 0x5f, 0x41, 0x50, 0x4e, 0x47, 0x10, 0x17, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x41, 0x57, + 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x50, 0x45, 0x47, + 0x10, 0x20, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x50, 0x34, 0x10, 0x21, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x41, + 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x57, 0x45, 0x42, + 0x4d, 0x10, 0x22, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x47, 0x47, 0x10, 0x23, 0x2a, 0x82, 0x01, 0x0a, 0x1e, + 0x47, 0x72, 0x61, 0x70, 0x68, 0x43, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x30, + 0x0a, 0x2c, 0x47, 0x52, 0x41, 0x50, 0x48, 0x5f, 0x43, 0x41, 0x4e, 0x4f, 0x4e, 0x49, 0x43, 0x41, + 0x4c, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, + 0x48, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x2e, 0x0a, 0x2a, 0x47, 0x52, 0x41, 0x50, 0x48, 0x5f, 0x43, 0x41, 0x4e, 0x4f, 0x4e, 0x49, + 0x43, 0x41, 0x4c, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, + 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x55, 0x52, 0x44, 0x4e, 0x41, 0x32, 0x30, 0x31, 0x35, 0x10, 0x01, + 0x2a, 0x39, 0x0a, 0x0f, 0x47, 0x72, 0x61, 0x70, 0x68, 0x4d, 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x54, + 0x72, 0x65, 0x65, 0x12, 0x26, 0x0a, 0x22, 0x47, 0x52, 0x41, 0x50, 0x48, 0x5f, 0x4d, 0x45, 0x52, + 0x4b, 0x4c, 0x45, 0x5f, 0x54, 0x52, 0x45, 0x45, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x42, 0xb5, 0x01, 0x0a, 0x11, + 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, + 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x67, 0x65, + 0x6e, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, + 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, + 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x52, 0x44, 0x58, 0xaa, 0x02, 0x0d, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x44, 0x61, + 0x74, 0x61, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x44, 0x61, + 0x74, 0x61, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x44, 0x61, + 0x74, 0x61, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x0f, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2707,7 +4157,7 @@ func file_regen_data_v1_types_proto_rawDescGZIP() []byte { } var file_regen_data_v1_types_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_regen_data_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_regen_data_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_regen_data_v1_types_proto_goTypes = []interface{}{ (DigestAlgorithm)(0), // 0: regen.data.v1.DigestAlgorithm (RawMediaType)(0), // 1: regen.data.v1.RawMediaType @@ -2717,21 +4167,25 @@ var file_regen_data_v1_types_proto_goTypes = []interface{}{ (*ContentHashes)(nil), // 5: regen.data.v1.ContentHashes (*ContentHash_Raw)(nil), // 6: regen.data.v1.ContentHash.Raw (*ContentHash_Graph)(nil), // 7: regen.data.v1.ContentHash.Graph + (*ContentHash_RawV2)(nil), // 8: regen.data.v1.ContentHash.RawV2 + (*ContentHash_GraphV2)(nil), // 9: regen.data.v1.ContentHash.GraphV2 } var file_regen_data_v1_types_proto_depIdxs = []int32{ - 6, // 0: regen.data.v1.ContentHash.raw:type_name -> regen.data.v1.ContentHash.Raw - 7, // 1: regen.data.v1.ContentHash.graph:type_name -> regen.data.v1.ContentHash.Graph - 4, // 2: regen.data.v1.ContentHashes.content_hashes:type_name -> regen.data.v1.ContentHash - 0, // 3: regen.data.v1.ContentHash.Raw.digest_algorithm:type_name -> regen.data.v1.DigestAlgorithm - 1, // 4: regen.data.v1.ContentHash.Raw.media_type:type_name -> regen.data.v1.RawMediaType - 0, // 5: regen.data.v1.ContentHash.Graph.digest_algorithm:type_name -> regen.data.v1.DigestAlgorithm - 2, // 6: regen.data.v1.ContentHash.Graph.canonicalization_algorithm:type_name -> regen.data.v1.GraphCanonicalizationAlgorithm - 3, // 7: regen.data.v1.ContentHash.Graph.merkle_tree:type_name -> regen.data.v1.GraphMerkleTree - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 6, // 0: regen.data.v1.ContentHash.raw:type_name -> regen.data.v1.ContentHash.Raw + 7, // 1: regen.data.v1.ContentHash.graph:type_name -> regen.data.v1.ContentHash.Graph + 8, // 2: regen.data.v1.ContentHash.raw_v2:type_name -> regen.data.v1.ContentHash.RawV2 + 9, // 3: regen.data.v1.ContentHash.graph_v2:type_name -> regen.data.v1.ContentHash.GraphV2 + 4, // 4: regen.data.v1.ContentHashes.content_hashes:type_name -> regen.data.v1.ContentHash + 0, // 5: regen.data.v1.ContentHash.Raw.digest_algorithm:type_name -> regen.data.v1.DigestAlgorithm + 1, // 6: regen.data.v1.ContentHash.Raw.media_type:type_name -> regen.data.v1.RawMediaType + 0, // 7: regen.data.v1.ContentHash.Graph.digest_algorithm:type_name -> regen.data.v1.DigestAlgorithm + 2, // 8: regen.data.v1.ContentHash.Graph.canonicalization_algorithm:type_name -> regen.data.v1.GraphCanonicalizationAlgorithm + 3, // 9: regen.data.v1.ContentHash.Graph.merkle_tree:type_name -> regen.data.v1.GraphMerkleTree + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_regen_data_v1_types_proto_init() } @@ -2788,6 +4242,30 @@ func file_regen_data_v1_types_proto_init() { return nil } } + file_regen_data_v1_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContentHash_RawV2); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v1_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContentHash_GraphV2); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -2795,7 +4273,7 @@ func file_regen_data_v1_types_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_regen_data_v1_types_proto_rawDesc, NumEnums: 4, - NumMessages: 4, + NumMessages: 6, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/regen/data/v1/types.proto b/proto/regen/data/v1/types.proto index 64d60c2000..2a263dddc3 100644 --- a/proto/regen/data/v1/types.proto +++ b/proto/regen/data/v1/types.proto @@ -69,14 +69,14 @@ message ContentHash { // RawV2 is the content hash type used for raw data. message RawV2 { // hash represents the hash of the data based on the specified - // digest_algorithm. + // digest_algorithm. It must be at least 20 bytes long and at most 64 bytes long. bytes hash = 1; - // digest_algorithm represents the hash digest algorithm. + // digest_algorithm represents the hash digest algorithm and should be a non-zero value from the DigestAlgorithm enum. uint32 digest_algorithm = 2; // file_extension represents the file extension for raw data. It can be - // up to six characters long, must be all lower-case and should represent + // must be between 2-6 characters long, must be all lower-case and should represent // the canonical extension for the media type. // // A list of canonical extensions which should be used is provided here @@ -91,14 +91,14 @@ message ContentHash { // GraphV2 is the content hash type used for RDF graph data. message GraphV2 { // hash represents the hash of the data based on the specified - // digest_algorithm. + // digest_algorithm. It must be at least 20 bytes long and at most 64 bytes long. bytes hash = 1; - // digest_algorithm represents the hash digest algorithm and should be a value from the DigestAlgorithm enum. + // digest_algorithm represents the hash digest algorithm and should be a non-zero value from the DigestAlgorithm enum. uint32 digest_algorithm = 2; // graph_canonicalization_algorithm represents the RDF graph - // canonicalization algorithm and should be a value from the GraphCanonicalizationAlgorithm enum. + // canonicalization algorithm and should be a non-zero value from the GraphCanonicalizationAlgorithm enum. uint32 canonicalization_algorithm = 3; // merkle_tree is the merkle tree type used for the graph hash, if any and should be a value from the GraphMerkleTree enum diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index c2844c4a6d..335e48c84e 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -30,6 +30,4 @@ cd .. cp -r github.com/regen-network/regen-ledger/* ./ rm -rf github.com -go mod tidy - ./scripts/protocgen2.sh diff --git a/scripts/protocgen2.sh b/scripts/protocgen2.sh index 3de2c1e80f..502daa72c8 100755 --- a/scripts/protocgen2.sh +++ b/scripts/protocgen2.sh @@ -5,7 +5,7 @@ set -eo pipefail protoc_gen_install() { go install github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@latest #2>/dev/null go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest #2>/dev/null - go install github.com/cosmos/cosmos-sdk/orm/cmd/protoc-gen-go-cosmos-orm@latest #2>/dev/null + go install github.com/cosmos/cosmos-sdk/orm/cmd/protoc-gen-go-cosmos-orm@v1.0.0-alpha.12 #2>/dev/null } protoc_gen_install diff --git a/x/data/types.go b/x/data/types.go index 9734536bb7..5585dad094 100644 --- a/x/data/types.go +++ b/x/data/types.go @@ -13,14 +13,20 @@ var DigestAlgorithmLength = map[DigestAlgorithm]int{ func (ch ContentHash) Validate() error { hashRaw := ch.GetRaw() hashGraph := ch.GetGraph() + hashRawV2 := ch.GetRawV2() + hashGraphV2 := ch.GetGraphV2() switch { - case hashRaw != nil && hashGraph != nil: + case hashRaw != nil && hashGraph != nil && hashRawV2 != nil && hashGraphV2 != nil: return sdkerrors.ErrInvalidRequest.Wrapf("content hash must be one of raw type or graph type") case hashRaw != nil: return hashRaw.Validate() case hashGraph != nil: return hashGraph.Validate() + case hashRawV2 != nil: + return hashRawV2.Validate() + case hashGraphV2 != nil: + return hashGraphV2.Validate() } return sdkerrors.ErrInvalidRequest.Wrapf("content hash must be one of raw type or graph type") @@ -98,3 +104,59 @@ func (gmt GraphMerkleTree) Validate() error { return nil } + +func (m *ContentHash_RawV2) Validate() error { + err := validateHash(m.Hash, m.DigestAlgorithm) + if err != nil { + return err + } + + ext := m.FileExtension + extLen := len(ext) + if extLen < 2 { + return sdkerrors.ErrInvalidRequest.Wrapf("file extension cannot be shorter than 2 characters") + } + + if extLen > 6 { + return sdkerrors.ErrInvalidRequest.Wrapf("file extension cannot be longer than 6 characters") + } + + // check that ext is all lowercase or numeric + for _, c := range ext { + if c < '0' || c > '9' && c < 'a' || c > 'z' { + return sdkerrors.ErrInvalidRequest.Wrapf("file extension must be all lowercase or numeric") + } + } + + return nil +} + +func (m *ContentHash_GraphV2) Validate() error { + err := validateHash(m.Hash, m.DigestAlgorithm) + if err != nil { + return err + } + + if m.CanonicalizationAlgorithm == 0 { + return sdkerrors.ErrInvalidRequest.Wrapf("canonicalization algorithm cannot be empty") + } + + return nil +} + +func validateHash(hash []byte, digestAlgorithm uint32) error { + hashLen := len(hash) + if hashLen < 20 { + return sdkerrors.ErrInvalidRequest.Wrapf("hash cannot be shorter than 20 bytes") + } + + if hashLen > 64 { + return sdkerrors.ErrInvalidRequest.Wrapf("hash cannot be longer than 64 bytes") + } + + if digestAlgorithm == 0 { + return sdkerrors.ErrInvalidRequest.Wrapf("digest algorithm cannot be empty") + } + + return nil +} diff --git a/x/data/types.pb.go b/x/data/types.pb.go index f6d0e05ec4..2299c4a229 100644 --- a/x/data/types.pb.go +++ b/x/data/types.pb.go @@ -50,6 +50,7 @@ func (DigestAlgorithm) EnumDescriptor() ([]byte, []int) { return fileDescriptor_a49a7c2bdb2b2846, []int{0} } +// Deprecated: use RawV2 instead. // RawMediaType defines MIME media types to be used with a ContentHash.Raw hash. type RawMediaType int32 @@ -196,6 +197,7 @@ func (GraphMerkleTree) EnumDescriptor() ([]byte, []int) { // ContentHash specifies a hash-based content identifier for a piece of data. type ContentHash struct { + // Deprecated: use RawV2 instead. // Raw specifies "raw" data which does not specify a deterministic, canonical // encoding. Users of these hashes MUST maintain a copy of the hashed data // which is preserved bit by bit. All other content encodings specify a @@ -203,11 +205,24 @@ type ContentHash struct { // variety of alternative formats for transport and encoding while maintaining // the guarantee that the canonical hash will not change. The media type for // "raw" data is defined by the MediaType enum. - Raw *ContentHash_Raw `protobuf:"bytes,1,opt,name=raw,proto3" json:"raw,omitempty"` + Raw *ContentHash_Raw `protobuf:"bytes,1,opt,name=raw,proto3" json:"raw,omitempty"` // Deprecated: Do not use. + // Deprecated: use GraphV2 instead. // Graph specifies graph data that conforms to the RDF data model. // The canonicalization algorithm used for an RDF graph is specified by // GraphCanonicalizationAlgorithm. - Graph *ContentHash_Graph `protobuf:"bytes,2,opt,name=graph,proto3" json:"graph,omitempty"` + Graph *ContentHash_Graph `protobuf:"bytes,2,opt,name=graph,proto3" json:"graph,omitempty"` // Deprecated: Do not use. + // raw_v2 specifies "raw" data which does not specify a deterministic, canonical + // encoding. Users of these hashes MUST maintain a copy of the hashed data + // which is preserved bit by bit. All other content encodings specify a + // deterministic, canonical encoding allowing implementations to choose from a + // variety of alternative formats for transport and encoding while maintaining + // the guarantee that the canonical hash will not change. The media type for + // "raw" data is defined by the MediaType enum. + RawV2 *ContentHash_RawV2 `protobuf:"bytes,3,opt,name=raw_v2,json=rawV2,proto3" json:"raw_v2,omitempty"` + // graph_v2 specifies graph data that conforms to the RDF data model. + // The canonicalization algorithm used for an RDF graph is specified by + // GraphCanonicalizationAlgorithm. + GraphV2 *ContentHash_GraphV2 `protobuf:"bytes,4,opt,name=graph_v2,json=graphV2,proto3" json:"graph_v2,omitempty"` } func (m *ContentHash) Reset() { *m = ContentHash{} } @@ -243,6 +258,7 @@ func (m *ContentHash) XXX_DiscardUnknown() { var xxx_messageInfo_ContentHash proto.InternalMessageInfo +// Deprecated: Do not use. func (m *ContentHash) GetRaw() *ContentHash_Raw { if m != nil { return m.Raw @@ -250,6 +266,7 @@ func (m *ContentHash) GetRaw() *ContentHash_Raw { return nil } +// Deprecated: Do not use. func (m *ContentHash) GetGraph() *ContentHash_Graph { if m != nil { return m.Graph @@ -257,6 +274,20 @@ func (m *ContentHash) GetGraph() *ContentHash_Graph { return nil } +func (m *ContentHash) GetRawV2() *ContentHash_RawV2 { + if m != nil { + return m.RawV2 + } + return nil +} + +func (m *ContentHash) GetGraphV2() *ContentHash_GraphV2 { + if m != nil { + return m.GraphV2 + } + return nil +} + // Raw is the content hash type used for raw data. type ContentHash_Raw struct { // hash represents the hash of the data based on the specified @@ -397,6 +428,156 @@ func (m *ContentHash_Graph) GetMerkleTree() GraphMerkleTree { return GraphMerkleTree_GRAPH_MERKLE_TREE_NONE_UNSPECIFIED } +// RawV2 is the content hash type used for raw data. +type ContentHash_RawV2 struct { + // hash represents the hash of the data based on the specified + // digest_algorithm. It must be at least 20 bytes long and at most 64 bytes long. + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + // digest_algorithm represents the hash digest algorithm and should be a non-zero value from the DigestAlgorithm enum. + DigestAlgorithm uint32 `protobuf:"varint,2,opt,name=digest_algorithm,json=digestAlgorithm,proto3" json:"digest_algorithm,omitempty"` + // file_extension represents the file extension for raw data. It can be + // must be between 2-6 characters long, must be all lower-case and should represent + // the canonical extension for the media type. + // + // A list of canonical extensions which should be used is provided here + // and SHOULD be used by implementations: txt, json, csv, xml, pdf, tiff, + // jpg, png, svg, webp, avif, gif, apng, mpeg, mp4, webm, ogg, heic, raw. + // + // The above list should be updated as new media types come into common usage + // especially when there are two or more possible extensions (i.e. jpg vs jpeg or tif vs tiff). + FileExtension string `protobuf:"bytes,3,opt,name=file_extension,json=fileExtension,proto3" json:"file_extension,omitempty"` +} + +func (m *ContentHash_RawV2) Reset() { *m = ContentHash_RawV2{} } +func (m *ContentHash_RawV2) String() string { return proto.CompactTextString(m) } +func (*ContentHash_RawV2) ProtoMessage() {} +func (*ContentHash_RawV2) Descriptor() ([]byte, []int) { + return fileDescriptor_a49a7c2bdb2b2846, []int{0, 2} +} +func (m *ContentHash_RawV2) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ContentHash_RawV2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ContentHash_RawV2.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ContentHash_RawV2) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContentHash_RawV2.Merge(m, src) +} +func (m *ContentHash_RawV2) XXX_Size() int { + return m.Size() +} +func (m *ContentHash_RawV2) XXX_DiscardUnknown() { + xxx_messageInfo_ContentHash_RawV2.DiscardUnknown(m) +} + +var xxx_messageInfo_ContentHash_RawV2 proto.InternalMessageInfo + +func (m *ContentHash_RawV2) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + +func (m *ContentHash_RawV2) GetDigestAlgorithm() uint32 { + if m != nil { + return m.DigestAlgorithm + } + return 0 +} + +func (m *ContentHash_RawV2) GetFileExtension() string { + if m != nil { + return m.FileExtension + } + return "" +} + +// GraphV2 is the content hash type used for RDF graph data. +type ContentHash_GraphV2 struct { + // hash represents the hash of the data based on the specified + // digest_algorithm. It must be at least 20 bytes long and at most 64 bytes long. + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + // digest_algorithm represents the hash digest algorithm and should be a non-zero value from the DigestAlgorithm enum. + DigestAlgorithm uint32 `protobuf:"varint,2,opt,name=digest_algorithm,json=digestAlgorithm,proto3" json:"digest_algorithm,omitempty"` + // graph_canonicalization_algorithm represents the RDF graph + // canonicalization algorithm and should be a non-zero value from the GraphCanonicalizationAlgorithm enum. + CanonicalizationAlgorithm uint32 `protobuf:"varint,3,opt,name=canonicalization_algorithm,json=canonicalizationAlgorithm,proto3" json:"canonicalization_algorithm,omitempty"` + // merkle_tree is the merkle tree type used for the graph hash, if any and should be a value from the GraphMerkleTree enum + // or left unspecified. + MerkleTree uint32 `protobuf:"varint,4,opt,name=merkle_tree,json=merkleTree,proto3" json:"merkle_tree,omitempty"` +} + +func (m *ContentHash_GraphV2) Reset() { *m = ContentHash_GraphV2{} } +func (m *ContentHash_GraphV2) String() string { return proto.CompactTextString(m) } +func (*ContentHash_GraphV2) ProtoMessage() {} +func (*ContentHash_GraphV2) Descriptor() ([]byte, []int) { + return fileDescriptor_a49a7c2bdb2b2846, []int{0, 3} +} +func (m *ContentHash_GraphV2) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ContentHash_GraphV2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ContentHash_GraphV2.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ContentHash_GraphV2) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContentHash_GraphV2.Merge(m, src) +} +func (m *ContentHash_GraphV2) XXX_Size() int { + return m.Size() +} +func (m *ContentHash_GraphV2) XXX_DiscardUnknown() { + xxx_messageInfo_ContentHash_GraphV2.DiscardUnknown(m) +} + +var xxx_messageInfo_ContentHash_GraphV2 proto.InternalMessageInfo + +func (m *ContentHash_GraphV2) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + +func (m *ContentHash_GraphV2) GetDigestAlgorithm() uint32 { + if m != nil { + return m.DigestAlgorithm + } + return 0 +} + +func (m *ContentHash_GraphV2) GetCanonicalizationAlgorithm() uint32 { + if m != nil { + return m.CanonicalizationAlgorithm + } + return 0 +} + +func (m *ContentHash_GraphV2) GetMerkleTree() uint32 { + if m != nil { + return m.MerkleTree + } + return 0 +} + // ContentHashes contains list of content ContentHash. type ContentHashes struct { // data is a list of content hashes which the resolver claims to serve. @@ -451,55 +632,65 @@ func init() { proto.RegisterType((*ContentHash)(nil), "regen.data.v1.ContentHash") proto.RegisterType((*ContentHash_Raw)(nil), "regen.data.v1.ContentHash.Raw") proto.RegisterType((*ContentHash_Graph)(nil), "regen.data.v1.ContentHash.Graph") + proto.RegisterType((*ContentHash_RawV2)(nil), "regen.data.v1.ContentHash.RawV2") + proto.RegisterType((*ContentHash_GraphV2)(nil), "regen.data.v1.ContentHash.GraphV2") proto.RegisterType((*ContentHashes)(nil), "regen.data.v1.ContentHashes") } func init() { proto.RegisterFile("regen/data/v1/types.proto", fileDescriptor_a49a7c2bdb2b2846) } var fileDescriptor_a49a7c2bdb2b2846 = []byte{ - // 670 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xcd, 0x72, 0xd2, 0x40, - 0x1c, 0x27, 0x85, 0x3a, 0xe3, 0x9f, 0x7e, 0xac, 0x5b, 0x6d, 0x29, 0x6a, 0x06, 0x71, 0xc6, 0xe9, - 0x30, 0x6d, 0x68, 0xd1, 0x76, 0x46, 0x2f, 0x4e, 0x80, 0x90, 0xa6, 0x25, 0x21, 0xb3, 0xa4, 0x1f, - 0xf6, 0x92, 0xd9, 0xc2, 0x0e, 0x30, 0x85, 0x84, 0x09, 0xb1, 0x58, 0x8f, 0x3e, 0x81, 0x17, 0xef, - 0x3e, 0x83, 0x4f, 0xe1, 0xb1, 0x07, 0x0f, 0x1e, 0x9d, 0xf6, 0x45, 0x1c, 0x16, 0xab, 0x34, 0x6e, - 0xeb, 0xc9, 0xdb, 0xe6, 0xf7, 0xf5, 0xff, 0x4d, 0xf6, 0x03, 0x96, 0x03, 0xd6, 0x62, 0x5e, 0xbe, - 0x49, 0x43, 0x9a, 0x3f, 0xdd, 0xc8, 0x87, 0x67, 0x7d, 0x36, 0x50, 0xfa, 0x81, 0x1f, 0xfa, 0x78, - 0x96, 0x53, 0xca, 0x88, 0x52, 0x4e, 0x37, 0xb2, 0x5f, 0x12, 0x90, 0x2c, 0xf9, 0x5e, 0xc8, 0xbc, - 0x70, 0x9b, 0x0e, 0xda, 0x78, 0x1d, 0xe2, 0x01, 0x1d, 0xa6, 0xa4, 0x8c, 0xb4, 0x92, 0x2c, 0xc8, - 0xca, 0x35, 0xb1, 0x32, 0x21, 0x54, 0x08, 0x1d, 0x92, 0x91, 0x14, 0x6f, 0xc1, 0x74, 0x2b, 0xa0, - 0xfd, 0x76, 0x6a, 0x8a, 0x7b, 0x32, 0xb7, 0x78, 0xf4, 0x91, 0x8e, 0x8c, 0xe5, 0xe9, 0xcf, 0x12, - 0xc4, 0x09, 0x1d, 0x62, 0x0c, 0x89, 0x36, 0x1d, 0xb4, 0xf9, 0xc8, 0x19, 0xc2, 0xd7, 0xd8, 0x00, - 0xd4, 0xec, 0xb4, 0xd8, 0x20, 0x74, 0x69, 0xb7, 0xe5, 0x07, 0x9d, 0xb0, 0xdd, 0xe3, 0xf1, 0x73, - 0x7f, 0x55, 0x2a, 0x73, 0x99, 0x7a, 0xa5, 0x22, 0xf3, 0xcd, 0xeb, 0x00, 0x7e, 0x05, 0xd0, 0x63, - 0xcd, 0x0e, 0x75, 0x47, 0x3f, 0x21, 0x15, 0xe7, 0x21, 0x0f, 0x23, 0x21, 0x84, 0x0e, 0xcd, 0x91, - 0xc6, 0x39, 0xeb, 0x33, 0x72, 0xb7, 0x77, 0xb5, 0x4c, 0x7f, 0x9a, 0x82, 0x69, 0xde, 0xf9, 0x7f, - 0x97, 0xec, 0x42, 0xba, 0x41, 0x3d, 0xdf, 0xeb, 0x34, 0x68, 0xb7, 0xf3, 0x9e, 0x86, 0x1d, 0xdf, - 0x9b, 0x08, 0x1d, 0x97, 0x5e, 0x8b, 0x84, 0xf2, 0x62, 0xa5, 0x88, 0xeb, 0xcf, 0x8c, 0xe5, 0xc6, - 0x4d, 0x14, 0x7e, 0x0d, 0xc9, 0x1e, 0x0b, 0x4e, 0xba, 0xcc, 0x0d, 0x03, 0xc6, 0x52, 0x09, 0x61, - 0x67, 0x1e, 0x6f, 0x72, 0x99, 0x13, 0x30, 0x46, 0xa0, 0xf7, 0x7b, 0x9d, 0x25, 0x30, 0x3b, 0xb1, - 0xad, 0x6c, 0x80, 0x55, 0x98, 0x6b, 0x8c, 0x01, 0xb7, 0xcd, 0x91, 0x94, 0x94, 0x89, 0xaf, 0x24, - 0x0b, 0xe9, 0x9b, 0x0f, 0x03, 0x99, 0x6d, 0x4c, 0x46, 0xe4, 0xf6, 0x60, 0x3e, 0xf2, 0x9b, 0x70, - 0x06, 0x1e, 0x95, 0x0d, 0x5d, 0xab, 0x3b, 0xae, 0x5a, 0xd5, 0x6b, 0xc4, 0x70, 0xb6, 0x4d, 0x77, - 0xcf, 0xaa, 0xdb, 0x5a, 0xc9, 0xa8, 0x18, 0x5a, 0x19, 0xc5, 0x84, 0x8a, 0x62, 0x55, 0xdd, 0xd5, - 0x0a, 0x45, 0xb7, 0xb0, 0xb9, 0x85, 0xa4, 0xdc, 0xb7, 0x38, 0xcc, 0x4c, 0x6e, 0x2f, 0x96, 0x21, - 0x4d, 0xd4, 0x03, 0xd7, 0xd4, 0xca, 0x86, 0xea, 0x3a, 0x6f, 0x6c, 0x2d, 0x12, 0xf9, 0x18, 0x96, - 0x23, 0xbc, 0xa3, 0x1d, 0x3a, 0xae, 0x5d, 0x55, 0x0d, 0x0b, 0x49, 0x78, 0x09, 0x16, 0x22, 0xf4, - 0x4e, 0xbd, 0x66, 0xa1, 0x29, 0xbc, 0x08, 0x38, 0x42, 0x94, 0xea, 0xfb, 0x28, 0x2e, 0xc0, 0x0f, - 0xcd, 0x2a, 0x4a, 0x08, 0x70, 0xbb, 0x5c, 0x41, 0xd3, 0x82, 0x01, 0x8e, 0x51, 0xa9, 0x20, 0x24, - 0x30, 0xec, 0xd8, 0x3a, 0xba, 0x27, 0x0a, 0xb2, 0x74, 0x84, 0x05, 0x78, 0x7d, 0x5f, 0x47, 0x0b, - 0x82, 0x01, 0x07, 0x5a, 0xd1, 0x46, 0xf7, 0x05, 0x84, 0xba, 0x6f, 0x54, 0xd0, 0x03, 0x41, 0x92, - 0x6e, 0x54, 0xd0, 0xa2, 0xc8, 0x30, 0x1a, 0xbd, 0x24, 0x20, 0x4c, 0x5b, 0xd3, 0x51, 0x46, 0x90, - 0x64, 0xda, 0x2f, 0xd0, 0x13, 0x71, 0x27, 0x13, 0x65, 0x05, 0x86, 0x9a, 0xae, 0xa3, 0xa7, 0xb9, - 0x0f, 0x12, 0xc8, 0xb7, 0x5f, 0x00, 0xbc, 0x0e, 0xab, 0x3a, 0x51, 0xed, 0x6d, 0xb7, 0xa4, 0x5a, - 0x35, 0xcb, 0x28, 0xa9, 0x55, 0xe3, 0x48, 0x75, 0x8c, 0x9a, 0x75, 0xe3, 0x69, 0x52, 0x20, 0xf7, - 0x6f, 0x07, 0x29, 0x5b, 0x6a, 0x61, 0x7d, 0x63, 0x13, 0x49, 0xb9, 0x97, 0x30, 0x1f, 0xb9, 0x25, - 0xf8, 0x19, 0x64, 0xc7, 0x11, 0xa6, 0x46, 0x76, 0xab, 0x9a, 0xeb, 0x10, 0x4d, 0x73, 0xad, 0x9a, - 0x15, 0x39, 0x65, 0xc5, 0xca, 0xd7, 0x0b, 0x59, 0x3a, 0xbf, 0x90, 0xa5, 0x1f, 0x17, 0xb2, 0xf4, - 0xf1, 0x52, 0x8e, 0x9d, 0x5f, 0xca, 0xb1, 0xef, 0x97, 0x72, 0xec, 0x68, 0xb5, 0xd5, 0x09, 0xdb, - 0x6f, 0x8f, 0x95, 0x86, 0xdf, 0xcb, 0xf3, 0xcb, 0xb3, 0xe6, 0xb1, 0x70, 0xe8, 0x07, 0x27, 0xbf, - 0xbe, 0xba, 0xac, 0xd9, 0x62, 0x41, 0xfe, 0x1d, 0x7f, 0xdc, 0x8f, 0xef, 0xf0, 0x47, 0xfd, 0xf9, - 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x76, 0x18, 0xcf, 0xc5, 0xf1, 0x05, 0x00, 0x00, + // 787 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcf, 0x93, 0xda, 0x54, + 0x1c, 0x27, 0xb0, 0x74, 0xed, 0x97, 0xc2, 0x3e, 0x5f, 0xb5, 0x65, 0x51, 0x23, 0xe2, 0xe8, 0x54, + 0xa6, 0x0d, 0xdd, 0xd8, 0xea, 0xd8, 0x99, 0x8e, 0x13, 0x20, 0x64, 0xd3, 0x92, 0x90, 0x79, 0xa4, + 0xb4, 0xf6, 0x92, 0x79, 0x85, 0x27, 0x64, 0x0a, 0x09, 0x13, 0xe2, 0xd2, 0x7a, 0xf4, 0x2f, 0xf0, + 0xe2, 0xdd, 0xa3, 0x7f, 0x8a, 0x07, 0x0f, 0x3d, 0x78, 0xf0, 0xe8, 0xec, 0xfe, 0x23, 0x4e, 0x1e, + 0x5d, 0xa5, 0xe1, 0xb1, 0x1c, 0x9c, 0x9e, 0x78, 0x7c, 0x3f, 0x3f, 0xbe, 0x3f, 0xf2, 0x4d, 0x1e, + 0x1c, 0x46, 0x6c, 0xcc, 0x82, 0xc6, 0x88, 0xc6, 0xb4, 0x71, 0x72, 0xd4, 0x88, 0x5f, 0xce, 0xd9, + 0x42, 0x99, 0x47, 0x61, 0x1c, 0xe2, 0x22, 0x87, 0x94, 0x04, 0x52, 0x4e, 0x8e, 0x6a, 0x7f, 0xec, + 0x43, 0xa1, 0x15, 0x06, 0x31, 0x0b, 0xe2, 0x63, 0xba, 0x98, 0xe0, 0x3b, 0x90, 0x8b, 0xe8, 0xb2, + 0x2c, 0x55, 0xa5, 0x1b, 0x05, 0x55, 0x56, 0xde, 0x20, 0x2b, 0x6b, 0x44, 0x85, 0xd0, 0x65, 0x33, + 0x5b, 0x96, 0x48, 0x42, 0xc7, 0xf7, 0x20, 0x3f, 0x8e, 0xe8, 0x7c, 0x52, 0xce, 0x72, 0x5d, 0xf5, + 0x02, 0x9d, 0x91, 0xf0, 0xb8, 0x72, 0x25, 0xc1, 0x5f, 0xc3, 0xa5, 0x88, 0x2e, 0xbd, 0x13, 0xb5, + 0x9c, 0xdb, 0x29, 0x26, 0x74, 0x39, 0x50, 0x49, 0x3e, 0x4a, 0x7e, 0xf0, 0x7d, 0x78, 0x87, 0x3b, + 0x24, 0xd2, 0x3d, 0x2e, 0xad, 0xed, 0xca, 0x3b, 0x50, 0xc9, 0xfe, 0x78, 0x75, 0xa8, 0xfc, 0x2a, + 0x41, 0x8e, 0xd0, 0x25, 0xc6, 0xb0, 0x37, 0xa1, 0x8b, 0x09, 0x6f, 0xf9, 0x0a, 0xe1, 0x67, 0x6c, + 0x02, 0x1a, 0xf9, 0x63, 0xb6, 0x88, 0x3d, 0x3a, 0x1d, 0x87, 0x91, 0x1f, 0x4f, 0x66, 0xbc, 0xb5, + 0xd2, 0xc6, 0x48, 0xda, 0x9c, 0xa6, 0x9d, 0xb3, 0xc8, 0xc1, 0xe8, 0xcd, 0x00, 0xbe, 0x07, 0x30, + 0x63, 0x23, 0x9f, 0x7a, 0xc9, 0x43, 0xe0, 0x2d, 0x96, 0xd4, 0x0f, 0x52, 0x26, 0x84, 0x2e, 0xad, + 0x84, 0xe3, 0xbe, 0x9c, 0x33, 0x72, 0x79, 0x76, 0x7e, 0xac, 0xfc, 0x92, 0x85, 0x3c, 0xaf, 0xfb, + 0x6d, 0x17, 0x39, 0x85, 0xca, 0x90, 0x06, 0x61, 0xe0, 0x0f, 0xe9, 0xd4, 0xff, 0x91, 0xc6, 0x7e, + 0x18, 0xac, 0x99, 0xae, 0x8a, 0xbe, 0x95, 0x32, 0xe5, 0x85, 0xb5, 0x52, 0xaa, 0xff, 0x72, 0x1c, + 0x0e, 0xb7, 0x41, 0xf8, 0x5b, 0x28, 0xcc, 0x58, 0xf4, 0x7c, 0xca, 0xbc, 0x38, 0x62, 0x8c, 0x3f, + 0xbb, 0xcd, 0x9a, 0xb9, 0xbd, 0xc5, 0x69, 0x6e, 0xc4, 0x18, 0x81, 0xd9, 0xbf, 0xe7, 0xca, 0x0c, + 0xf2, 0x7c, 0x13, 0x84, 0x63, 0xf9, 0x62, 0xcb, 0x58, 0x8a, 0x9b, 0x6d, 0x7f, 0x06, 0xa5, 0xef, + 0xfd, 0x29, 0xf3, 0xd8, 0x8b, 0x98, 0x05, 0x0b, 0x3f, 0x0c, 0x78, 0xab, 0x97, 0x49, 0x31, 0x89, + 0xea, 0xe7, 0xc1, 0xca, 0x6f, 0x12, 0xec, 0xbf, 0x5e, 0x9f, 0xff, 0x9b, 0xf1, 0xfe, 0xce, 0x41, + 0x17, 0x2f, 0x9a, 0xdc, 0xc7, 0x9b, 0x93, 0x2b, 0xae, 0x4f, 0xa6, 0x46, 0xa0, 0xb8, 0xb6, 0xf4, + 0x6c, 0x81, 0x35, 0x28, 0x0d, 0x57, 0x01, 0x6f, 0xc2, 0x23, 0x65, 0xa9, 0x9a, 0xbb, 0x51, 0x50, + 0x2b, 0xdb, 0x5f, 0x15, 0x52, 0x1c, 0xae, 0x5b, 0xd4, 0x1f, 0xc1, 0x41, 0x6a, 0x81, 0x70, 0x15, + 0x3e, 0x6c, 0x9b, 0x86, 0xde, 0x77, 0x3d, 0xad, 0x6b, 0xf4, 0x88, 0xe9, 0x1e, 0x5b, 0xde, 0x23, + 0xbb, 0xef, 0xe8, 0x2d, 0xb3, 0x63, 0xea, 0x6d, 0x94, 0x11, 0x32, 0x9a, 0x5d, 0xed, 0xa1, 0xae, + 0x36, 0x3d, 0xf5, 0xee, 0x57, 0x48, 0xaa, 0xff, 0x99, 0x83, 0x2b, 0xeb, 0x8b, 0x8f, 0x65, 0xa8, + 0x10, 0xed, 0xb1, 0x67, 0xe9, 0x6d, 0x53, 0xf3, 0xdc, 0xef, 0x1c, 0x3d, 0x65, 0xf9, 0x11, 0x1c, + 0xa6, 0x70, 0x57, 0x7f, 0xe2, 0x7a, 0x4e, 0x57, 0x33, 0x6d, 0x24, 0xe1, 0xeb, 0x70, 0x35, 0x05, + 0x3f, 0xe8, 0xf7, 0x6c, 0x94, 0xc5, 0xd7, 0x00, 0xa7, 0x80, 0x56, 0x7f, 0x80, 0x72, 0x82, 0xf8, + 0x13, 0xab, 0x8b, 0xf6, 0x04, 0x71, 0xa7, 0xdd, 0x41, 0x79, 0x41, 0x02, 0xd7, 0xec, 0x74, 0x10, + 0x12, 0x08, 0x1e, 0x38, 0x06, 0x7a, 0x57, 0x64, 0x64, 0x1b, 0x08, 0x0b, 0xe2, 0xfd, 0x81, 0x81, + 0xae, 0x0a, 0x12, 0x3c, 0xd6, 0x9b, 0x0e, 0x7a, 0x4f, 0x00, 0x68, 0x03, 0xb3, 0x83, 0xde, 0x17, + 0x38, 0x19, 0x66, 0x07, 0x5d, 0x13, 0x09, 0x92, 0xd4, 0xd7, 0x05, 0x80, 0xe5, 0xe8, 0x06, 0xaa, + 0x0a, 0x9c, 0x2c, 0xe7, 0x0e, 0xfa, 0x44, 0x5c, 0x93, 0x85, 0x6a, 0x02, 0x41, 0xcf, 0x30, 0xd0, + 0xa7, 0xf5, 0x9f, 0x24, 0x90, 0x2f, 0xfe, 0x34, 0xe0, 0xdb, 0x70, 0xd3, 0x20, 0x9a, 0x73, 0xec, + 0xb5, 0x34, 0xbb, 0x67, 0x9b, 0x2d, 0xad, 0x6b, 0x3e, 0xd5, 0x5c, 0xb3, 0x67, 0x6f, 0xdd, 0x26, + 0x05, 0xea, 0xbb, 0x15, 0xa4, 0x6d, 0x6b, 0xea, 0xed, 0xa3, 0xbb, 0x48, 0xaa, 0x7f, 0x03, 0x07, + 0xa9, 0xef, 0x07, 0xfe, 0x1c, 0x6a, 0x2b, 0x0b, 0x4b, 0x27, 0x0f, 0xbb, 0xba, 0xe7, 0x12, 0x5d, + 0xf7, 0xec, 0x9e, 0x9d, 0xda, 0xb2, 0x66, 0xe7, 0xf7, 0x53, 0x59, 0x7a, 0x75, 0x2a, 0x4b, 0x7f, + 0x9f, 0xca, 0xd2, 0xcf, 0x67, 0x72, 0xe6, 0xd5, 0x99, 0x9c, 0xf9, 0xeb, 0x4c, 0xce, 0x3c, 0xbd, + 0x39, 0xf6, 0xe3, 0xc9, 0x0f, 0xcf, 0x94, 0x61, 0x38, 0x6b, 0xf0, 0x97, 0xe7, 0x56, 0xc0, 0xe2, + 0x65, 0x18, 0x3d, 0x7f, 0xfd, 0x6f, 0xca, 0x46, 0x63, 0x16, 0x35, 0x5e, 0xf0, 0x6b, 0xf7, 0xd9, + 0x25, 0x7e, 0xdd, 0x7e, 0xf9, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xce, 0x99, 0x58, 0xe9, 0x8b, + 0x07, 0x00, 0x00, } func (m *ContentHash) Marshal() (dAtA []byte, err error) { @@ -522,6 +713,30 @@ func (m *ContentHash) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.GraphV2 != nil { + { + size, err := m.GraphV2.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.RawV2 != nil { + { + size, err := m.RawV2.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } if m.Graph != nil { { size, err := m.Graph.MarshalToSizedBuffer(dAtA[:i]) @@ -634,6 +849,93 @@ func (m *ContentHash_Graph) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ContentHash_RawV2) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContentHash_RawV2) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ContentHash_RawV2) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.FileExtension) > 0 { + i -= len(m.FileExtension) + copy(dAtA[i:], m.FileExtension) + i = encodeVarintTypes(dAtA, i, uint64(len(m.FileExtension))) + i-- + dAtA[i] = 0x1a + } + if m.DigestAlgorithm != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.DigestAlgorithm)) + i-- + dAtA[i] = 0x10 + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ContentHash_GraphV2) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContentHash_GraphV2) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ContentHash_GraphV2) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MerkleTree != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.MerkleTree)) + i-- + dAtA[i] = 0x20 + } + if m.CanonicalizationAlgorithm != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.CanonicalizationAlgorithm)) + i-- + dAtA[i] = 0x18 + } + if m.DigestAlgorithm != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.DigestAlgorithm)) + i-- + dAtA[i] = 0x10 + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *ContentHashes) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -696,6 +998,14 @@ func (m *ContentHash) Size() (n int) { l = m.Graph.Size() n += 1 + l + sovTypes(uint64(l)) } + if m.RawV2 != nil { + l = m.RawV2.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.GraphV2 != nil { + l = m.GraphV2.Size() + n += 1 + l + sovTypes(uint64(l)) + } return n } @@ -740,6 +1050,48 @@ func (m *ContentHash_Graph) Size() (n int) { return n } +func (m *ContentHash_RawV2) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.DigestAlgorithm != 0 { + n += 1 + sovTypes(uint64(m.DigestAlgorithm)) + } + l = len(m.FileExtension) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *ContentHash_GraphV2) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.DigestAlgorithm != 0 { + n += 1 + sovTypes(uint64(m.DigestAlgorithm)) + } + if m.CanonicalizationAlgorithm != 0 { + n += 1 + sovTypes(uint64(m.CanonicalizationAlgorithm)) + } + if m.MerkleTree != 0 { + n += 1 + sovTypes(uint64(m.MerkleTree)) + } + return n +} + func (m *ContentHashes) Size() (n int) { if m == nil { return 0 @@ -862,26 +1214,98 @@ func (m *ContentHash) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RawV2", wireType) } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RawV2 == nil { + m.RawV2 = &ContentHash_RawV2{} + } + if err := m.RawV2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GraphV2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GraphV2 == nil { + m.GraphV2 = &ContentHash_GraphV2{} + } + if err := m.GraphV2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } func (m *ContentHash_Raw) Unmarshal(dAtA []byte) error { l := len(dAtA) @@ -1146,6 +1570,282 @@ func (m *ContentHash_Graph) Unmarshal(dAtA []byte) error { } return nil } +func (m *ContentHash_RawV2) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RawV2: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RawV2: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DigestAlgorithm", wireType) + } + m.DigestAlgorithm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DigestAlgorithm |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FileExtension", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FileExtension = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContentHash_GraphV2) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GraphV2: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GraphV2: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DigestAlgorithm", wireType) + } + m.DigestAlgorithm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DigestAlgorithm |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CanonicalizationAlgorithm", wireType) + } + m.CanonicalizationAlgorithm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CanonicalizationAlgorithm |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MerkleTree", wireType) + } + m.MerkleTree = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MerkleTree |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *ContentHashes) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From d7a80d1dfb94e2e9cec3a21fbe923f1936ac8ae5 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Thu, 7 Dec 2023 13:55:30 -0500 Subject: [PATCH 03/20] update proto files, validation, parsing and tests --- api/regen/data/v1/types.pulsar.go | 3 + proto/regen/data/v1/types.proto | 3 + x/data/features/types_content_hash.feature | 4 +- x/data/iri.go | 167 +++++++++++------ x/data/iri_test.go | 208 ++++++++++++++++++++- x/data/types.go | 20 +- x/data/types.pb.go | 3 + 7 files changed, 346 insertions(+), 62 deletions(-) diff --git a/api/regen/data/v1/types.pulsar.go b/api/regen/data/v1/types.pulsar.go index eebcdd0b06..593c562e12 100644 --- a/api/regen/data/v1/types.pulsar.go +++ b/api/regen/data/v1/types.pulsar.go @@ -3633,6 +3633,9 @@ func (GraphMerkleTree) EnumDescriptor() ([]byte, []int) { } // ContentHash specifies a hash-based content identifier for a piece of data. +// Exactly one of its fields must be set so this message behaves like a oneof. +// A protobuf oneof was not used because this caused compatibility issues with +// amino signing. type ContentHash struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/proto/regen/data/v1/types.proto b/proto/regen/data/v1/types.proto index 2a263dddc3..ab59fd1f6e 100644 --- a/proto/regen/data/v1/types.proto +++ b/proto/regen/data/v1/types.proto @@ -5,6 +5,9 @@ package regen.data.v1; option go_package = "github.com/regen-network/regen-ledger/x/data"; // ContentHash specifies a hash-based content identifier for a piece of data. +// Exactly one of its fields must be set so this message behaves like a oneof. +// A protobuf oneof was not used because this caused compatibility issues with +// amino signing. message ContentHash { // Deprecated: use RawV2 instead. // Raw specifies "raw" data which does not specify a deterministic, canonical diff --git a/x/data/features/types_content_hash.feature b/x/data/features/types_content_hash.feature index d2423d0b21..430dc8ebcb 100644 --- a/x/data/features/types_content_hash.feature +++ b/x/data/features/types_content_hash.feature @@ -35,7 +35,7 @@ Feature: Types {} """ When the content hash is validated - Then expect the error "content hash must be one of raw type or graph type: invalid request" + Then expect the error "exactly one of ContentHash's fields should be set: invalid request" Scenario: an error is returned if content hash includes both raw type and graph type Given the content hash @@ -46,7 +46,7 @@ Feature: Types } """ When the content hash is validated - Then expect the error "content hash must be one of raw type or graph type: invalid request" + Then expect the error "exactly one of ContentHash's fields should be set: invalid request" Scenario: an error is returned if raw content hash is empty Given the content hash diff --git a/x/data/iri.go b/x/data/iri.go index a33fbd4e30..922e3550d2 100644 --- a/x/data/iri.go +++ b/x/data/iri.go @@ -25,13 +25,14 @@ func (ch ContentHash) ToIRI() (string, error) { const ( iriVersion0 byte = 0 + iriVersion1 byte = 1 IriPrefixRaw byte = 0 IriPrefixGraph byte = 1 ) // ToIRI converts the ContentHash_Raw to an IRI (internationalized URI) based on the following -// pattern: regen:{base58check(concat( byte(0x0), byte(digest_algorithm), hash))}.{media_type extension} +// pattern: regen:{base58check(concat( byte(0x0), byte(digest_algorithm), hash), 0)}.{media_type extension} func (chr ContentHash_Raw) ToIRI() (string, error) { err := chr.Validate() if err != nil { @@ -54,7 +55,7 @@ func (chr ContentHash_Raw) ToIRI() (string, error) { // ToIRI converts the ContentHash_Graph to an IRI (internationalized URI) based on the following // pattern: regen:{base58check(concat(byte(0x1), byte(canonicalization_algorithm), -// byte(merkle_tree), byte(digest_algorithm), hash))}.rdf +// byte(merkle_tree), byte(digest_algorithm), hash), 0)}.rdf func (chg ContentHash_Graph) ToIRI() (string, error) { err := chg.Validate() if err != nil { @@ -72,6 +73,47 @@ func (chg ContentHash_Graph) ToIRI() (string, error) { return fmt.Sprintf("regen:%s.rdf", hashStr), nil } +// ToIRI converts the ContentHash_RawV2 to an IRI (internationalized URI) based on the following +// pattern: regen:{base58check(concat( byte(0x0), byte(digest_algorithm), hash), 1)}.{file_extension} +// This is the same as ContentHash_Raw.ToIRI except that the media type is replaced with a file extension +// and the base58check version byte is 1 instead of 0. +func (chr ContentHash_RawV2) ToIRI() (string, error) { + err := chr.Validate() + if err != nil { + return "", err + } + + bz := make([]byte, len(chr.Hash)+2) + bz[0] = IriPrefixRaw + bz[1] = byte(chr.DigestAlgorithm) + copy(bz[2:], chr.Hash) + hashStr := base58.CheckEncode(bz, iriVersion1) + ext := chr.FileExtension + + return fmt.Sprintf("regen:%s.%s", hashStr, ext), nil +} + +// ToIRI converts the ContentHash_GraphV2 to an IRI (internationalized URI) based on the following +// pattern: regen:{base58check(concat(byte(0x1), byte(canonicalization_algorithm), +// byte(merkle_tree), byte(digest_algorithm), hash), 1)}.rdf +// This is the same as ContentHash_Graph.ToIRI except that the base58check version byte is 1 instead of 0. +func (chg ContentHash_GraphV2) ToIRI() (string, error) { + err := chg.Validate() + if err != nil { + return "", err + } + + bz := make([]byte, len(chg.Hash)+4) + bz[0] = IriPrefixGraph + bz[1] = byte(chg.CanonicalizationAlgorithm) + bz[2] = byte(chg.MerkleTree) + bz[3] = byte(chg.DigestAlgorithm) + copy(bz[4:], chg.Hash) + hashStr := base58.CheckEncode(bz, iriVersion1) + + return fmt.Sprintf("regen:%s.rdf", hashStr), nil +} + // ToExtension converts the media type to a file extension based on the mediaTypeExtensions map. func (rmt RawMediaType) ToExtension() (string, error) { ext, ok := mediaExtensionTypeToString[rmt] @@ -138,10 +180,6 @@ func ParseIRI(iri string) (*ContentHash, error) { return nil, ErrInvalidIRI.Wrapf("failed to parse IRI %s: %s", iri, err) } - if version != iriVersion0 { - return nil, ErrInvalidIRI.Wrapf("failed to parse IRI %s: invalid version", iri) - } - rdr := bytes.NewBuffer(res) // read first byte @@ -159,25 +197,36 @@ func ParseIRI(iri string) (*ContentHash, error) { return nil, err } - // look up extension as media type - mediaType, ok := stringToMediaExtensionType[ext] - if !ok { - return nil, ErrInvalidMediaExtension.Wrapf("failed to resolve media type for extension %s, expected %s", ext, mediaExtensionTypeToString[mediaType]) - } - - // interpret next byte as digest algorithm - digestAlg := DigestAlgorithm(b0) hash := rdr.Bytes() - err = digestAlg.Validate(hash) - if err != nil { - return nil, err - } - return &ContentHash{Raw: &ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: digestAlg, - MediaType: mediaType, - }}, nil + if version == iriVersion0 { + // look up extension as media type + mediaType, ok := stringToMediaExtensionType[ext] + if !ok { + return nil, ErrInvalidMediaExtension.Wrapf("failed to resolve media type for extension %s, expected %s", ext, mediaExtensionTypeToString[mediaType]) + } + + // interpret next byte as digest algorithm + digestAlg := DigestAlgorithm(b0) + err = digestAlg.Validate(hash) + if err != nil { + return nil, err + } + + return &ContentHash{Raw: &ContentHash_Raw{ + Hash: hash, + DigestAlgorithm: digestAlg, + MediaType: mediaType, + }}, nil + } else if version == iriVersion1 { + return &ContentHash{RawV2: &ContentHash_RawV2{ + Hash: hash, + DigestAlgorithm: uint32(b0), + FileExtension: ext, + }}, nil + } else { + return nil, ErrInvalidIRI.Wrapf("failed to parse IRI %s: invalid version %d", iri, version) + } case IriPrefixGraph: // rdf extension is expected for graph data @@ -185,52 +234,60 @@ func ParseIRI(iri string) (*ContentHash, error) { return nil, ErrInvalidIRI.Wrapf("invalid extension .%s for graph data, expected .rdf", ext) } - // read next byte - b0, err := rdr.ReadByte() - if err != nil { - return nil, err - } - - // interpret next byte as canonicalization algorithm - c14Alg := GraphCanonicalizationAlgorithm(b0) - err = c14Alg.Validate() + // read canonicalization algorithm + bC14NAlg, err := rdr.ReadByte() if err != nil { return nil, err } - // read next byte - b0, err = rdr.ReadByte() + // read merkle tree algorithm + bMtAlg, err := rdr.ReadByte() if err != nil { return nil, err } - // interpret next byte as merklization algorithm - mtAlg := GraphMerkleTree(b0) - err = mtAlg.Validate() + // read digest algorithm + bDigestAlg, err := rdr.ReadByte() if err != nil { return nil, err } - // read next byte - b0, err = rdr.ReadByte() - if err != nil { - return nil, err - } - - // interpret next byte as digest algorithm - digestAlg := DigestAlgorithm(b0) + // read hash hash := rdr.Bytes() - err = digestAlg.Validate(hash) - if err != nil { - return nil, err - } - return &ContentHash{Graph: &ContentHash_Graph{ - Hash: hash, - DigestAlgorithm: digestAlg, - CanonicalizationAlgorithm: c14Alg, - MerkleTree: mtAlg, - }}, nil + if version == iriVersion0 { + c14Alg := GraphCanonicalizationAlgorithm(bC14NAlg) + err = c14Alg.Validate() + if err != nil { + return nil, err + } + + mtAlg := GraphMerkleTree(bMtAlg) + err = mtAlg.Validate() + if err != nil { + return nil, err + } + + digestAlg := DigestAlgorithm(bDigestAlg) + err = digestAlg.Validate(hash) + if err != nil { + return nil, err + } + + return &ContentHash{Graph: &ContentHash_Graph{ + Hash: hash, + DigestAlgorithm: digestAlg, + CanonicalizationAlgorithm: c14Alg, + MerkleTree: mtAlg, + }}, nil + } else if version == iriVersion1 { + return &ContentHash{GraphV2: &ContentHash_GraphV2{ + Hash: hash, + DigestAlgorithm: uint32(bC14NAlg), + CanonicalizationAlgorithm: uint32(bMtAlg), + MerkleTree: uint32(bDigestAlg), + }}, nil + } } return nil, ErrInvalidIRI.Wrapf("unable to parse IRI %s", iri) diff --git a/x/data/iri_test.go b/x/data/iri_test.go index 13c9a72745..8d5a4ee907 100644 --- a/x/data/iri_test.go +++ b/x/data/iri_test.go @@ -3,6 +3,7 @@ package data import ( "testing" + "github.com/btcsuite/btcutil/base58" "gotest.tools/v3/assert" "github.com/stretchr/testify/require" @@ -36,6 +37,96 @@ func TestContentHash_Graph_ToIRI(t *testing.T) { } } +func TestContentHash_GraphV2_ToIRI(t *testing.T) { + hash := []byte("abcdefghijklmnopqrstuvwxyz123456") + + tests := []struct { + name string + chg ContentHash_GraphV2 + wantErr bool + want string + }{ + { + "valid graph", + ContentHash_GraphV2{ + Hash: hash, + DigestAlgorithm: 2, + CanonicalizationAlgorithm: 2, + MerkleTree: 1, + }, + false, + "regen:DmfXHjEnP3uLFNcmtf9bpLSrFEycVCcVUnWeGAkf4nm8DUcSFmZVu1G.rdf", + }, + { + "hash too short", + ContentHash_GraphV2{ + Hash: []byte("abc"), + DigestAlgorithm: 2, + CanonicalizationAlgorithm: 2, + MerkleTree: 1, + }, + true, + "", + }, + { + "hash too long", + ContentHash_GraphV2{ + Hash: []byte("abcdefghijklmnopqrstuvwxyz1234567abcdefghijklmnopqrstuvwxyz1234567"), + DigestAlgorithm: 2, + CanonicalizationAlgorithm: 2, + MerkleTree: 1, + }, + true, + "", + }, + { + "missing digest algorithm", + ContentHash_GraphV2{ + Hash: hash, + DigestAlgorithm: 0, + CanonicalizationAlgorithm: 1, + MerkleTree: 0, + }, + true, + "", + }, + { + "missing canonicalization algorithm", + ContentHash_GraphV2{ + Hash: hash, + DigestAlgorithm: 1, + CanonicalizationAlgorithm: 0, + MerkleTree: 0, + }, + true, + "", + }, + + { + "no merkle tree", + ContentHash_GraphV2{ + Hash: hash, + DigestAlgorithm: 1, + CanonicalizationAlgorithm: 1, + MerkleTree: 0, + }, + false, + "regen:DmesGgF6jDGJtVc7mS9mSKKFZcCsuTMEHPqvwSBk5bk3F8ggh46e2kr.rdf", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + iri, err := tt.chg.ToIRI() + if tt.wantErr { + require.Error(t, err) + } else { + require.NoError(t, err) + assert.Equal(t, iri, tt.want) + } + }) + } +} + func TestContentHash_Raw_ToIRI(t *testing.T) { hash := []byte("abcdefghijklmnopqrstuvwxyz123456") @@ -216,6 +307,89 @@ func TestContentHash_Raw_ToIRI(t *testing.T) { } } +func TestContentHash_RawV2_ToIRI(t *testing.T) { + hash := []byte("abcdefghijklmnopqrstuvwxyz123456") + + tests := []struct { + name string + chr ContentHash_RawV2 + wantErr bool + want string + }{ + { + "valid raw data", + ContentHash_RawV2{ + Hash: hash, + DigestAlgorithm: 2, + FileExtension: "jpg", + }, + false, + "regen:esX3kDj4ThAkgemoPDzMGQ8xqVdwnDrNLnEaXt3tFPsrDXdY5tKz.jpg", + }, + { + "hash too short", + ContentHash_RawV2{ + Hash: []byte("abc"), + DigestAlgorithm: 2, + FileExtension: "jpg", + }, + true, + "", + }, + { + "hash too long", + ContentHash_RawV2{ + Hash: []byte("abcdefghijklmnopqrstuvwxyz1234567abcdefghijklmnopqrstuvwxyz1234567"), + DigestAlgorithm: 2, + FileExtension: "jpg", + }, + true, + "", + }, + { + "missing digest algorithm", + ContentHash_RawV2{ + Hash: hash, + DigestAlgorithm: 0, + FileExtension: "jpg", + }, + true, + "", + }, + { + "ext too short", + ContentHash_RawV2{ + Hash: hash, + DigestAlgorithm: 2, + FileExtension: "j", + }, + true, + "", + }, + { + "ext too long", + ContentHash_RawV2{ + Hash: hash, + DigestAlgorithm: 2, + FileExtension: "abcdefg", + }, + true, + "", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + iri, err := tt.chr.ToIRI() + if tt.wantErr { + require.Error(t, err) + } else { + require.NoError(t, err) + assert.Equal(t, iri, tt.want) + } + }) + } +} + func TestMediaType_ToExtension(t *testing.T) { // ensure every valid media type has an extension for mt := range RawMediaType_name { @@ -252,9 +426,9 @@ func TestParseIRI(t *testing.T) { wantErr: "failed to parse IRI regen:23toVgf5aZqSVSeJQv562xkkeoe3rr3bJWa29PHVKVf77VAkVMcDvVd.rdf: checksum error: invalid IRI", }, { - name: "invalid version", - iri: "regen:esV713VcRqk5TWxDgKQjGSpN4aXL4a9XTzbWRduCMQDqq2zo3TtX.rdf", - wantErr: "failed to parse IRI regen:esV713VcRqk5TWxDgKQjGSpN4aXL4a9XTzbWRduCMQDqq2zo3TtX.rdf: invalid version: invalid IRI", + name: "invalid version 2", + iri: "regen:2JjvXNMjuFCHGuzLsFiTM5133moxKmhZd964sfvbS3uA3umsR8XFa.rdf", + wantErr: "failed to parse IRI regen:2JjvXNMjuFCHGuzLsFiTM5133moxKmhZd964sfvbS3uA3umsR8XFa.rdf: invalid version 2: invalid IRI", }, { name: "invalid media extension", @@ -433,6 +607,25 @@ func TestParseIRI(t *testing.T) { CanonicalizationAlgorithm: GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015, }}, }, + { + name: "valid graph v2", + iri: "regen:DmfXHjEnP3uLFNcmtf9bpLSrFEycVCcVUnWeGAkf4nm8DUcSFmZVu1G.rdf", + wantHash: &ContentHash{GraphV2: &ContentHash_GraphV2{ + Hash: hash, + DigestAlgorithm: 2, + CanonicalizationAlgorithm: 1, + MerkleTree: 2, + }}, + }, + { + name: "valid raw v2", + iri: "regen:esX3kDj4ThAkgemoPDzMGQ8xqVdwnDrNLnEaXt3tFPsrDXdY5tKz.jpg", + wantHash: &ContentHash{RawV2: &ContentHash_RawV2{ + Hash: hash, + DigestAlgorithm: 2, + FileExtension: "jpg", + }}, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -445,3 +638,12 @@ func TestParseIRI(t *testing.T) { }) } } + +func TestName(t *testing.T) { + bz, ver, err := base58.CheckDecode("esV713VcRqk5TWxDgKQjGSpN4aXL4a9XTzbWRduCMQDqq2zo3TtX") + require.NoError(t, err) + t.Logf("version: %d", ver) + t.Logf("bz: %x", bz) + res := base58.CheckEncode(bz, 2) + t.Logf("res: %s", res) +} diff --git a/x/data/types.go b/x/data/types.go index 5585dad094..662fde343d 100644 --- a/x/data/types.go +++ b/x/data/types.go @@ -16,9 +16,25 @@ func (ch ContentHash) Validate() error { hashRawV2 := ch.GetRawV2() hashGraphV2 := ch.GetGraphV2() + // check that only one of the fields is set + nonNilCount := 0 + if hashRaw != nil { + nonNilCount++ + } + if hashGraph != nil { + nonNilCount++ + } + if hashRawV2 != nil { + nonNilCount++ + } + if hashGraphV2 != nil { + nonNilCount++ + } + if nonNilCount != 1 { + return sdkerrors.ErrInvalidRequest.Wrapf("exactly one of ContentHash's fields should be set") + } + switch { - case hashRaw != nil && hashGraph != nil && hashRawV2 != nil && hashGraphV2 != nil: - return sdkerrors.ErrInvalidRequest.Wrapf("content hash must be one of raw type or graph type") case hashRaw != nil: return hashRaw.Validate() case hashGraph != nil: diff --git a/x/data/types.pb.go b/x/data/types.pb.go index 2299c4a229..39417e93de 100644 --- a/x/data/types.pb.go +++ b/x/data/types.pb.go @@ -196,6 +196,9 @@ func (GraphMerkleTree) EnumDescriptor() ([]byte, []int) { } // ContentHash specifies a hash-based content identifier for a piece of data. +// Exactly one of its fields must be set so this message behaves like a oneof. +// A protobuf oneof was not used because this caused compatibility issues with +// amino signing. type ContentHash struct { // Deprecated: use RawV2 instead. // Raw specifies "raw" data which does not specify a deterministic, canonical From 1976375ba9f9a227e0e6ca24cc26f48ca56a4906 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Thu, 7 Dec 2023 13:58:47 -0500 Subject: [PATCH 04/20] update docs --- api/regen/data/v1/types.pulsar.go | 14 +++++++++++++- proto/regen/data/v1/types.proto | 14 +++++++++++++- x/data/types.pb.go | 14 +++++++++++++- 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/api/regen/data/v1/types.pulsar.go b/api/regen/data/v1/types.pulsar.go index 593c562e12..1583fc4df0 100644 --- a/api/regen/data/v1/types.pulsar.go +++ b/api/regen/data/v1/types.pulsar.go @@ -3376,6 +3376,10 @@ const ( ) // DigestAlgorithm is the hash digest algorithm +// +// With V2 of raw and graph hash, this enum is no longer validated on-chain. +// However, this enum SHOULD still be used and updated as a registry of known digest +// algorithms and all implementations should coordinate on these values. type DigestAlgorithm int32 const ( @@ -3539,6 +3543,10 @@ func (RawMediaType) EnumDescriptor() ([]byte, []int) { } // GraphCanonicalizationAlgorithm is the graph canonicalization algorithm +// +// With V2 of the graph hash, this enum is no longer validated on-chain. +// However, this enum SHOULD still be used and updated as a registry of known canonicalization +// algorithms and all implementations should coordinate on these values. type GraphCanonicalizationAlgorithm int32 const ( @@ -3587,7 +3595,11 @@ func (GraphCanonicalizationAlgorithm) EnumDescriptor() ([]byte, []int) { return file_regen_data_v1_types_proto_rawDescGZIP(), []int{2} } -// GraphMerkleTree is the graph merkle tree type used for hashing, if any +// GraphMerkleTree is the graph merkle tree type used for hashing, if any. +// +// With V2 of the graph hash, this enum is no longer validated on-chain. +// However, this enum SHOULD still be used and updated as a registry of known merkle tree +// types and all implementations should coordinate on these values. type GraphMerkleTree int32 const ( diff --git a/proto/regen/data/v1/types.proto b/proto/regen/data/v1/types.proto index ab59fd1f6e..ba2549f5a2 100644 --- a/proto/regen/data/v1/types.proto +++ b/proto/regen/data/v1/types.proto @@ -111,6 +111,10 @@ message ContentHash { } // DigestAlgorithm is the hash digest algorithm +// +// With V2 of raw and graph hash, this enum is no longer validated on-chain. +// However, this enum SHOULD still be used and updated as a registry of known digest +// algorithms and all implementations should coordinate on these values. enum DigestAlgorithm { // unspecified and invalid DIGEST_ALGORITHM_UNSPECIFIED = 0; @@ -184,6 +188,10 @@ enum RawMediaType { } // GraphCanonicalizationAlgorithm is the graph canonicalization algorithm +// +// With V2 of the graph hash, this enum is no longer validated on-chain. +// However, this enum SHOULD still be used and updated as a registry of known canonicalization +// algorithms and all implementations should coordinate on these values. enum GraphCanonicalizationAlgorithm { // unspecified and invalid GRAPH_CANONICALIZATION_ALGORITHM_UNSPECIFIED = 0; @@ -192,7 +200,11 @@ enum GraphCanonicalizationAlgorithm { GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015 = 1; } -// GraphMerkleTree is the graph merkle tree type used for hashing, if any +// GraphMerkleTree is the graph merkle tree type used for hashing, if any. +// +// With V2 of the graph hash, this enum is no longer validated on-chain. +// However, this enum SHOULD still be used and updated as a registry of known merkle tree +// types and all implementations should coordinate on these values. enum GraphMerkleTree { // unspecified and valid GRAPH_MERKLE_TREE_NONE_UNSPECIFIED = 0; diff --git a/x/data/types.pb.go b/x/data/types.pb.go index 39417e93de..faf85d47f7 100644 --- a/x/data/types.pb.go +++ b/x/data/types.pb.go @@ -23,6 +23,10 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // DigestAlgorithm is the hash digest algorithm +// +// With V2 of raw and graph hash, this enum is no longer validated on-chain. +// However, this enum SHOULD still be used and updated as a registry of known digest +// algorithms and all implementations should coordinate on these values. type DigestAlgorithm int32 const ( @@ -144,6 +148,10 @@ func (RawMediaType) EnumDescriptor() ([]byte, []int) { } // GraphCanonicalizationAlgorithm is the graph canonicalization algorithm +// +// With V2 of the graph hash, this enum is no longer validated on-chain. +// However, this enum SHOULD still be used and updated as a registry of known canonicalization +// algorithms and all implementations should coordinate on these values. type GraphCanonicalizationAlgorithm int32 const ( @@ -171,7 +179,11 @@ func (GraphCanonicalizationAlgorithm) EnumDescriptor() ([]byte, []int) { return fileDescriptor_a49a7c2bdb2b2846, []int{2} } -// GraphMerkleTree is the graph merkle tree type used for hashing, if any +// GraphMerkleTree is the graph merkle tree type used for hashing, if any. +// +// With V2 of the graph hash, this enum is no longer validated on-chain. +// However, this enum SHOULD still be used and updated as a registry of known merkle tree +// types and all implementations should coordinate on these values. type GraphMerkleTree int32 const ( From 80a164a05a66935ddc5debec378fdefc1b0ae3fe Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Thu, 7 Dec 2023 14:08:59 -0500 Subject: [PATCH 05/20] lint --- x/data/types.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/x/data/types.go b/x/data/types.go index 662fde343d..0852804a76 100644 --- a/x/data/types.go +++ b/x/data/types.go @@ -121,13 +121,13 @@ func (gmt GraphMerkleTree) Validate() error { return nil } -func (m *ContentHash_RawV2) Validate() error { - err := validateHash(m.Hash, m.DigestAlgorithm) +func (chr *ContentHash_RawV2) Validate() error { + err := validateHash(chr.Hash, chr.DigestAlgorithm) if err != nil { return err } - ext := m.FileExtension + ext := chr.FileExtension extLen := len(ext) if extLen < 2 { return sdkerrors.ErrInvalidRequest.Wrapf("file extension cannot be shorter than 2 characters") @@ -147,13 +147,13 @@ func (m *ContentHash_RawV2) Validate() error { return nil } -func (m *ContentHash_GraphV2) Validate() error { - err := validateHash(m.Hash, m.DigestAlgorithm) +func (chg *ContentHash_GraphV2) Validate() error { + err := validateHash(chg.Hash, chg.DigestAlgorithm) if err != nil { return err } - if m.CanonicalizationAlgorithm == 0 { + if chg.CanonicalizationAlgorithm == 0 { return sdkerrors.ErrInvalidRequest.Wrapf("canonicalization algorithm cannot be empty") } From cdb86d9ea702656764512bb854ae77dba183a745 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Tue, 12 Dec 2023 10:14:14 -0500 Subject: [PATCH 06/20] cleanup --- x/data/iri_test.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/x/data/iri_test.go b/x/data/iri_test.go index 8d5a4ee907..029fdf2683 100644 --- a/x/data/iri_test.go +++ b/x/data/iri_test.go @@ -3,7 +3,6 @@ package data import ( "testing" - "github.com/btcsuite/btcutil/base58" "gotest.tools/v3/assert" "github.com/stretchr/testify/require" @@ -638,12 +637,3 @@ func TestParseIRI(t *testing.T) { }) } } - -func TestName(t *testing.T) { - bz, ver, err := base58.CheckDecode("esV713VcRqk5TWxDgKQjGSpN4aXL4a9XTzbWRduCMQDqq2zo3TtX") - require.NoError(t, err) - t.Logf("version: %d", ver) - t.Logf("bz: %x", bz) - res := base58.CheckEncode(bz, 2) - t.Logf("res: %s", res) -} From 9f132073215ee5d3efcb98ac0e0b05ea523a9950 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Tue, 12 Dec 2023 10:14:51 -0500 Subject: [PATCH 07/20] Update proto/regen/data/v1/types.proto Co-authored-by: Marie Gauthier --- proto/regen/data/v1/types.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/regen/data/v1/types.proto b/proto/regen/data/v1/types.proto index ba2549f5a2..18866905c7 100644 --- a/proto/regen/data/v1/types.proto +++ b/proto/regen/data/v1/types.proto @@ -78,7 +78,7 @@ message ContentHash { // digest_algorithm represents the hash digest algorithm and should be a non-zero value from the DigestAlgorithm enum. uint32 digest_algorithm = 2; - // file_extension represents the file extension for raw data. It can be + // file_extension represents the file extension for raw data. It // must be between 2-6 characters long, must be all lower-case and should represent // the canonical extension for the media type. // From 7270f63fd5ebbf9ffbc97b518dbf322c0d78944f Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Tue, 12 Dec 2023 12:31:25 -0500 Subject: [PATCH 08/20] migrate data to v2 --- api/regen/data/v1/doc.pulsar.go | 2 +- api/regen/data/v1/types.pulsar.go | 29 +- api/regen/data/v2/doc.pulsar.go | 84 + api/regen/data/v2/events.pulsar.go | 2104 +++ api/regen/data/v2/query.pulsar.go | 14297 ++++++++++++++++ api/regen/data/v2/query_grpc.pb.go | 507 + api/regen/data/v2/state.cosmos_orm.go | 777 + api/regen/data/v2/state.pulsar.go | 3013 ++++ api/regen/data/v2/tx.pulsar.go | 4628 +++++ api/regen/data/v2/tx_grpc.pb.go | 284 + api/regen/data/v2/types.pulsar.go | 2694 +++ app/app.go | 4 +- app/simulation/app_import_export_test.go | 2 +- app/testsuite/modules_test.go | 2 +- app/upgrades/v5_0/upgrade.go | 2 +- go.mod | 4 +- proto/regen/data/v1/doc.proto | 4 +- proto/regen/data/v1/events.proto | 2 - proto/regen/data/v1/query.proto | 2 - proto/regen/data/v1/state.proto | 2 - proto/regen/data/v1/tx.proto | 2 - proto/regen/data/v1/types.proto | 31 +- proto/regen/data/v2/doc.proto | 14 + proto/regen/data/v2/events.proto | 41 + proto/regen/data/v2/query.proto | 357 + proto/regen/data/v2/state.proto | 91 + proto/regen/data/v2/tx.proto | 150 + proto/regen/data/v2/types.proto | 108 + x/data/client/query.go | 2 +- x/data/client/testsuite/grpc.go | 2 +- x/data/client/testsuite/query.go | 4 +- x/data/client/testsuite/tx.go | 4 +- x/data/client/testsuite/util.go | 2 +- x/data/client/tx.go | 2 +- x/data/client/util.go | 2 +- x/data/doc.pb.go | 17 +- x/data/events.pb.go | 30 +- x/data/features/msg_anchor.feature | 3 +- x/data/features/msg_register_resolver.feature | 3 +- x/data/features/types_content_hash.feature | 115 +- x/data/genesis/genesis.go | 2 +- x/data/genesis/genesis_test.go | 2 +- x/data/go.mod | 2 +- x/data/iri.go | 142 +- x/data/iri_test.go | 463 +- x/data/module/module.go | 10 +- x/data/query.pb.go | 168 +- x/data/query.pb.gw.go | 42 +- x/data/server/msg_anchor.go | 2 +- x/data/server/msg_anchor_test.go | 2 +- x/data/server/msg_attest.go | 2 +- x/data/server/msg_attest_test.go | 2 +- x/data/server/msg_define_resolver.go | 2 +- x/data/server/msg_define_resolver_test.go | 2 +- x/data/server/msg_register_resolver.go | 2 +- x/data/server/msg_register_resolver_test.go | 2 +- x/data/server/query_anchor_by_hash.go | 2 +- x/data/server/query_anchor_by_hash_test.go | 2 +- x/data/server/query_anchor_by_iri.go | 2 +- x/data/server/query_anchor_by_iri_test.go | 2 +- .../server/query_attestations_by_attestor.go | 2 +- .../query_attestations_by_attestor_test.go | 2 +- x/data/server/query_attestations_by_hash.go | 2 +- .../server/query_attestations_by_hash_test.go | 2 +- x/data/server/query_attestations_by_iri.go | 2 +- .../server/query_attestations_by_iri_test.go | 2 +- x/data/server/query_convert_hash_to_iri.go | 2 +- .../server/query_convert_hash_to_iri_test.go | 2 +- x/data/server/query_convert_iri_to_hash.go | 2 +- .../server/query_convert_iri_to_hash_test.go | 2 +- x/data/server/query_resolver.go | 2 +- x/data/server/query_resolver_test.go | 2 +- x/data/server/query_resolvers_by_hash.go | 2 +- x/data/server/query_resolvers_by_hash_test.go | 2 +- x/data/server/query_resolvers_by_iri.go | 2 +- x/data/server/query_resolvers_by_iri_test.go | 2 +- x/data/server/query_resolvers_by_url.go | 2 +- x/data/server/query_resolvers_by_url_test.go | 2 +- x/data/server/server.go | 4 +- x/data/server/server_test.go | 2 +- x/data/server/testsuite/genesis.go | 2 +- x/data/server/testsuite/suite.go | 2 +- x/data/server/testsuite/suite_test.go | 4 +- x/data/simulation/genesis.go | 4 +- x/data/simulation/operations.go | 2 +- x/data/state.pb.go | 84 +- x/data/tx.pb.go | 138 +- x/data/types.go | 107 +- x/data/types.pb.go | 1056 +- x/data/types_test.go | 4 + 90 files changed, 29704 insertions(+), 2019 deletions(-) create mode 100644 api/regen/data/v2/doc.pulsar.go create mode 100644 api/regen/data/v2/events.pulsar.go create mode 100644 api/regen/data/v2/query.pulsar.go create mode 100644 api/regen/data/v2/query_grpc.pb.go create mode 100644 api/regen/data/v2/state.cosmos_orm.go create mode 100644 api/regen/data/v2/state.pulsar.go create mode 100644 api/regen/data/v2/tx.pulsar.go create mode 100644 api/regen/data/v2/tx_grpc.pb.go create mode 100644 api/regen/data/v2/types.pulsar.go create mode 100644 proto/regen/data/v2/doc.proto create mode 100644 proto/regen/data/v2/events.proto create mode 100644 proto/regen/data/v2/query.proto create mode 100644 proto/regen/data/v2/state.proto create mode 100644 proto/regen/data/v2/tx.proto create mode 100644 proto/regen/data/v2/types.proto diff --git a/api/regen/data/v1/doc.pulsar.go b/api/regen/data/v1/doc.pulsar.go index 0731b0abf5..e3581e122e 100644 --- a/api/regen/data/v1/doc.pulsar.go +++ b/api/regen/data/v1/doc.pulsar.go @@ -19,7 +19,7 @@ import ( // relation to tagged releases in regen-network/regen-ledger: // // - Revision 0: v4.0.0 (api/v1.0.0, x/data/v1.0.0) -// - Revision 1: (in progress) +// - Revision 1: v5.0.0 (api/v2.0.0, x/data/v2.0.0) // const ( diff --git a/api/regen/data/v1/types.pulsar.go b/api/regen/data/v1/types.pulsar.go index 1583fc4df0..7ab0110b47 100644 --- a/api/regen/data/v1/types.pulsar.go +++ b/api/regen/data/v1/types.pulsar.go @@ -3376,10 +3376,6 @@ const ( ) // DigestAlgorithm is the hash digest algorithm -// -// With V2 of raw and graph hash, this enum is no longer validated on-chain. -// However, this enum SHOULD still be used and updated as a registry of known digest -// algorithms and all implementations should coordinate on these values. type DigestAlgorithm int32 const ( @@ -3543,10 +3539,6 @@ func (RawMediaType) EnumDescriptor() ([]byte, []int) { } // GraphCanonicalizationAlgorithm is the graph canonicalization algorithm -// -// With V2 of the graph hash, this enum is no longer validated on-chain. -// However, this enum SHOULD still be used and updated as a registry of known canonicalization -// algorithms and all implementations should coordinate on these values. type GraphCanonicalizationAlgorithm int32 const ( @@ -3595,11 +3587,7 @@ func (GraphCanonicalizationAlgorithm) EnumDescriptor() ([]byte, []int) { return file_regen_data_v1_types_proto_rawDescGZIP(), []int{2} } -// GraphMerkleTree is the graph merkle tree type used for hashing, if any. -// -// With V2 of the graph hash, this enum is no longer validated on-chain. -// However, this enum SHOULD still be used and updated as a registry of known merkle tree -// types and all implementations should coordinate on these values. +// GraphMerkleTree is the graph merkle tree type used for hashing, if any type GraphMerkleTree int32 const ( @@ -3645,9 +3633,6 @@ func (GraphMerkleTree) EnumDescriptor() ([]byte, []int) { } // ContentHash specifies a hash-based content identifier for a piece of data. -// Exactly one of its fields must be set so this message behaves like a oneof. -// A protobuf oneof was not used because this caused compatibility issues with -// amino signing. type ContentHash struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3901,12 +3886,12 @@ type ContentHash_RawV2 struct { unknownFields protoimpl.UnknownFields // hash represents the hash of the data based on the specified - // digest_algorithm. It must be at least 20 bytes long and at most 64 bytes long. + // digest_algorithm. Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - // digest_algorithm represents the hash digest algorithm and should be a non-zero value from the DigestAlgorithm enum. + // digest_algorithm represents the hash digest algorithm. DigestAlgorithm uint32 `protobuf:"varint,2,opt,name=digest_algorithm,json=digestAlgorithm,proto3" json:"digest_algorithm,omitempty"` // file_extension represents the file extension for raw data. It can be - // must be between 2-6 characters long, must be all lower-case and should represent + // up to six characters long, must be all lower-case and should represent // the canonical extension for the media type. // // A list of canonical extensions which should be used is provided here @@ -3966,12 +3951,12 @@ type ContentHash_GraphV2 struct { unknownFields protoimpl.UnknownFields // hash represents the hash of the data based on the specified - // digest_algorithm. It must be at least 20 bytes long and at most 64 bytes long. + // digest_algorithm. Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - // digest_algorithm represents the hash digest algorithm and should be a non-zero value from the DigestAlgorithm enum. + // digest_algorithm represents the hash digest algorithm and should be a value from the DigestAlgorithm enum. DigestAlgorithm uint32 `protobuf:"varint,2,opt,name=digest_algorithm,json=digestAlgorithm,proto3" json:"digest_algorithm,omitempty"` // graph_canonicalization_algorithm represents the RDF graph - // canonicalization algorithm and should be a non-zero value from the GraphCanonicalizationAlgorithm enum. + // canonicalization algorithm and should be a value from the GraphCanonicalizationAlgorithm enum. CanonicalizationAlgorithm uint32 `protobuf:"varint,3,opt,name=canonicalization_algorithm,json=canonicalizationAlgorithm,proto3" json:"canonicalization_algorithm,omitempty"` // merkle_tree is the merkle tree type used for the graph hash, if any and should be a value from the GraphMerkleTree enum // or left unspecified. diff --git a/api/regen/data/v2/doc.pulsar.go b/api/regen/data/v2/doc.pulsar.go new file mode 100644 index 0000000000..d0778e6046 --- /dev/null +++ b/api/regen/data/v2/doc.pulsar.go @@ -0,0 +1,84 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package datav2 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" +) + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: regen/data/v2/doc.proto + +// regen.data.v2 describes the API for the data module. +// +// The following outlines revisions and tagged versions of the compiled code in +// relation to tagged releases in regen-network/regen-ledger: +// +// - Revision 0: v4.0.0 (api/v1.0.0, x/data/v1.0.0) +// - Revision 1: v5.0.0 (api/v2.0.0, x/data/v2.0.0) +// - Revision 2: in progress +// + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var File_regen_data_v2_doc_proto protoreflect.FileDescriptor + +var file_regen_data_v2_doc_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x32, 0x2f, + 0x64, 0x6f, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x72, 0x65, 0x67, 0x65, 0x6e, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x42, 0xb3, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, + 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x42, 0x08, + 0x44, 0x6f, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, + 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, + 0x2f, 0x76, 0x32, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x58, + 0xaa, 0x02, 0x0d, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x32, + 0xca, 0x02, 0x0d, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x5c, 0x56, 0x32, + 0xe2, 0x02, 0x19, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x5c, 0x56, 0x32, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x52, + 0x65, 0x67, 0x65, 0x6e, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_regen_data_v2_doc_proto_goTypes = []interface{}{} +var file_regen_data_v2_doc_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_regen_data_v2_doc_proto_init() } +func file_regen_data_v2_doc_proto_init() { + if File_regen_data_v2_doc_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_regen_data_v2_doc_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_regen_data_v2_doc_proto_goTypes, + DependencyIndexes: file_regen_data_v2_doc_proto_depIdxs, + }.Build() + File_regen_data_v2_doc_proto = out.File + file_regen_data_v2_doc_proto_rawDesc = nil + file_regen_data_v2_doc_proto_goTypes = nil + file_regen_data_v2_doc_proto_depIdxs = nil +} diff --git a/api/regen/data/v2/events.pulsar.go b/api/regen/data/v2/events.pulsar.go new file mode 100644 index 0000000000..5499f0fd9f --- /dev/null +++ b/api/regen/data/v2/events.pulsar.go @@ -0,0 +1,2104 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package datav2 + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_EventAnchor protoreflect.MessageDescriptor + fd_EventAnchor_iri protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_events_proto_init() + md_EventAnchor = File_regen_data_v2_events_proto.Messages().ByName("EventAnchor") + fd_EventAnchor_iri = md_EventAnchor.Fields().ByName("iri") +} + +var _ protoreflect.Message = (*fastReflection_EventAnchor)(nil) + +type fastReflection_EventAnchor EventAnchor + +func (x *EventAnchor) ProtoReflect() protoreflect.Message { + return (*fastReflection_EventAnchor)(x) +} + +func (x *EventAnchor) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_events_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_EventAnchor_messageType fastReflection_EventAnchor_messageType +var _ protoreflect.MessageType = fastReflection_EventAnchor_messageType{} + +type fastReflection_EventAnchor_messageType struct{} + +func (x fastReflection_EventAnchor_messageType) Zero() protoreflect.Message { + return (*fastReflection_EventAnchor)(nil) +} +func (x fastReflection_EventAnchor_messageType) New() protoreflect.Message { + return new(fastReflection_EventAnchor) +} +func (x fastReflection_EventAnchor_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EventAnchor +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EventAnchor) Descriptor() protoreflect.MessageDescriptor { + return md_EventAnchor +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_EventAnchor) Type() protoreflect.MessageType { + return _fastReflection_EventAnchor_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EventAnchor) New() protoreflect.Message { + return new(fastReflection_EventAnchor) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EventAnchor) Interface() protoreflect.ProtoMessage { + return (*EventAnchor)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_EventAnchor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Iri != "" { + value := protoreflect.ValueOfString(x.Iri) + if !f(fd_EventAnchor_iri, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_EventAnchor) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.EventAnchor.iri": + return x.Iri != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.EventAnchor")) + } + panic(fmt.Errorf("message regen.data.v2.EventAnchor does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventAnchor) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.EventAnchor.iri": + x.Iri = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.EventAnchor")) + } + panic(fmt.Errorf("message regen.data.v2.EventAnchor does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_EventAnchor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.EventAnchor.iri": + value := x.Iri + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.EventAnchor")) + } + panic(fmt.Errorf("message regen.data.v2.EventAnchor does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventAnchor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.EventAnchor.iri": + x.Iri = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.EventAnchor")) + } + panic(fmt.Errorf("message regen.data.v2.EventAnchor does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventAnchor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.EventAnchor.iri": + panic(fmt.Errorf("field iri of message regen.data.v2.EventAnchor is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.EventAnchor")) + } + panic(fmt.Errorf("message regen.data.v2.EventAnchor does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_EventAnchor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.EventAnchor.iri": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.EventAnchor")) + } + panic(fmt.Errorf("message regen.data.v2.EventAnchor does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_EventAnchor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.EventAnchor", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_EventAnchor) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventAnchor) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_EventAnchor) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_EventAnchor) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EventAnchor) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Iri) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*EventAnchor) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Iri) > 0 { + i -= len(x.Iri) + copy(dAtA[i:], x.Iri) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Iri))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*EventAnchor) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventAnchor: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventAnchor: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Iri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Iri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_EventAttest protoreflect.MessageDescriptor + fd_EventAttest_iri protoreflect.FieldDescriptor + fd_EventAttest_attestor protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_events_proto_init() + md_EventAttest = File_regen_data_v2_events_proto.Messages().ByName("EventAttest") + fd_EventAttest_iri = md_EventAttest.Fields().ByName("iri") + fd_EventAttest_attestor = md_EventAttest.Fields().ByName("attestor") +} + +var _ protoreflect.Message = (*fastReflection_EventAttest)(nil) + +type fastReflection_EventAttest EventAttest + +func (x *EventAttest) ProtoReflect() protoreflect.Message { + return (*fastReflection_EventAttest)(x) +} + +func (x *EventAttest) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_events_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_EventAttest_messageType fastReflection_EventAttest_messageType +var _ protoreflect.MessageType = fastReflection_EventAttest_messageType{} + +type fastReflection_EventAttest_messageType struct{} + +func (x fastReflection_EventAttest_messageType) Zero() protoreflect.Message { + return (*fastReflection_EventAttest)(nil) +} +func (x fastReflection_EventAttest_messageType) New() protoreflect.Message { + return new(fastReflection_EventAttest) +} +func (x fastReflection_EventAttest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EventAttest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EventAttest) Descriptor() protoreflect.MessageDescriptor { + return md_EventAttest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_EventAttest) Type() protoreflect.MessageType { + return _fastReflection_EventAttest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EventAttest) New() protoreflect.Message { + return new(fastReflection_EventAttest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EventAttest) Interface() protoreflect.ProtoMessage { + return (*EventAttest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_EventAttest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Iri != "" { + value := protoreflect.ValueOfString(x.Iri) + if !f(fd_EventAttest_iri, value) { + return + } + } + if x.Attestor != "" { + value := protoreflect.ValueOfString(x.Attestor) + if !f(fd_EventAttest_attestor, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_EventAttest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.EventAttest.iri": + return x.Iri != "" + case "regen.data.v2.EventAttest.attestor": + return x.Attestor != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.EventAttest")) + } + panic(fmt.Errorf("message regen.data.v2.EventAttest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventAttest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.EventAttest.iri": + x.Iri = "" + case "regen.data.v2.EventAttest.attestor": + x.Attestor = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.EventAttest")) + } + panic(fmt.Errorf("message regen.data.v2.EventAttest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_EventAttest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.EventAttest.iri": + value := x.Iri + return protoreflect.ValueOfString(value) + case "regen.data.v2.EventAttest.attestor": + value := x.Attestor + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.EventAttest")) + } + panic(fmt.Errorf("message regen.data.v2.EventAttest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventAttest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.EventAttest.iri": + x.Iri = value.Interface().(string) + case "regen.data.v2.EventAttest.attestor": + x.Attestor = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.EventAttest")) + } + panic(fmt.Errorf("message regen.data.v2.EventAttest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventAttest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.EventAttest.iri": + panic(fmt.Errorf("field iri of message regen.data.v2.EventAttest is not mutable")) + case "regen.data.v2.EventAttest.attestor": + panic(fmt.Errorf("field attestor of message regen.data.v2.EventAttest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.EventAttest")) + } + panic(fmt.Errorf("message regen.data.v2.EventAttest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_EventAttest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.EventAttest.iri": + return protoreflect.ValueOfString("") + case "regen.data.v2.EventAttest.attestor": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.EventAttest")) + } + panic(fmt.Errorf("message regen.data.v2.EventAttest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_EventAttest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.EventAttest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_EventAttest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventAttest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_EventAttest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_EventAttest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EventAttest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Iri) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Attestor) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*EventAttest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Attestor) > 0 { + i -= len(x.Attestor) + copy(dAtA[i:], x.Attestor) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Attestor))) + i-- + dAtA[i] = 0x12 + } + if len(x.Iri) > 0 { + i -= len(x.Iri) + copy(dAtA[i:], x.Iri) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Iri))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*EventAttest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventAttest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventAttest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Iri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Iri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Attestor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Attestor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_EventDefineResolver protoreflect.MessageDescriptor + fd_EventDefineResolver_id protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_events_proto_init() + md_EventDefineResolver = File_regen_data_v2_events_proto.Messages().ByName("EventDefineResolver") + fd_EventDefineResolver_id = md_EventDefineResolver.Fields().ByName("id") +} + +var _ protoreflect.Message = (*fastReflection_EventDefineResolver)(nil) + +type fastReflection_EventDefineResolver EventDefineResolver + +func (x *EventDefineResolver) ProtoReflect() protoreflect.Message { + return (*fastReflection_EventDefineResolver)(x) +} + +func (x *EventDefineResolver) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_events_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_EventDefineResolver_messageType fastReflection_EventDefineResolver_messageType +var _ protoreflect.MessageType = fastReflection_EventDefineResolver_messageType{} + +type fastReflection_EventDefineResolver_messageType struct{} + +func (x fastReflection_EventDefineResolver_messageType) Zero() protoreflect.Message { + return (*fastReflection_EventDefineResolver)(nil) +} +func (x fastReflection_EventDefineResolver_messageType) New() protoreflect.Message { + return new(fastReflection_EventDefineResolver) +} +func (x fastReflection_EventDefineResolver_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EventDefineResolver +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EventDefineResolver) Descriptor() protoreflect.MessageDescriptor { + return md_EventDefineResolver +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_EventDefineResolver) Type() protoreflect.MessageType { + return _fastReflection_EventDefineResolver_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EventDefineResolver) New() protoreflect.Message { + return new(fastReflection_EventDefineResolver) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EventDefineResolver) Interface() protoreflect.ProtoMessage { + return (*EventDefineResolver)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_EventDefineResolver) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != uint64(0) { + value := protoreflect.ValueOfUint64(x.Id) + if !f(fd_EventDefineResolver_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_EventDefineResolver) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.EventDefineResolver.id": + return x.Id != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.EventDefineResolver")) + } + panic(fmt.Errorf("message regen.data.v2.EventDefineResolver does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventDefineResolver) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.EventDefineResolver.id": + x.Id = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.EventDefineResolver")) + } + panic(fmt.Errorf("message regen.data.v2.EventDefineResolver does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_EventDefineResolver) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.EventDefineResolver.id": + value := x.Id + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.EventDefineResolver")) + } + panic(fmt.Errorf("message regen.data.v2.EventDefineResolver does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventDefineResolver) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.EventDefineResolver.id": + x.Id = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.EventDefineResolver")) + } + panic(fmt.Errorf("message regen.data.v2.EventDefineResolver does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventDefineResolver) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.EventDefineResolver.id": + panic(fmt.Errorf("field id of message regen.data.v2.EventDefineResolver is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.EventDefineResolver")) + } + panic(fmt.Errorf("message regen.data.v2.EventDefineResolver does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_EventDefineResolver) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.EventDefineResolver.id": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.EventDefineResolver")) + } + panic(fmt.Errorf("message regen.data.v2.EventDefineResolver does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_EventDefineResolver) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.EventDefineResolver", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_EventDefineResolver) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventDefineResolver) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_EventDefineResolver) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_EventDefineResolver) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EventDefineResolver) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Id != 0 { + n += 1 + runtime.Sov(uint64(x.Id)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*EventDefineResolver) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Id != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*EventDefineResolver) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventDefineResolver: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventDefineResolver: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + x.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_EventRegisterResolver protoreflect.MessageDescriptor + fd_EventRegisterResolver_id protoreflect.FieldDescriptor + fd_EventRegisterResolver_iri protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_events_proto_init() + md_EventRegisterResolver = File_regen_data_v2_events_proto.Messages().ByName("EventRegisterResolver") + fd_EventRegisterResolver_id = md_EventRegisterResolver.Fields().ByName("id") + fd_EventRegisterResolver_iri = md_EventRegisterResolver.Fields().ByName("iri") +} + +var _ protoreflect.Message = (*fastReflection_EventRegisterResolver)(nil) + +type fastReflection_EventRegisterResolver EventRegisterResolver + +func (x *EventRegisterResolver) ProtoReflect() protoreflect.Message { + return (*fastReflection_EventRegisterResolver)(x) +} + +func (x *EventRegisterResolver) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_events_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_EventRegisterResolver_messageType fastReflection_EventRegisterResolver_messageType +var _ protoreflect.MessageType = fastReflection_EventRegisterResolver_messageType{} + +type fastReflection_EventRegisterResolver_messageType struct{} + +func (x fastReflection_EventRegisterResolver_messageType) Zero() protoreflect.Message { + return (*fastReflection_EventRegisterResolver)(nil) +} +func (x fastReflection_EventRegisterResolver_messageType) New() protoreflect.Message { + return new(fastReflection_EventRegisterResolver) +} +func (x fastReflection_EventRegisterResolver_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EventRegisterResolver +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EventRegisterResolver) Descriptor() protoreflect.MessageDescriptor { + return md_EventRegisterResolver +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_EventRegisterResolver) Type() protoreflect.MessageType { + return _fastReflection_EventRegisterResolver_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EventRegisterResolver) New() protoreflect.Message { + return new(fastReflection_EventRegisterResolver) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EventRegisterResolver) Interface() protoreflect.ProtoMessage { + return (*EventRegisterResolver)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_EventRegisterResolver) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != uint64(0) { + value := protoreflect.ValueOfUint64(x.Id) + if !f(fd_EventRegisterResolver_id, value) { + return + } + } + if x.Iri != "" { + value := protoreflect.ValueOfString(x.Iri) + if !f(fd_EventRegisterResolver_iri, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_EventRegisterResolver) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.EventRegisterResolver.id": + return x.Id != uint64(0) + case "regen.data.v2.EventRegisterResolver.iri": + return x.Iri != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.EventRegisterResolver")) + } + panic(fmt.Errorf("message regen.data.v2.EventRegisterResolver does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventRegisterResolver) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.EventRegisterResolver.id": + x.Id = uint64(0) + case "regen.data.v2.EventRegisterResolver.iri": + x.Iri = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.EventRegisterResolver")) + } + panic(fmt.Errorf("message regen.data.v2.EventRegisterResolver does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_EventRegisterResolver) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.EventRegisterResolver.id": + value := x.Id + return protoreflect.ValueOfUint64(value) + case "regen.data.v2.EventRegisterResolver.iri": + value := x.Iri + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.EventRegisterResolver")) + } + panic(fmt.Errorf("message regen.data.v2.EventRegisterResolver does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventRegisterResolver) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.EventRegisterResolver.id": + x.Id = value.Uint() + case "regen.data.v2.EventRegisterResolver.iri": + x.Iri = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.EventRegisterResolver")) + } + panic(fmt.Errorf("message regen.data.v2.EventRegisterResolver does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventRegisterResolver) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.EventRegisterResolver.id": + panic(fmt.Errorf("field id of message regen.data.v2.EventRegisterResolver is not mutable")) + case "regen.data.v2.EventRegisterResolver.iri": + panic(fmt.Errorf("field iri of message regen.data.v2.EventRegisterResolver is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.EventRegisterResolver")) + } + panic(fmt.Errorf("message regen.data.v2.EventRegisterResolver does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_EventRegisterResolver) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.EventRegisterResolver.id": + return protoreflect.ValueOfUint64(uint64(0)) + case "regen.data.v2.EventRegisterResolver.iri": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.EventRegisterResolver")) + } + panic(fmt.Errorf("message regen.data.v2.EventRegisterResolver does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_EventRegisterResolver) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.EventRegisterResolver", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_EventRegisterResolver) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventRegisterResolver) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_EventRegisterResolver) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_EventRegisterResolver) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EventRegisterResolver) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Id != 0 { + n += 1 + runtime.Sov(uint64(x.Id)) + } + l = len(x.Iri) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*EventRegisterResolver) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Iri) > 0 { + i -= len(x.Iri) + copy(dAtA[i:], x.Iri) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Iri))) + i-- + dAtA[i] = 0x12 + } + if x.Id != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*EventRegisterResolver) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventRegisterResolver: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventRegisterResolver: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + x.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Iri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Iri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: regen/data/v2/events.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// EventAnchor is an event emitted when data is anchored on chain. +type EventAnchor struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // iri is the IRI of the data anchored on chain. + Iri string `protobuf:"bytes,1,opt,name=iri,proto3" json:"iri,omitempty"` +} + +func (x *EventAnchor) Reset() { + *x = EventAnchor{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_events_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventAnchor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventAnchor) ProtoMessage() {} + +// Deprecated: Use EventAnchor.ProtoReflect.Descriptor instead. +func (*EventAnchor) Descriptor() ([]byte, []int) { + return file_regen_data_v2_events_proto_rawDescGZIP(), []int{0} +} + +func (x *EventAnchor) GetIri() string { + if x != nil { + return x.Iri + } + return "" +} + +// EventAttest is an event emitted when data is attested to on chain. +type EventAttest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // iri is the IRI of the data attested to. + Iri string `protobuf:"bytes,1,opt,name=iri,proto3" json:"iri,omitempty"` + // attestor is the address of the account that has attested to the veracity of + // the data. + Attestor string `protobuf:"bytes,2,opt,name=attestor,proto3" json:"attestor,omitempty"` +} + +func (x *EventAttest) Reset() { + *x = EventAttest{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_events_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventAttest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventAttest) ProtoMessage() {} + +// Deprecated: Use EventAttest.ProtoReflect.Descriptor instead. +func (*EventAttest) Descriptor() ([]byte, []int) { + return file_regen_data_v2_events_proto_rawDescGZIP(), []int{1} +} + +func (x *EventAttest) GetIri() string { + if x != nil { + return x.Iri + } + return "" +} + +func (x *EventAttest) GetAttestor() string { + if x != nil { + return x.Attestor + } + return "" +} + +// EventDefineResolver is an event emitted when a resolved is defined on chain. +type EventDefineResolver struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // id is the ID of the defined resolver. + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *EventDefineResolver) Reset() { + *x = EventDefineResolver{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_events_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventDefineResolver) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventDefineResolver) ProtoMessage() {} + +// Deprecated: Use EventDefineResolver.ProtoReflect.Descriptor instead. +func (*EventDefineResolver) Descriptor() ([]byte, []int) { + return file_regen_data_v2_events_proto_rawDescGZIP(), []int{2} +} + +func (x *EventDefineResolver) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +// EventRegisterResolver is an event emitted when data is registered to a +// resolver on chain. +type EventRegisterResolver struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // id is the ID of the resolver that the data was registered to. + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // iri is the IRI of the data that was registered. + Iri string `protobuf:"bytes,2,opt,name=iri,proto3" json:"iri,omitempty"` +} + +func (x *EventRegisterResolver) Reset() { + *x = EventRegisterResolver{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_events_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventRegisterResolver) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventRegisterResolver) ProtoMessage() {} + +// Deprecated: Use EventRegisterResolver.ProtoReflect.Descriptor instead. +func (*EventRegisterResolver) Descriptor() ([]byte, []int) { + return file_regen_data_v2_events_proto_rawDescGZIP(), []int{3} +} + +func (x *EventRegisterResolver) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *EventRegisterResolver) GetIri() string { + if x != nil { + return x.Iri + } + return "" +} + +var File_regen_data_v2_events_proto protoreflect.FileDescriptor + +var file_regen_data_v2_events_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x32, 0x2f, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x72, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x22, 0x1f, 0x0a, 0x0b, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x41, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x72, + 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x72, 0x69, 0x22, 0x3b, 0x0a, 0x0b, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, + 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x72, 0x69, 0x12, 0x1a, 0x0a, + 0x08, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x22, 0x25, 0x0a, 0x13, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, + 0x22, 0x39, 0x0a, 0x15, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x72, 0x69, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x72, 0x69, 0x42, 0xb6, 0x01, 0x0a, 0x11, + 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, + 0x32, 0x42, 0x0b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x67, + 0x65, 0x6e, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, + 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x67, 0x65, + 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x32, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x76, 0x32, + 0xa2, 0x02, 0x03, 0x52, 0x44, 0x58, 0xaa, 0x02, 0x0d, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x44, + 0x61, 0x74, 0x61, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0d, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x44, + 0x61, 0x74, 0x61, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x19, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x44, + 0x61, 0x74, 0x61, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x0f, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, + 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_regen_data_v2_events_proto_rawDescOnce sync.Once + file_regen_data_v2_events_proto_rawDescData = file_regen_data_v2_events_proto_rawDesc +) + +func file_regen_data_v2_events_proto_rawDescGZIP() []byte { + file_regen_data_v2_events_proto_rawDescOnce.Do(func() { + file_regen_data_v2_events_proto_rawDescData = protoimpl.X.CompressGZIP(file_regen_data_v2_events_proto_rawDescData) + }) + return file_regen_data_v2_events_proto_rawDescData +} + +var file_regen_data_v2_events_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_regen_data_v2_events_proto_goTypes = []interface{}{ + (*EventAnchor)(nil), // 0: regen.data.v2.EventAnchor + (*EventAttest)(nil), // 1: regen.data.v2.EventAttest + (*EventDefineResolver)(nil), // 2: regen.data.v2.EventDefineResolver + (*EventRegisterResolver)(nil), // 3: regen.data.v2.EventRegisterResolver +} +var file_regen_data_v2_events_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_regen_data_v2_events_proto_init() } +func file_regen_data_v2_events_proto_init() { + if File_regen_data_v2_events_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_regen_data_v2_events_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventAnchor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_events_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventAttest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_events_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventDefineResolver); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_events_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventRegisterResolver); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_regen_data_v2_events_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_regen_data_v2_events_proto_goTypes, + DependencyIndexes: file_regen_data_v2_events_proto_depIdxs, + MessageInfos: file_regen_data_v2_events_proto_msgTypes, + }.Build() + File_regen_data_v2_events_proto = out.File + file_regen_data_v2_events_proto_rawDesc = nil + file_regen_data_v2_events_proto_goTypes = nil + file_regen_data_v2_events_proto_depIdxs = nil +} diff --git a/api/regen/data/v2/query.pulsar.go b/api/regen/data/v2/query.pulsar.go new file mode 100644 index 0000000000..bf23e4dab2 --- /dev/null +++ b/api/regen/data/v2/query.pulsar.go @@ -0,0 +1,14297 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package datav2 + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + v1beta1 "github.com/cosmos/cosmos-sdk/api/cosmos/base/query/v1beta1" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_QueryAnchorByIRIRequest protoreflect.MessageDescriptor + fd_QueryAnchorByIRIRequest_iri protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_QueryAnchorByIRIRequest = File_regen_data_v2_query_proto.Messages().ByName("QueryAnchorByIRIRequest") + fd_QueryAnchorByIRIRequest_iri = md_QueryAnchorByIRIRequest.Fields().ByName("iri") +} + +var _ protoreflect.Message = (*fastReflection_QueryAnchorByIRIRequest)(nil) + +type fastReflection_QueryAnchorByIRIRequest QueryAnchorByIRIRequest + +func (x *QueryAnchorByIRIRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAnchorByIRIRequest)(x) +} + +func (x *QueryAnchorByIRIRequest) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAnchorByIRIRequest_messageType fastReflection_QueryAnchorByIRIRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAnchorByIRIRequest_messageType{} + +type fastReflection_QueryAnchorByIRIRequest_messageType struct{} + +func (x fastReflection_QueryAnchorByIRIRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAnchorByIRIRequest)(nil) +} +func (x fastReflection_QueryAnchorByIRIRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAnchorByIRIRequest) +} +func (x fastReflection_QueryAnchorByIRIRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAnchorByIRIRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAnchorByIRIRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAnchorByIRIRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAnchorByIRIRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAnchorByIRIRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAnchorByIRIRequest) New() protoreflect.Message { + return new(fastReflection_QueryAnchorByIRIRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAnchorByIRIRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAnchorByIRIRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAnchorByIRIRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Iri != "" { + value := protoreflect.ValueOfString(x.Iri) + if !f(fd_QueryAnchorByIRIRequest_iri, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAnchorByIRIRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.QueryAnchorByIRIRequest.iri": + return x.Iri != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAnchorByIRIRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAnchorByIRIRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAnchorByIRIRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.QueryAnchorByIRIRequest.iri": + x.Iri = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAnchorByIRIRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAnchorByIRIRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAnchorByIRIRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.QueryAnchorByIRIRequest.iri": + value := x.Iri + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAnchorByIRIRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAnchorByIRIRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAnchorByIRIRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.QueryAnchorByIRIRequest.iri": + x.Iri = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAnchorByIRIRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAnchorByIRIRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAnchorByIRIRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryAnchorByIRIRequest.iri": + panic(fmt.Errorf("field iri of message regen.data.v2.QueryAnchorByIRIRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAnchorByIRIRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAnchorByIRIRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAnchorByIRIRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryAnchorByIRIRequest.iri": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAnchorByIRIRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAnchorByIRIRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAnchorByIRIRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.QueryAnchorByIRIRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAnchorByIRIRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAnchorByIRIRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAnchorByIRIRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAnchorByIRIRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAnchorByIRIRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Iri) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAnchorByIRIRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Iri) > 0 { + i -= len(x.Iri) + copy(dAtA[i:], x.Iri) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Iri))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAnchorByIRIRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAnchorByIRIRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAnchorByIRIRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Iri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Iri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryAnchorByIRIResponse protoreflect.MessageDescriptor + fd_QueryAnchorByIRIResponse_anchor protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_QueryAnchorByIRIResponse = File_regen_data_v2_query_proto.Messages().ByName("QueryAnchorByIRIResponse") + fd_QueryAnchorByIRIResponse_anchor = md_QueryAnchorByIRIResponse.Fields().ByName("anchor") +} + +var _ protoreflect.Message = (*fastReflection_QueryAnchorByIRIResponse)(nil) + +type fastReflection_QueryAnchorByIRIResponse QueryAnchorByIRIResponse + +func (x *QueryAnchorByIRIResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAnchorByIRIResponse)(x) +} + +func (x *QueryAnchorByIRIResponse) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAnchorByIRIResponse_messageType fastReflection_QueryAnchorByIRIResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAnchorByIRIResponse_messageType{} + +type fastReflection_QueryAnchorByIRIResponse_messageType struct{} + +func (x fastReflection_QueryAnchorByIRIResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAnchorByIRIResponse)(nil) +} +func (x fastReflection_QueryAnchorByIRIResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAnchorByIRIResponse) +} +func (x fastReflection_QueryAnchorByIRIResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAnchorByIRIResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAnchorByIRIResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAnchorByIRIResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAnchorByIRIResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAnchorByIRIResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAnchorByIRIResponse) New() protoreflect.Message { + return new(fastReflection_QueryAnchorByIRIResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAnchorByIRIResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAnchorByIRIResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAnchorByIRIResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Anchor != nil { + value := protoreflect.ValueOfMessage(x.Anchor.ProtoReflect()) + if !f(fd_QueryAnchorByIRIResponse_anchor, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAnchorByIRIResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.QueryAnchorByIRIResponse.anchor": + return x.Anchor != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAnchorByIRIResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAnchorByIRIResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAnchorByIRIResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.QueryAnchorByIRIResponse.anchor": + x.Anchor = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAnchorByIRIResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAnchorByIRIResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAnchorByIRIResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.QueryAnchorByIRIResponse.anchor": + value := x.Anchor + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAnchorByIRIResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAnchorByIRIResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAnchorByIRIResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.QueryAnchorByIRIResponse.anchor": + x.Anchor = value.Message().Interface().(*AnchorInfo) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAnchorByIRIResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAnchorByIRIResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAnchorByIRIResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryAnchorByIRIResponse.anchor": + if x.Anchor == nil { + x.Anchor = new(AnchorInfo) + } + return protoreflect.ValueOfMessage(x.Anchor.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAnchorByIRIResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAnchorByIRIResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAnchorByIRIResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryAnchorByIRIResponse.anchor": + m := new(AnchorInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAnchorByIRIResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAnchorByIRIResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAnchorByIRIResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.QueryAnchorByIRIResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAnchorByIRIResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAnchorByIRIResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAnchorByIRIResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAnchorByIRIResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAnchorByIRIResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Anchor != nil { + l = options.Size(x.Anchor) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAnchorByIRIResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Anchor != nil { + encoded, err := options.Marshal(x.Anchor) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAnchorByIRIResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAnchorByIRIResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAnchorByIRIResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Anchor", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Anchor == nil { + x.Anchor = &AnchorInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Anchor); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryAnchorByHashRequest protoreflect.MessageDescriptor + fd_QueryAnchorByHashRequest_content_hash protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_QueryAnchorByHashRequest = File_regen_data_v2_query_proto.Messages().ByName("QueryAnchorByHashRequest") + fd_QueryAnchorByHashRequest_content_hash = md_QueryAnchorByHashRequest.Fields().ByName("content_hash") +} + +var _ protoreflect.Message = (*fastReflection_QueryAnchorByHashRequest)(nil) + +type fastReflection_QueryAnchorByHashRequest QueryAnchorByHashRequest + +func (x *QueryAnchorByHashRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAnchorByHashRequest)(x) +} + +func (x *QueryAnchorByHashRequest) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAnchorByHashRequest_messageType fastReflection_QueryAnchorByHashRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAnchorByHashRequest_messageType{} + +type fastReflection_QueryAnchorByHashRequest_messageType struct{} + +func (x fastReflection_QueryAnchorByHashRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAnchorByHashRequest)(nil) +} +func (x fastReflection_QueryAnchorByHashRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAnchorByHashRequest) +} +func (x fastReflection_QueryAnchorByHashRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAnchorByHashRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAnchorByHashRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAnchorByHashRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAnchorByHashRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAnchorByHashRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAnchorByHashRequest) New() protoreflect.Message { + return new(fastReflection_QueryAnchorByHashRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAnchorByHashRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAnchorByHashRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAnchorByHashRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ContentHash != nil { + value := protoreflect.ValueOfMessage(x.ContentHash.ProtoReflect()) + if !f(fd_QueryAnchorByHashRequest_content_hash, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAnchorByHashRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.QueryAnchorByHashRequest.content_hash": + return x.ContentHash != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAnchorByHashRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAnchorByHashRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAnchorByHashRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.QueryAnchorByHashRequest.content_hash": + x.ContentHash = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAnchorByHashRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAnchorByHashRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAnchorByHashRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.QueryAnchorByHashRequest.content_hash": + value := x.ContentHash + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAnchorByHashRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAnchorByHashRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAnchorByHashRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.QueryAnchorByHashRequest.content_hash": + x.ContentHash = value.Message().Interface().(*ContentHash) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAnchorByHashRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAnchorByHashRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAnchorByHashRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryAnchorByHashRequest.content_hash": + if x.ContentHash == nil { + x.ContentHash = new(ContentHash) + } + return protoreflect.ValueOfMessage(x.ContentHash.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAnchorByHashRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAnchorByHashRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAnchorByHashRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryAnchorByHashRequest.content_hash": + m := new(ContentHash) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAnchorByHashRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAnchorByHashRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAnchorByHashRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.QueryAnchorByHashRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAnchorByHashRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAnchorByHashRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAnchorByHashRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAnchorByHashRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAnchorByHashRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.ContentHash != nil { + l = options.Size(x.ContentHash) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAnchorByHashRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.ContentHash != nil { + encoded, err := options.Marshal(x.ContentHash) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAnchorByHashRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAnchorByHashRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAnchorByHashRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ContentHash", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ContentHash == nil { + x.ContentHash = &ContentHash{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ContentHash); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryAnchorByHashResponse protoreflect.MessageDescriptor + fd_QueryAnchorByHashResponse_anchor protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_QueryAnchorByHashResponse = File_regen_data_v2_query_proto.Messages().ByName("QueryAnchorByHashResponse") + fd_QueryAnchorByHashResponse_anchor = md_QueryAnchorByHashResponse.Fields().ByName("anchor") +} + +var _ protoreflect.Message = (*fastReflection_QueryAnchorByHashResponse)(nil) + +type fastReflection_QueryAnchorByHashResponse QueryAnchorByHashResponse + +func (x *QueryAnchorByHashResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAnchorByHashResponse)(x) +} + +func (x *QueryAnchorByHashResponse) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAnchorByHashResponse_messageType fastReflection_QueryAnchorByHashResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAnchorByHashResponse_messageType{} + +type fastReflection_QueryAnchorByHashResponse_messageType struct{} + +func (x fastReflection_QueryAnchorByHashResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAnchorByHashResponse)(nil) +} +func (x fastReflection_QueryAnchorByHashResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAnchorByHashResponse) +} +func (x fastReflection_QueryAnchorByHashResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAnchorByHashResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAnchorByHashResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAnchorByHashResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAnchorByHashResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAnchorByHashResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAnchorByHashResponse) New() protoreflect.Message { + return new(fastReflection_QueryAnchorByHashResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAnchorByHashResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAnchorByHashResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAnchorByHashResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Anchor != nil { + value := protoreflect.ValueOfMessage(x.Anchor.ProtoReflect()) + if !f(fd_QueryAnchorByHashResponse_anchor, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAnchorByHashResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.QueryAnchorByHashResponse.anchor": + return x.Anchor != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAnchorByHashResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAnchorByHashResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAnchorByHashResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.QueryAnchorByHashResponse.anchor": + x.Anchor = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAnchorByHashResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAnchorByHashResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAnchorByHashResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.QueryAnchorByHashResponse.anchor": + value := x.Anchor + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAnchorByHashResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAnchorByHashResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAnchorByHashResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.QueryAnchorByHashResponse.anchor": + x.Anchor = value.Message().Interface().(*AnchorInfo) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAnchorByHashResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAnchorByHashResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAnchorByHashResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryAnchorByHashResponse.anchor": + if x.Anchor == nil { + x.Anchor = new(AnchorInfo) + } + return protoreflect.ValueOfMessage(x.Anchor.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAnchorByHashResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAnchorByHashResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAnchorByHashResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryAnchorByHashResponse.anchor": + m := new(AnchorInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAnchorByHashResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAnchorByHashResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAnchorByHashResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.QueryAnchorByHashResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAnchorByHashResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAnchorByHashResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAnchorByHashResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAnchorByHashResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAnchorByHashResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Anchor != nil { + l = options.Size(x.Anchor) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAnchorByHashResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Anchor != nil { + encoded, err := options.Marshal(x.Anchor) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAnchorByHashResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAnchorByHashResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAnchorByHashResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Anchor", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Anchor == nil { + x.Anchor = &AnchorInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Anchor); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryAttestationsByAttestorRequest protoreflect.MessageDescriptor + fd_QueryAttestationsByAttestorRequest_attestor protoreflect.FieldDescriptor + fd_QueryAttestationsByAttestorRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_QueryAttestationsByAttestorRequest = File_regen_data_v2_query_proto.Messages().ByName("QueryAttestationsByAttestorRequest") + fd_QueryAttestationsByAttestorRequest_attestor = md_QueryAttestationsByAttestorRequest.Fields().ByName("attestor") + fd_QueryAttestationsByAttestorRequest_pagination = md_QueryAttestationsByAttestorRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryAttestationsByAttestorRequest)(nil) + +type fastReflection_QueryAttestationsByAttestorRequest QueryAttestationsByAttestorRequest + +func (x *QueryAttestationsByAttestorRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAttestationsByAttestorRequest)(x) +} + +func (x *QueryAttestationsByAttestorRequest) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAttestationsByAttestorRequest_messageType fastReflection_QueryAttestationsByAttestorRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAttestationsByAttestorRequest_messageType{} + +type fastReflection_QueryAttestationsByAttestorRequest_messageType struct{} + +func (x fastReflection_QueryAttestationsByAttestorRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAttestationsByAttestorRequest)(nil) +} +func (x fastReflection_QueryAttestationsByAttestorRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAttestationsByAttestorRequest) +} +func (x fastReflection_QueryAttestationsByAttestorRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAttestationsByAttestorRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAttestationsByAttestorRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAttestationsByAttestorRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAttestationsByAttestorRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAttestationsByAttestorRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAttestationsByAttestorRequest) New() protoreflect.Message { + return new(fastReflection_QueryAttestationsByAttestorRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAttestationsByAttestorRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAttestationsByAttestorRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAttestationsByAttestorRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Attestor != "" { + value := protoreflect.ValueOfString(x.Attestor) + if !f(fd_QueryAttestationsByAttestorRequest_attestor, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryAttestationsByAttestorRequest_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAttestationsByAttestorRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByAttestorRequest.attestor": + return x.Attestor != "" + case "regen.data.v2.QueryAttestationsByAttestorRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByAttestorRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByAttestorRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAttestationsByAttestorRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByAttestorRequest.attestor": + x.Attestor = "" + case "regen.data.v2.QueryAttestationsByAttestorRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByAttestorRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByAttestorRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAttestationsByAttestorRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.QueryAttestationsByAttestorRequest.attestor": + value := x.Attestor + return protoreflect.ValueOfString(value) + case "regen.data.v2.QueryAttestationsByAttestorRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByAttestorRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByAttestorRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAttestationsByAttestorRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByAttestorRequest.attestor": + x.Attestor = value.Interface().(string) + case "regen.data.v2.QueryAttestationsByAttestorRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByAttestorRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByAttestorRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAttestationsByAttestorRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByAttestorRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + case "regen.data.v2.QueryAttestationsByAttestorRequest.attestor": + panic(fmt.Errorf("field attestor of message regen.data.v2.QueryAttestationsByAttestorRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByAttestorRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByAttestorRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAttestationsByAttestorRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByAttestorRequest.attestor": + return protoreflect.ValueOfString("") + case "regen.data.v2.QueryAttestationsByAttestorRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByAttestorRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByAttestorRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAttestationsByAttestorRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.QueryAttestationsByAttestorRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAttestationsByAttestorRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAttestationsByAttestorRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAttestationsByAttestorRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAttestationsByAttestorRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAttestationsByAttestorRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Attestor) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAttestationsByAttestorRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Attestor) > 0 { + i -= len(x.Attestor) + copy(dAtA[i:], x.Attestor) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Attestor))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAttestationsByAttestorRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAttestationsByAttestorRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAttestationsByAttestorRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Attestor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Attestor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryAttestationsByAttestorResponse_1_list)(nil) + +type _QueryAttestationsByAttestorResponse_1_list struct { + list *[]*AttestationInfo +} + +func (x *_QueryAttestationsByAttestorResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryAttestationsByAttestorResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryAttestationsByAttestorResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*AttestationInfo) + (*x.list)[i] = concreteValue +} + +func (x *_QueryAttestationsByAttestorResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*AttestationInfo) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryAttestationsByAttestorResponse_1_list) AppendMutable() protoreflect.Value { + v := new(AttestationInfo) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAttestationsByAttestorResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryAttestationsByAttestorResponse_1_list) NewElement() protoreflect.Value { + v := new(AttestationInfo) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAttestationsByAttestorResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryAttestationsByAttestorResponse protoreflect.MessageDescriptor + fd_QueryAttestationsByAttestorResponse_attestations protoreflect.FieldDescriptor + fd_QueryAttestationsByAttestorResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_QueryAttestationsByAttestorResponse = File_regen_data_v2_query_proto.Messages().ByName("QueryAttestationsByAttestorResponse") + fd_QueryAttestationsByAttestorResponse_attestations = md_QueryAttestationsByAttestorResponse.Fields().ByName("attestations") + fd_QueryAttestationsByAttestorResponse_pagination = md_QueryAttestationsByAttestorResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryAttestationsByAttestorResponse)(nil) + +type fastReflection_QueryAttestationsByAttestorResponse QueryAttestationsByAttestorResponse + +func (x *QueryAttestationsByAttestorResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAttestationsByAttestorResponse)(x) +} + +func (x *QueryAttestationsByAttestorResponse) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAttestationsByAttestorResponse_messageType fastReflection_QueryAttestationsByAttestorResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAttestationsByAttestorResponse_messageType{} + +type fastReflection_QueryAttestationsByAttestorResponse_messageType struct{} + +func (x fastReflection_QueryAttestationsByAttestorResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAttestationsByAttestorResponse)(nil) +} +func (x fastReflection_QueryAttestationsByAttestorResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAttestationsByAttestorResponse) +} +func (x fastReflection_QueryAttestationsByAttestorResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAttestationsByAttestorResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAttestationsByAttestorResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAttestationsByAttestorResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAttestationsByAttestorResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAttestationsByAttestorResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAttestationsByAttestorResponse) New() protoreflect.Message { + return new(fastReflection_QueryAttestationsByAttestorResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAttestationsByAttestorResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAttestationsByAttestorResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAttestationsByAttestorResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Attestations) != 0 { + value := protoreflect.ValueOfList(&_QueryAttestationsByAttestorResponse_1_list{list: &x.Attestations}) + if !f(fd_QueryAttestationsByAttestorResponse_attestations, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryAttestationsByAttestorResponse_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAttestationsByAttestorResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByAttestorResponse.attestations": + return len(x.Attestations) != 0 + case "regen.data.v2.QueryAttestationsByAttestorResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByAttestorResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByAttestorResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAttestationsByAttestorResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByAttestorResponse.attestations": + x.Attestations = nil + case "regen.data.v2.QueryAttestationsByAttestorResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByAttestorResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByAttestorResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAttestationsByAttestorResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.QueryAttestationsByAttestorResponse.attestations": + if len(x.Attestations) == 0 { + return protoreflect.ValueOfList(&_QueryAttestationsByAttestorResponse_1_list{}) + } + listValue := &_QueryAttestationsByAttestorResponse_1_list{list: &x.Attestations} + return protoreflect.ValueOfList(listValue) + case "regen.data.v2.QueryAttestationsByAttestorResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByAttestorResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByAttestorResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAttestationsByAttestorResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByAttestorResponse.attestations": + lv := value.List() + clv := lv.(*_QueryAttestationsByAttestorResponse_1_list) + x.Attestations = *clv.list + case "regen.data.v2.QueryAttestationsByAttestorResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByAttestorResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByAttestorResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAttestationsByAttestorResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByAttestorResponse.attestations": + if x.Attestations == nil { + x.Attestations = []*AttestationInfo{} + } + value := &_QueryAttestationsByAttestorResponse_1_list{list: &x.Attestations} + return protoreflect.ValueOfList(value) + case "regen.data.v2.QueryAttestationsByAttestorResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByAttestorResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByAttestorResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAttestationsByAttestorResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByAttestorResponse.attestations": + list := []*AttestationInfo{} + return protoreflect.ValueOfList(&_QueryAttestationsByAttestorResponse_1_list{list: &list}) + case "regen.data.v2.QueryAttestationsByAttestorResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByAttestorResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByAttestorResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAttestationsByAttestorResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.QueryAttestationsByAttestorResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAttestationsByAttestorResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAttestationsByAttestorResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAttestationsByAttestorResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAttestationsByAttestorResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAttestationsByAttestorResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Attestations) > 0 { + for _, e := range x.Attestations { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAttestationsByAttestorResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Attestations) > 0 { + for iNdEx := len(x.Attestations) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Attestations[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAttestationsByAttestorResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAttestationsByAttestorResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAttestationsByAttestorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Attestations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Attestations = append(x.Attestations, &AttestationInfo{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Attestations[len(x.Attestations)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryAttestationsByIRIRequest protoreflect.MessageDescriptor + fd_QueryAttestationsByIRIRequest_iri protoreflect.FieldDescriptor + fd_QueryAttestationsByIRIRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_QueryAttestationsByIRIRequest = File_regen_data_v2_query_proto.Messages().ByName("QueryAttestationsByIRIRequest") + fd_QueryAttestationsByIRIRequest_iri = md_QueryAttestationsByIRIRequest.Fields().ByName("iri") + fd_QueryAttestationsByIRIRequest_pagination = md_QueryAttestationsByIRIRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryAttestationsByIRIRequest)(nil) + +type fastReflection_QueryAttestationsByIRIRequest QueryAttestationsByIRIRequest + +func (x *QueryAttestationsByIRIRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAttestationsByIRIRequest)(x) +} + +func (x *QueryAttestationsByIRIRequest) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAttestationsByIRIRequest_messageType fastReflection_QueryAttestationsByIRIRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAttestationsByIRIRequest_messageType{} + +type fastReflection_QueryAttestationsByIRIRequest_messageType struct{} + +func (x fastReflection_QueryAttestationsByIRIRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAttestationsByIRIRequest)(nil) +} +func (x fastReflection_QueryAttestationsByIRIRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAttestationsByIRIRequest) +} +func (x fastReflection_QueryAttestationsByIRIRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAttestationsByIRIRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAttestationsByIRIRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAttestationsByIRIRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAttestationsByIRIRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAttestationsByIRIRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAttestationsByIRIRequest) New() protoreflect.Message { + return new(fastReflection_QueryAttestationsByIRIRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAttestationsByIRIRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAttestationsByIRIRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAttestationsByIRIRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Iri != "" { + value := protoreflect.ValueOfString(x.Iri) + if !f(fd_QueryAttestationsByIRIRequest_iri, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryAttestationsByIRIRequest_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAttestationsByIRIRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByIRIRequest.iri": + return x.Iri != "" + case "regen.data.v2.QueryAttestationsByIRIRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByIRIRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByIRIRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAttestationsByIRIRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByIRIRequest.iri": + x.Iri = "" + case "regen.data.v2.QueryAttestationsByIRIRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByIRIRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByIRIRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAttestationsByIRIRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.QueryAttestationsByIRIRequest.iri": + value := x.Iri + return protoreflect.ValueOfString(value) + case "regen.data.v2.QueryAttestationsByIRIRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByIRIRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByIRIRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAttestationsByIRIRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByIRIRequest.iri": + x.Iri = value.Interface().(string) + case "regen.data.v2.QueryAttestationsByIRIRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByIRIRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByIRIRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAttestationsByIRIRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByIRIRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + case "regen.data.v2.QueryAttestationsByIRIRequest.iri": + panic(fmt.Errorf("field iri of message regen.data.v2.QueryAttestationsByIRIRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByIRIRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByIRIRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAttestationsByIRIRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByIRIRequest.iri": + return protoreflect.ValueOfString("") + case "regen.data.v2.QueryAttestationsByIRIRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByIRIRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByIRIRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAttestationsByIRIRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.QueryAttestationsByIRIRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAttestationsByIRIRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAttestationsByIRIRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAttestationsByIRIRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAttestationsByIRIRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAttestationsByIRIRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Iri) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAttestationsByIRIRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Iri) > 0 { + i -= len(x.Iri) + copy(dAtA[i:], x.Iri) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Iri))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAttestationsByIRIRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAttestationsByIRIRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAttestationsByIRIRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Iri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Iri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryAttestationsByIRIResponse_1_list)(nil) + +type _QueryAttestationsByIRIResponse_1_list struct { + list *[]*AttestationInfo +} + +func (x *_QueryAttestationsByIRIResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryAttestationsByIRIResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryAttestationsByIRIResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*AttestationInfo) + (*x.list)[i] = concreteValue +} + +func (x *_QueryAttestationsByIRIResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*AttestationInfo) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryAttestationsByIRIResponse_1_list) AppendMutable() protoreflect.Value { + v := new(AttestationInfo) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAttestationsByIRIResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryAttestationsByIRIResponse_1_list) NewElement() protoreflect.Value { + v := new(AttestationInfo) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAttestationsByIRIResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryAttestationsByIRIResponse protoreflect.MessageDescriptor + fd_QueryAttestationsByIRIResponse_attestations protoreflect.FieldDescriptor + fd_QueryAttestationsByIRIResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_QueryAttestationsByIRIResponse = File_regen_data_v2_query_proto.Messages().ByName("QueryAttestationsByIRIResponse") + fd_QueryAttestationsByIRIResponse_attestations = md_QueryAttestationsByIRIResponse.Fields().ByName("attestations") + fd_QueryAttestationsByIRIResponse_pagination = md_QueryAttestationsByIRIResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryAttestationsByIRIResponse)(nil) + +type fastReflection_QueryAttestationsByIRIResponse QueryAttestationsByIRIResponse + +func (x *QueryAttestationsByIRIResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAttestationsByIRIResponse)(x) +} + +func (x *QueryAttestationsByIRIResponse) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAttestationsByIRIResponse_messageType fastReflection_QueryAttestationsByIRIResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAttestationsByIRIResponse_messageType{} + +type fastReflection_QueryAttestationsByIRIResponse_messageType struct{} + +func (x fastReflection_QueryAttestationsByIRIResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAttestationsByIRIResponse)(nil) +} +func (x fastReflection_QueryAttestationsByIRIResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAttestationsByIRIResponse) +} +func (x fastReflection_QueryAttestationsByIRIResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAttestationsByIRIResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAttestationsByIRIResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAttestationsByIRIResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAttestationsByIRIResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAttestationsByIRIResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAttestationsByIRIResponse) New() protoreflect.Message { + return new(fastReflection_QueryAttestationsByIRIResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAttestationsByIRIResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAttestationsByIRIResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAttestationsByIRIResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Attestations) != 0 { + value := protoreflect.ValueOfList(&_QueryAttestationsByIRIResponse_1_list{list: &x.Attestations}) + if !f(fd_QueryAttestationsByIRIResponse_attestations, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryAttestationsByIRIResponse_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAttestationsByIRIResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByIRIResponse.attestations": + return len(x.Attestations) != 0 + case "regen.data.v2.QueryAttestationsByIRIResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByIRIResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByIRIResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAttestationsByIRIResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByIRIResponse.attestations": + x.Attestations = nil + case "regen.data.v2.QueryAttestationsByIRIResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByIRIResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByIRIResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAttestationsByIRIResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.QueryAttestationsByIRIResponse.attestations": + if len(x.Attestations) == 0 { + return protoreflect.ValueOfList(&_QueryAttestationsByIRIResponse_1_list{}) + } + listValue := &_QueryAttestationsByIRIResponse_1_list{list: &x.Attestations} + return protoreflect.ValueOfList(listValue) + case "regen.data.v2.QueryAttestationsByIRIResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByIRIResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByIRIResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAttestationsByIRIResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByIRIResponse.attestations": + lv := value.List() + clv := lv.(*_QueryAttestationsByIRIResponse_1_list) + x.Attestations = *clv.list + case "regen.data.v2.QueryAttestationsByIRIResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByIRIResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByIRIResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAttestationsByIRIResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByIRIResponse.attestations": + if x.Attestations == nil { + x.Attestations = []*AttestationInfo{} + } + value := &_QueryAttestationsByIRIResponse_1_list{list: &x.Attestations} + return protoreflect.ValueOfList(value) + case "regen.data.v2.QueryAttestationsByIRIResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByIRIResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByIRIResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAttestationsByIRIResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByIRIResponse.attestations": + list := []*AttestationInfo{} + return protoreflect.ValueOfList(&_QueryAttestationsByIRIResponse_1_list{list: &list}) + case "regen.data.v2.QueryAttestationsByIRIResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByIRIResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByIRIResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAttestationsByIRIResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.QueryAttestationsByIRIResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAttestationsByIRIResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAttestationsByIRIResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAttestationsByIRIResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAttestationsByIRIResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAttestationsByIRIResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Attestations) > 0 { + for _, e := range x.Attestations { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAttestationsByIRIResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Attestations) > 0 { + for iNdEx := len(x.Attestations) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Attestations[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAttestationsByIRIResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAttestationsByIRIResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAttestationsByIRIResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Attestations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Attestations = append(x.Attestations, &AttestationInfo{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Attestations[len(x.Attestations)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryAttestationsByHashRequest protoreflect.MessageDescriptor + fd_QueryAttestationsByHashRequest_content_hash protoreflect.FieldDescriptor + fd_QueryAttestationsByHashRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_QueryAttestationsByHashRequest = File_regen_data_v2_query_proto.Messages().ByName("QueryAttestationsByHashRequest") + fd_QueryAttestationsByHashRequest_content_hash = md_QueryAttestationsByHashRequest.Fields().ByName("content_hash") + fd_QueryAttestationsByHashRequest_pagination = md_QueryAttestationsByHashRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryAttestationsByHashRequest)(nil) + +type fastReflection_QueryAttestationsByHashRequest QueryAttestationsByHashRequest + +func (x *QueryAttestationsByHashRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAttestationsByHashRequest)(x) +} + +func (x *QueryAttestationsByHashRequest) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAttestationsByHashRequest_messageType fastReflection_QueryAttestationsByHashRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAttestationsByHashRequest_messageType{} + +type fastReflection_QueryAttestationsByHashRequest_messageType struct{} + +func (x fastReflection_QueryAttestationsByHashRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAttestationsByHashRequest)(nil) +} +func (x fastReflection_QueryAttestationsByHashRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAttestationsByHashRequest) +} +func (x fastReflection_QueryAttestationsByHashRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAttestationsByHashRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAttestationsByHashRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAttestationsByHashRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAttestationsByHashRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAttestationsByHashRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAttestationsByHashRequest) New() protoreflect.Message { + return new(fastReflection_QueryAttestationsByHashRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAttestationsByHashRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAttestationsByHashRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAttestationsByHashRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ContentHash != nil { + value := protoreflect.ValueOfMessage(x.ContentHash.ProtoReflect()) + if !f(fd_QueryAttestationsByHashRequest_content_hash, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryAttestationsByHashRequest_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAttestationsByHashRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByHashRequest.content_hash": + return x.ContentHash != nil + case "regen.data.v2.QueryAttestationsByHashRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByHashRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByHashRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAttestationsByHashRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByHashRequest.content_hash": + x.ContentHash = nil + case "regen.data.v2.QueryAttestationsByHashRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByHashRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByHashRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAttestationsByHashRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.QueryAttestationsByHashRequest.content_hash": + value := x.ContentHash + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "regen.data.v2.QueryAttestationsByHashRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByHashRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByHashRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAttestationsByHashRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByHashRequest.content_hash": + x.ContentHash = value.Message().Interface().(*ContentHash) + case "regen.data.v2.QueryAttestationsByHashRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByHashRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByHashRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAttestationsByHashRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByHashRequest.content_hash": + if x.ContentHash == nil { + x.ContentHash = new(ContentHash) + } + return protoreflect.ValueOfMessage(x.ContentHash.ProtoReflect()) + case "regen.data.v2.QueryAttestationsByHashRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByHashRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByHashRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAttestationsByHashRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByHashRequest.content_hash": + m := new(ContentHash) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "regen.data.v2.QueryAttestationsByHashRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByHashRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByHashRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAttestationsByHashRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.QueryAttestationsByHashRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAttestationsByHashRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAttestationsByHashRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAttestationsByHashRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAttestationsByHashRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAttestationsByHashRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.ContentHash != nil { + l = options.Size(x.ContentHash) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAttestationsByHashRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if x.ContentHash != nil { + encoded, err := options.Marshal(x.ContentHash) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAttestationsByHashRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAttestationsByHashRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAttestationsByHashRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ContentHash", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ContentHash == nil { + x.ContentHash = &ContentHash{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ContentHash); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryAttestationsByHashResponse_1_list)(nil) + +type _QueryAttestationsByHashResponse_1_list struct { + list *[]*AttestationInfo +} + +func (x *_QueryAttestationsByHashResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryAttestationsByHashResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryAttestationsByHashResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*AttestationInfo) + (*x.list)[i] = concreteValue +} + +func (x *_QueryAttestationsByHashResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*AttestationInfo) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryAttestationsByHashResponse_1_list) AppendMutable() protoreflect.Value { + v := new(AttestationInfo) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAttestationsByHashResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryAttestationsByHashResponse_1_list) NewElement() protoreflect.Value { + v := new(AttestationInfo) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAttestationsByHashResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryAttestationsByHashResponse protoreflect.MessageDescriptor + fd_QueryAttestationsByHashResponse_attestations protoreflect.FieldDescriptor + fd_QueryAttestationsByHashResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_QueryAttestationsByHashResponse = File_regen_data_v2_query_proto.Messages().ByName("QueryAttestationsByHashResponse") + fd_QueryAttestationsByHashResponse_attestations = md_QueryAttestationsByHashResponse.Fields().ByName("attestations") + fd_QueryAttestationsByHashResponse_pagination = md_QueryAttestationsByHashResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryAttestationsByHashResponse)(nil) + +type fastReflection_QueryAttestationsByHashResponse QueryAttestationsByHashResponse + +func (x *QueryAttestationsByHashResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAttestationsByHashResponse)(x) +} + +func (x *QueryAttestationsByHashResponse) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAttestationsByHashResponse_messageType fastReflection_QueryAttestationsByHashResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAttestationsByHashResponse_messageType{} + +type fastReflection_QueryAttestationsByHashResponse_messageType struct{} + +func (x fastReflection_QueryAttestationsByHashResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAttestationsByHashResponse)(nil) +} +func (x fastReflection_QueryAttestationsByHashResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAttestationsByHashResponse) +} +func (x fastReflection_QueryAttestationsByHashResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAttestationsByHashResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAttestationsByHashResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAttestationsByHashResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAttestationsByHashResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAttestationsByHashResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAttestationsByHashResponse) New() protoreflect.Message { + return new(fastReflection_QueryAttestationsByHashResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAttestationsByHashResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAttestationsByHashResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAttestationsByHashResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Attestations) != 0 { + value := protoreflect.ValueOfList(&_QueryAttestationsByHashResponse_1_list{list: &x.Attestations}) + if !f(fd_QueryAttestationsByHashResponse_attestations, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryAttestationsByHashResponse_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAttestationsByHashResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByHashResponse.attestations": + return len(x.Attestations) != 0 + case "regen.data.v2.QueryAttestationsByHashResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByHashResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByHashResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAttestationsByHashResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByHashResponse.attestations": + x.Attestations = nil + case "regen.data.v2.QueryAttestationsByHashResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByHashResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByHashResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAttestationsByHashResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.QueryAttestationsByHashResponse.attestations": + if len(x.Attestations) == 0 { + return protoreflect.ValueOfList(&_QueryAttestationsByHashResponse_1_list{}) + } + listValue := &_QueryAttestationsByHashResponse_1_list{list: &x.Attestations} + return protoreflect.ValueOfList(listValue) + case "regen.data.v2.QueryAttestationsByHashResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByHashResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByHashResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAttestationsByHashResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByHashResponse.attestations": + lv := value.List() + clv := lv.(*_QueryAttestationsByHashResponse_1_list) + x.Attestations = *clv.list + case "regen.data.v2.QueryAttestationsByHashResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByHashResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByHashResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAttestationsByHashResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByHashResponse.attestations": + if x.Attestations == nil { + x.Attestations = []*AttestationInfo{} + } + value := &_QueryAttestationsByHashResponse_1_list{list: &x.Attestations} + return protoreflect.ValueOfList(value) + case "regen.data.v2.QueryAttestationsByHashResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByHashResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByHashResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAttestationsByHashResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryAttestationsByHashResponse.attestations": + list := []*AttestationInfo{} + return protoreflect.ValueOfList(&_QueryAttestationsByHashResponse_1_list{list: &list}) + case "regen.data.v2.QueryAttestationsByHashResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryAttestationsByHashResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryAttestationsByHashResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAttestationsByHashResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.QueryAttestationsByHashResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAttestationsByHashResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAttestationsByHashResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAttestationsByHashResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAttestationsByHashResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAttestationsByHashResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Attestations) > 0 { + for _, e := range x.Attestations { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAttestationsByHashResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Attestations) > 0 { + for iNdEx := len(x.Attestations) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Attestations[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAttestationsByHashResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAttestationsByHashResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAttestationsByHashResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Attestations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Attestations = append(x.Attestations, &AttestationInfo{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Attestations[len(x.Attestations)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryResolverRequest protoreflect.MessageDescriptor + fd_QueryResolverRequest_id protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_QueryResolverRequest = File_regen_data_v2_query_proto.Messages().ByName("QueryResolverRequest") + fd_QueryResolverRequest_id = md_QueryResolverRequest.Fields().ByName("id") +} + +var _ protoreflect.Message = (*fastReflection_QueryResolverRequest)(nil) + +type fastReflection_QueryResolverRequest QueryResolverRequest + +func (x *QueryResolverRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryResolverRequest)(x) +} + +func (x *QueryResolverRequest) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryResolverRequest_messageType fastReflection_QueryResolverRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryResolverRequest_messageType{} + +type fastReflection_QueryResolverRequest_messageType struct{} + +func (x fastReflection_QueryResolverRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryResolverRequest)(nil) +} +func (x fastReflection_QueryResolverRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryResolverRequest) +} +func (x fastReflection_QueryResolverRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryResolverRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryResolverRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryResolverRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryResolverRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryResolverRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryResolverRequest) New() protoreflect.Message { + return new(fastReflection_QueryResolverRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryResolverRequest) Interface() protoreflect.ProtoMessage { + return (*QueryResolverRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryResolverRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != uint64(0) { + value := protoreflect.ValueOfUint64(x.Id) + if !f(fd_QueryResolverRequest_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryResolverRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.QueryResolverRequest.id": + return x.Id != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolverRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolverRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolverRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.QueryResolverRequest.id": + x.Id = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolverRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolverRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryResolverRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.QueryResolverRequest.id": + value := x.Id + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolverRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolverRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolverRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.QueryResolverRequest.id": + x.Id = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolverRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolverRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolverRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryResolverRequest.id": + panic(fmt.Errorf("field id of message regen.data.v2.QueryResolverRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolverRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolverRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryResolverRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryResolverRequest.id": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolverRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolverRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryResolverRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.QueryResolverRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryResolverRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolverRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryResolverRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryResolverRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryResolverRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Id != 0 { + n += 1 + runtime.Sov(uint64(x.Id)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryResolverRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Id != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryResolverRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryResolverRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryResolverRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + x.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryResolverResponse protoreflect.MessageDescriptor + fd_QueryResolverResponse_resolver protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_QueryResolverResponse = File_regen_data_v2_query_proto.Messages().ByName("QueryResolverResponse") + fd_QueryResolverResponse_resolver = md_QueryResolverResponse.Fields().ByName("resolver") +} + +var _ protoreflect.Message = (*fastReflection_QueryResolverResponse)(nil) + +type fastReflection_QueryResolverResponse QueryResolverResponse + +func (x *QueryResolverResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryResolverResponse)(x) +} + +func (x *QueryResolverResponse) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryResolverResponse_messageType fastReflection_QueryResolverResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryResolverResponse_messageType{} + +type fastReflection_QueryResolverResponse_messageType struct{} + +func (x fastReflection_QueryResolverResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryResolverResponse)(nil) +} +func (x fastReflection_QueryResolverResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryResolverResponse) +} +func (x fastReflection_QueryResolverResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryResolverResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryResolverResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryResolverResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryResolverResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryResolverResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryResolverResponse) New() protoreflect.Message { + return new(fastReflection_QueryResolverResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryResolverResponse) Interface() protoreflect.ProtoMessage { + return (*QueryResolverResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryResolverResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Resolver != nil { + value := protoreflect.ValueOfMessage(x.Resolver.ProtoReflect()) + if !f(fd_QueryResolverResponse_resolver, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryResolverResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.QueryResolverResponse.resolver": + return x.Resolver != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolverResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolverResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolverResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.QueryResolverResponse.resolver": + x.Resolver = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolverResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolverResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryResolverResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.QueryResolverResponse.resolver": + value := x.Resolver + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolverResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolverResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolverResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.QueryResolverResponse.resolver": + x.Resolver = value.Message().Interface().(*ResolverInfo) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolverResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolverResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolverResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryResolverResponse.resolver": + if x.Resolver == nil { + x.Resolver = new(ResolverInfo) + } + return protoreflect.ValueOfMessage(x.Resolver.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolverResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolverResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryResolverResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryResolverResponse.resolver": + m := new(ResolverInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolverResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolverResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryResolverResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.QueryResolverResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryResolverResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolverResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryResolverResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryResolverResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryResolverResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Resolver != nil { + l = options.Size(x.Resolver) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryResolverResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Resolver != nil { + encoded, err := options.Marshal(x.Resolver) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryResolverResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryResolverResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryResolverResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Resolver", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Resolver == nil { + x.Resolver = &ResolverInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Resolver); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryResolversByIRIRequest protoreflect.MessageDescriptor + fd_QueryResolversByIRIRequest_iri protoreflect.FieldDescriptor + fd_QueryResolversByIRIRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_QueryResolversByIRIRequest = File_regen_data_v2_query_proto.Messages().ByName("QueryResolversByIRIRequest") + fd_QueryResolversByIRIRequest_iri = md_QueryResolversByIRIRequest.Fields().ByName("iri") + fd_QueryResolversByIRIRequest_pagination = md_QueryResolversByIRIRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryResolversByIRIRequest)(nil) + +type fastReflection_QueryResolversByIRIRequest QueryResolversByIRIRequest + +func (x *QueryResolversByIRIRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryResolversByIRIRequest)(x) +} + +func (x *QueryResolversByIRIRequest) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryResolversByIRIRequest_messageType fastReflection_QueryResolversByIRIRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryResolversByIRIRequest_messageType{} + +type fastReflection_QueryResolversByIRIRequest_messageType struct{} + +func (x fastReflection_QueryResolversByIRIRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryResolversByIRIRequest)(nil) +} +func (x fastReflection_QueryResolversByIRIRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryResolversByIRIRequest) +} +func (x fastReflection_QueryResolversByIRIRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryResolversByIRIRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryResolversByIRIRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryResolversByIRIRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryResolversByIRIRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryResolversByIRIRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryResolversByIRIRequest) New() protoreflect.Message { + return new(fastReflection_QueryResolversByIRIRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryResolversByIRIRequest) Interface() protoreflect.ProtoMessage { + return (*QueryResolversByIRIRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryResolversByIRIRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Iri != "" { + value := protoreflect.ValueOfString(x.Iri) + if !f(fd_QueryResolversByIRIRequest_iri, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryResolversByIRIRequest_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryResolversByIRIRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByIRIRequest.iri": + return x.Iri != "" + case "regen.data.v2.QueryResolversByIRIRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByIRIRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByIRIRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolversByIRIRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByIRIRequest.iri": + x.Iri = "" + case "regen.data.v2.QueryResolversByIRIRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByIRIRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByIRIRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryResolversByIRIRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.QueryResolversByIRIRequest.iri": + value := x.Iri + return protoreflect.ValueOfString(value) + case "regen.data.v2.QueryResolversByIRIRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByIRIRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByIRIRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolversByIRIRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByIRIRequest.iri": + x.Iri = value.Interface().(string) + case "regen.data.v2.QueryResolversByIRIRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByIRIRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByIRIRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolversByIRIRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByIRIRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + case "regen.data.v2.QueryResolversByIRIRequest.iri": + panic(fmt.Errorf("field iri of message regen.data.v2.QueryResolversByIRIRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByIRIRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByIRIRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryResolversByIRIRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByIRIRequest.iri": + return protoreflect.ValueOfString("") + case "regen.data.v2.QueryResolversByIRIRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByIRIRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByIRIRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryResolversByIRIRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.QueryResolversByIRIRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryResolversByIRIRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolversByIRIRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryResolversByIRIRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryResolversByIRIRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryResolversByIRIRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Iri) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryResolversByIRIRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Iri) > 0 { + i -= len(x.Iri) + copy(dAtA[i:], x.Iri) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Iri))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryResolversByIRIRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryResolversByIRIRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryResolversByIRIRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Iri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Iri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryResolversByIRIResponse_1_list)(nil) + +type _QueryResolversByIRIResponse_1_list struct { + list *[]*ResolverInfo +} + +func (x *_QueryResolversByIRIResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryResolversByIRIResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryResolversByIRIResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ResolverInfo) + (*x.list)[i] = concreteValue +} + +func (x *_QueryResolversByIRIResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ResolverInfo) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryResolversByIRIResponse_1_list) AppendMutable() protoreflect.Value { + v := new(ResolverInfo) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryResolversByIRIResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryResolversByIRIResponse_1_list) NewElement() protoreflect.Value { + v := new(ResolverInfo) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryResolversByIRIResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryResolversByIRIResponse protoreflect.MessageDescriptor + fd_QueryResolversByIRIResponse_resolvers protoreflect.FieldDescriptor + fd_QueryResolversByIRIResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_QueryResolversByIRIResponse = File_regen_data_v2_query_proto.Messages().ByName("QueryResolversByIRIResponse") + fd_QueryResolversByIRIResponse_resolvers = md_QueryResolversByIRIResponse.Fields().ByName("resolvers") + fd_QueryResolversByIRIResponse_pagination = md_QueryResolversByIRIResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryResolversByIRIResponse)(nil) + +type fastReflection_QueryResolversByIRIResponse QueryResolversByIRIResponse + +func (x *QueryResolversByIRIResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryResolversByIRIResponse)(x) +} + +func (x *QueryResolversByIRIResponse) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryResolversByIRIResponse_messageType fastReflection_QueryResolversByIRIResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryResolversByIRIResponse_messageType{} + +type fastReflection_QueryResolversByIRIResponse_messageType struct{} + +func (x fastReflection_QueryResolversByIRIResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryResolversByIRIResponse)(nil) +} +func (x fastReflection_QueryResolversByIRIResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryResolversByIRIResponse) +} +func (x fastReflection_QueryResolversByIRIResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryResolversByIRIResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryResolversByIRIResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryResolversByIRIResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryResolversByIRIResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryResolversByIRIResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryResolversByIRIResponse) New() protoreflect.Message { + return new(fastReflection_QueryResolversByIRIResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryResolversByIRIResponse) Interface() protoreflect.ProtoMessage { + return (*QueryResolversByIRIResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryResolversByIRIResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Resolvers) != 0 { + value := protoreflect.ValueOfList(&_QueryResolversByIRIResponse_1_list{list: &x.Resolvers}) + if !f(fd_QueryResolversByIRIResponse_resolvers, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryResolversByIRIResponse_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryResolversByIRIResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByIRIResponse.resolvers": + return len(x.Resolvers) != 0 + case "regen.data.v2.QueryResolversByIRIResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByIRIResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByIRIResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolversByIRIResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByIRIResponse.resolvers": + x.Resolvers = nil + case "regen.data.v2.QueryResolversByIRIResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByIRIResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByIRIResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryResolversByIRIResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.QueryResolversByIRIResponse.resolvers": + if len(x.Resolvers) == 0 { + return protoreflect.ValueOfList(&_QueryResolversByIRIResponse_1_list{}) + } + listValue := &_QueryResolversByIRIResponse_1_list{list: &x.Resolvers} + return protoreflect.ValueOfList(listValue) + case "regen.data.v2.QueryResolversByIRIResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByIRIResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByIRIResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolversByIRIResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByIRIResponse.resolvers": + lv := value.List() + clv := lv.(*_QueryResolversByIRIResponse_1_list) + x.Resolvers = *clv.list + case "regen.data.v2.QueryResolversByIRIResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByIRIResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByIRIResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolversByIRIResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByIRIResponse.resolvers": + if x.Resolvers == nil { + x.Resolvers = []*ResolverInfo{} + } + value := &_QueryResolversByIRIResponse_1_list{list: &x.Resolvers} + return protoreflect.ValueOfList(value) + case "regen.data.v2.QueryResolversByIRIResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByIRIResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByIRIResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryResolversByIRIResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByIRIResponse.resolvers": + list := []*ResolverInfo{} + return protoreflect.ValueOfList(&_QueryResolversByIRIResponse_1_list{list: &list}) + case "regen.data.v2.QueryResolversByIRIResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByIRIResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByIRIResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryResolversByIRIResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.QueryResolversByIRIResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryResolversByIRIResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolversByIRIResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryResolversByIRIResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryResolversByIRIResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryResolversByIRIResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Resolvers) > 0 { + for _, e := range x.Resolvers { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryResolversByIRIResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Resolvers) > 0 { + for iNdEx := len(x.Resolvers) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Resolvers[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryResolversByIRIResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryResolversByIRIResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryResolversByIRIResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Resolvers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Resolvers = append(x.Resolvers, &ResolverInfo{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Resolvers[len(x.Resolvers)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryResolversByHashRequest protoreflect.MessageDescriptor + fd_QueryResolversByHashRequest_content_hash protoreflect.FieldDescriptor + fd_QueryResolversByHashRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_QueryResolversByHashRequest = File_regen_data_v2_query_proto.Messages().ByName("QueryResolversByHashRequest") + fd_QueryResolversByHashRequest_content_hash = md_QueryResolversByHashRequest.Fields().ByName("content_hash") + fd_QueryResolversByHashRequest_pagination = md_QueryResolversByHashRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryResolversByHashRequest)(nil) + +type fastReflection_QueryResolversByHashRequest QueryResolversByHashRequest + +func (x *QueryResolversByHashRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryResolversByHashRequest)(x) +} + +func (x *QueryResolversByHashRequest) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryResolversByHashRequest_messageType fastReflection_QueryResolversByHashRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryResolversByHashRequest_messageType{} + +type fastReflection_QueryResolversByHashRequest_messageType struct{} + +func (x fastReflection_QueryResolversByHashRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryResolversByHashRequest)(nil) +} +func (x fastReflection_QueryResolversByHashRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryResolversByHashRequest) +} +func (x fastReflection_QueryResolversByHashRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryResolversByHashRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryResolversByHashRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryResolversByHashRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryResolversByHashRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryResolversByHashRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryResolversByHashRequest) New() protoreflect.Message { + return new(fastReflection_QueryResolversByHashRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryResolversByHashRequest) Interface() protoreflect.ProtoMessage { + return (*QueryResolversByHashRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryResolversByHashRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ContentHash != nil { + value := protoreflect.ValueOfMessage(x.ContentHash.ProtoReflect()) + if !f(fd_QueryResolversByHashRequest_content_hash, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryResolversByHashRequest_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryResolversByHashRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByHashRequest.content_hash": + return x.ContentHash != nil + case "regen.data.v2.QueryResolversByHashRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByHashRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByHashRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolversByHashRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByHashRequest.content_hash": + x.ContentHash = nil + case "regen.data.v2.QueryResolversByHashRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByHashRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByHashRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryResolversByHashRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.QueryResolversByHashRequest.content_hash": + value := x.ContentHash + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "regen.data.v2.QueryResolversByHashRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByHashRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByHashRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolversByHashRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByHashRequest.content_hash": + x.ContentHash = value.Message().Interface().(*ContentHash) + case "regen.data.v2.QueryResolversByHashRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByHashRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByHashRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolversByHashRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByHashRequest.content_hash": + if x.ContentHash == nil { + x.ContentHash = new(ContentHash) + } + return protoreflect.ValueOfMessage(x.ContentHash.ProtoReflect()) + case "regen.data.v2.QueryResolversByHashRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByHashRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByHashRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryResolversByHashRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByHashRequest.content_hash": + m := new(ContentHash) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "regen.data.v2.QueryResolversByHashRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByHashRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByHashRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryResolversByHashRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.QueryResolversByHashRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryResolversByHashRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolversByHashRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryResolversByHashRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryResolversByHashRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryResolversByHashRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.ContentHash != nil { + l = options.Size(x.ContentHash) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryResolversByHashRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if x.ContentHash != nil { + encoded, err := options.Marshal(x.ContentHash) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryResolversByHashRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryResolversByHashRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryResolversByHashRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ContentHash", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ContentHash == nil { + x.ContentHash = &ContentHash{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ContentHash); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryResolversByHashResponse_1_list)(nil) + +type _QueryResolversByHashResponse_1_list struct { + list *[]*ResolverInfo +} + +func (x *_QueryResolversByHashResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryResolversByHashResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryResolversByHashResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ResolverInfo) + (*x.list)[i] = concreteValue +} + +func (x *_QueryResolversByHashResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ResolverInfo) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryResolversByHashResponse_1_list) AppendMutable() protoreflect.Value { + v := new(ResolverInfo) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryResolversByHashResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryResolversByHashResponse_1_list) NewElement() protoreflect.Value { + v := new(ResolverInfo) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryResolversByHashResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryResolversByHashResponse protoreflect.MessageDescriptor + fd_QueryResolversByHashResponse_resolvers protoreflect.FieldDescriptor + fd_QueryResolversByHashResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_QueryResolversByHashResponse = File_regen_data_v2_query_proto.Messages().ByName("QueryResolversByHashResponse") + fd_QueryResolversByHashResponse_resolvers = md_QueryResolversByHashResponse.Fields().ByName("resolvers") + fd_QueryResolversByHashResponse_pagination = md_QueryResolversByHashResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryResolversByHashResponse)(nil) + +type fastReflection_QueryResolversByHashResponse QueryResolversByHashResponse + +func (x *QueryResolversByHashResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryResolversByHashResponse)(x) +} + +func (x *QueryResolversByHashResponse) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryResolversByHashResponse_messageType fastReflection_QueryResolversByHashResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryResolversByHashResponse_messageType{} + +type fastReflection_QueryResolversByHashResponse_messageType struct{} + +func (x fastReflection_QueryResolversByHashResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryResolversByHashResponse)(nil) +} +func (x fastReflection_QueryResolversByHashResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryResolversByHashResponse) +} +func (x fastReflection_QueryResolversByHashResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryResolversByHashResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryResolversByHashResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryResolversByHashResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryResolversByHashResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryResolversByHashResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryResolversByHashResponse) New() protoreflect.Message { + return new(fastReflection_QueryResolversByHashResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryResolversByHashResponse) Interface() protoreflect.ProtoMessage { + return (*QueryResolversByHashResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryResolversByHashResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Resolvers) != 0 { + value := protoreflect.ValueOfList(&_QueryResolversByHashResponse_1_list{list: &x.Resolvers}) + if !f(fd_QueryResolversByHashResponse_resolvers, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryResolversByHashResponse_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryResolversByHashResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByHashResponse.resolvers": + return len(x.Resolvers) != 0 + case "regen.data.v2.QueryResolversByHashResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByHashResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByHashResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolversByHashResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByHashResponse.resolvers": + x.Resolvers = nil + case "regen.data.v2.QueryResolversByHashResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByHashResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByHashResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryResolversByHashResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.QueryResolversByHashResponse.resolvers": + if len(x.Resolvers) == 0 { + return protoreflect.ValueOfList(&_QueryResolversByHashResponse_1_list{}) + } + listValue := &_QueryResolversByHashResponse_1_list{list: &x.Resolvers} + return protoreflect.ValueOfList(listValue) + case "regen.data.v2.QueryResolversByHashResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByHashResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByHashResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolversByHashResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByHashResponse.resolvers": + lv := value.List() + clv := lv.(*_QueryResolversByHashResponse_1_list) + x.Resolvers = *clv.list + case "regen.data.v2.QueryResolversByHashResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByHashResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByHashResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolversByHashResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByHashResponse.resolvers": + if x.Resolvers == nil { + x.Resolvers = []*ResolverInfo{} + } + value := &_QueryResolversByHashResponse_1_list{list: &x.Resolvers} + return protoreflect.ValueOfList(value) + case "regen.data.v2.QueryResolversByHashResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByHashResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByHashResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryResolversByHashResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByHashResponse.resolvers": + list := []*ResolverInfo{} + return protoreflect.ValueOfList(&_QueryResolversByHashResponse_1_list{list: &list}) + case "regen.data.v2.QueryResolversByHashResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByHashResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByHashResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryResolversByHashResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.QueryResolversByHashResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryResolversByHashResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolversByHashResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryResolversByHashResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryResolversByHashResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryResolversByHashResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Resolvers) > 0 { + for _, e := range x.Resolvers { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryResolversByHashResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Resolvers) > 0 { + for iNdEx := len(x.Resolvers) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Resolvers[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryResolversByHashResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryResolversByHashResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryResolversByHashResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Resolvers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Resolvers = append(x.Resolvers, &ResolverInfo{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Resolvers[len(x.Resolvers)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryResolversByURLRequest protoreflect.MessageDescriptor + fd_QueryResolversByURLRequest_url protoreflect.FieldDescriptor + fd_QueryResolversByURLRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_QueryResolversByURLRequest = File_regen_data_v2_query_proto.Messages().ByName("QueryResolversByURLRequest") + fd_QueryResolversByURLRequest_url = md_QueryResolversByURLRequest.Fields().ByName("url") + fd_QueryResolversByURLRequest_pagination = md_QueryResolversByURLRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryResolversByURLRequest)(nil) + +type fastReflection_QueryResolversByURLRequest QueryResolversByURLRequest + +func (x *QueryResolversByURLRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryResolversByURLRequest)(x) +} + +func (x *QueryResolversByURLRequest) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryResolversByURLRequest_messageType fastReflection_QueryResolversByURLRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryResolversByURLRequest_messageType{} + +type fastReflection_QueryResolversByURLRequest_messageType struct{} + +func (x fastReflection_QueryResolversByURLRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryResolversByURLRequest)(nil) +} +func (x fastReflection_QueryResolversByURLRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryResolversByURLRequest) +} +func (x fastReflection_QueryResolversByURLRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryResolversByURLRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryResolversByURLRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryResolversByURLRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryResolversByURLRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryResolversByURLRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryResolversByURLRequest) New() protoreflect.Message { + return new(fastReflection_QueryResolversByURLRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryResolversByURLRequest) Interface() protoreflect.ProtoMessage { + return (*QueryResolversByURLRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryResolversByURLRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Url != "" { + value := protoreflect.ValueOfString(x.Url) + if !f(fd_QueryResolversByURLRequest_url, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryResolversByURLRequest_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryResolversByURLRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByURLRequest.url": + return x.Url != "" + case "regen.data.v2.QueryResolversByURLRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByURLRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByURLRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolversByURLRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByURLRequest.url": + x.Url = "" + case "regen.data.v2.QueryResolversByURLRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByURLRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByURLRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryResolversByURLRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.QueryResolversByURLRequest.url": + value := x.Url + return protoreflect.ValueOfString(value) + case "regen.data.v2.QueryResolversByURLRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByURLRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByURLRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolversByURLRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByURLRequest.url": + x.Url = value.Interface().(string) + case "regen.data.v2.QueryResolversByURLRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByURLRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByURLRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolversByURLRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByURLRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + case "regen.data.v2.QueryResolversByURLRequest.url": + panic(fmt.Errorf("field url of message regen.data.v2.QueryResolversByURLRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByURLRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByURLRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryResolversByURLRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByURLRequest.url": + return protoreflect.ValueOfString("") + case "regen.data.v2.QueryResolversByURLRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByURLRequest")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByURLRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryResolversByURLRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.QueryResolversByURLRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryResolversByURLRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolversByURLRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryResolversByURLRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryResolversByURLRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryResolversByURLRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Url) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryResolversByURLRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Url) > 0 { + i -= len(x.Url) + copy(dAtA[i:], x.Url) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Url))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryResolversByURLRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryResolversByURLRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryResolversByURLRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Url = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryResolversByURLResponse_1_list)(nil) + +type _QueryResolversByURLResponse_1_list struct { + list *[]*ResolverInfo +} + +func (x *_QueryResolversByURLResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryResolversByURLResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryResolversByURLResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ResolverInfo) + (*x.list)[i] = concreteValue +} + +func (x *_QueryResolversByURLResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ResolverInfo) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryResolversByURLResponse_1_list) AppendMutable() protoreflect.Value { + v := new(ResolverInfo) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryResolversByURLResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryResolversByURLResponse_1_list) NewElement() protoreflect.Value { + v := new(ResolverInfo) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryResolversByURLResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryResolversByURLResponse protoreflect.MessageDescriptor + fd_QueryResolversByURLResponse_resolvers protoreflect.FieldDescriptor + fd_QueryResolversByURLResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_QueryResolversByURLResponse = File_regen_data_v2_query_proto.Messages().ByName("QueryResolversByURLResponse") + fd_QueryResolversByURLResponse_resolvers = md_QueryResolversByURLResponse.Fields().ByName("resolvers") + fd_QueryResolversByURLResponse_pagination = md_QueryResolversByURLResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryResolversByURLResponse)(nil) + +type fastReflection_QueryResolversByURLResponse QueryResolversByURLResponse + +func (x *QueryResolversByURLResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryResolversByURLResponse)(x) +} + +func (x *QueryResolversByURLResponse) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryResolversByURLResponse_messageType fastReflection_QueryResolversByURLResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryResolversByURLResponse_messageType{} + +type fastReflection_QueryResolversByURLResponse_messageType struct{} + +func (x fastReflection_QueryResolversByURLResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryResolversByURLResponse)(nil) +} +func (x fastReflection_QueryResolversByURLResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryResolversByURLResponse) +} +func (x fastReflection_QueryResolversByURLResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryResolversByURLResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryResolversByURLResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryResolversByURLResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryResolversByURLResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryResolversByURLResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryResolversByURLResponse) New() protoreflect.Message { + return new(fastReflection_QueryResolversByURLResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryResolversByURLResponse) Interface() protoreflect.ProtoMessage { + return (*QueryResolversByURLResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryResolversByURLResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Resolvers) != 0 { + value := protoreflect.ValueOfList(&_QueryResolversByURLResponse_1_list{list: &x.Resolvers}) + if !f(fd_QueryResolversByURLResponse_resolvers, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryResolversByURLResponse_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryResolversByURLResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByURLResponse.resolvers": + return len(x.Resolvers) != 0 + case "regen.data.v2.QueryResolversByURLResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByURLResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByURLResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolversByURLResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByURLResponse.resolvers": + x.Resolvers = nil + case "regen.data.v2.QueryResolversByURLResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByURLResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByURLResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryResolversByURLResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.QueryResolversByURLResponse.resolvers": + if len(x.Resolvers) == 0 { + return protoreflect.ValueOfList(&_QueryResolversByURLResponse_1_list{}) + } + listValue := &_QueryResolversByURLResponse_1_list{list: &x.Resolvers} + return protoreflect.ValueOfList(listValue) + case "regen.data.v2.QueryResolversByURLResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByURLResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByURLResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolversByURLResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByURLResponse.resolvers": + lv := value.List() + clv := lv.(*_QueryResolversByURLResponse_1_list) + x.Resolvers = *clv.list + case "regen.data.v2.QueryResolversByURLResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByURLResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByURLResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolversByURLResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByURLResponse.resolvers": + if x.Resolvers == nil { + x.Resolvers = []*ResolverInfo{} + } + value := &_QueryResolversByURLResponse_1_list{list: &x.Resolvers} + return protoreflect.ValueOfList(value) + case "regen.data.v2.QueryResolversByURLResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByURLResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByURLResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryResolversByURLResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.QueryResolversByURLResponse.resolvers": + list := []*ResolverInfo{} + return protoreflect.ValueOfList(&_QueryResolversByURLResponse_1_list{list: &list}) + case "regen.data.v2.QueryResolversByURLResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.QueryResolversByURLResponse")) + } + panic(fmt.Errorf("message regen.data.v2.QueryResolversByURLResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryResolversByURLResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.QueryResolversByURLResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryResolversByURLResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryResolversByURLResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryResolversByURLResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryResolversByURLResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryResolversByURLResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Resolvers) > 0 { + for _, e := range x.Resolvers { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryResolversByURLResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Resolvers) > 0 { + for iNdEx := len(x.Resolvers) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Resolvers[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryResolversByURLResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryResolversByURLResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryResolversByURLResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Resolvers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Resolvers = append(x.Resolvers, &ResolverInfo{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Resolvers[len(x.Resolvers)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_ConvertIRIToHashRequest protoreflect.MessageDescriptor + fd_ConvertIRIToHashRequest_iri protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_ConvertIRIToHashRequest = File_regen_data_v2_query_proto.Messages().ByName("ConvertIRIToHashRequest") + fd_ConvertIRIToHashRequest_iri = md_ConvertIRIToHashRequest.Fields().ByName("iri") +} + +var _ protoreflect.Message = (*fastReflection_ConvertIRIToHashRequest)(nil) + +type fastReflection_ConvertIRIToHashRequest ConvertIRIToHashRequest + +func (x *ConvertIRIToHashRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_ConvertIRIToHashRequest)(x) +} + +func (x *ConvertIRIToHashRequest) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ConvertIRIToHashRequest_messageType fastReflection_ConvertIRIToHashRequest_messageType +var _ protoreflect.MessageType = fastReflection_ConvertIRIToHashRequest_messageType{} + +type fastReflection_ConvertIRIToHashRequest_messageType struct{} + +func (x fastReflection_ConvertIRIToHashRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_ConvertIRIToHashRequest)(nil) +} +func (x fastReflection_ConvertIRIToHashRequest_messageType) New() protoreflect.Message { + return new(fastReflection_ConvertIRIToHashRequest) +} +func (x fastReflection_ConvertIRIToHashRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ConvertIRIToHashRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ConvertIRIToHashRequest) Descriptor() protoreflect.MessageDescriptor { + return md_ConvertIRIToHashRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ConvertIRIToHashRequest) Type() protoreflect.MessageType { + return _fastReflection_ConvertIRIToHashRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ConvertIRIToHashRequest) New() protoreflect.Message { + return new(fastReflection_ConvertIRIToHashRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ConvertIRIToHashRequest) Interface() protoreflect.ProtoMessage { + return (*ConvertIRIToHashRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ConvertIRIToHashRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Iri != "" { + value := protoreflect.ValueOfString(x.Iri) + if !f(fd_ConvertIRIToHashRequest_iri, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ConvertIRIToHashRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.ConvertIRIToHashRequest.iri": + return x.Iri != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ConvertIRIToHashRequest")) + } + panic(fmt.Errorf("message regen.data.v2.ConvertIRIToHashRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ConvertIRIToHashRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.ConvertIRIToHashRequest.iri": + x.Iri = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ConvertIRIToHashRequest")) + } + panic(fmt.Errorf("message regen.data.v2.ConvertIRIToHashRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ConvertIRIToHashRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.ConvertIRIToHashRequest.iri": + value := x.Iri + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ConvertIRIToHashRequest")) + } + panic(fmt.Errorf("message regen.data.v2.ConvertIRIToHashRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ConvertIRIToHashRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.ConvertIRIToHashRequest.iri": + x.Iri = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ConvertIRIToHashRequest")) + } + panic(fmt.Errorf("message regen.data.v2.ConvertIRIToHashRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ConvertIRIToHashRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.ConvertIRIToHashRequest.iri": + panic(fmt.Errorf("field iri of message regen.data.v2.ConvertIRIToHashRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ConvertIRIToHashRequest")) + } + panic(fmt.Errorf("message regen.data.v2.ConvertIRIToHashRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ConvertIRIToHashRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.ConvertIRIToHashRequest.iri": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ConvertIRIToHashRequest")) + } + panic(fmt.Errorf("message regen.data.v2.ConvertIRIToHashRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ConvertIRIToHashRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.ConvertIRIToHashRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ConvertIRIToHashRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ConvertIRIToHashRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ConvertIRIToHashRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ConvertIRIToHashRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ConvertIRIToHashRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Iri) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ConvertIRIToHashRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Iri) > 0 { + i -= len(x.Iri) + copy(dAtA[i:], x.Iri) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Iri))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ConvertIRIToHashRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ConvertIRIToHashRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ConvertIRIToHashRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Iri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Iri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_ConvertIRIToHashResponse protoreflect.MessageDescriptor + fd_ConvertIRIToHashResponse_content_hash protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_ConvertIRIToHashResponse = File_regen_data_v2_query_proto.Messages().ByName("ConvertIRIToHashResponse") + fd_ConvertIRIToHashResponse_content_hash = md_ConvertIRIToHashResponse.Fields().ByName("content_hash") +} + +var _ protoreflect.Message = (*fastReflection_ConvertIRIToHashResponse)(nil) + +type fastReflection_ConvertIRIToHashResponse ConvertIRIToHashResponse + +func (x *ConvertIRIToHashResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_ConvertIRIToHashResponse)(x) +} + +func (x *ConvertIRIToHashResponse) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ConvertIRIToHashResponse_messageType fastReflection_ConvertIRIToHashResponse_messageType +var _ protoreflect.MessageType = fastReflection_ConvertIRIToHashResponse_messageType{} + +type fastReflection_ConvertIRIToHashResponse_messageType struct{} + +func (x fastReflection_ConvertIRIToHashResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_ConvertIRIToHashResponse)(nil) +} +func (x fastReflection_ConvertIRIToHashResponse_messageType) New() protoreflect.Message { + return new(fastReflection_ConvertIRIToHashResponse) +} +func (x fastReflection_ConvertIRIToHashResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ConvertIRIToHashResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ConvertIRIToHashResponse) Descriptor() protoreflect.MessageDescriptor { + return md_ConvertIRIToHashResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ConvertIRIToHashResponse) Type() protoreflect.MessageType { + return _fastReflection_ConvertIRIToHashResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ConvertIRIToHashResponse) New() protoreflect.Message { + return new(fastReflection_ConvertIRIToHashResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ConvertIRIToHashResponse) Interface() protoreflect.ProtoMessage { + return (*ConvertIRIToHashResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ConvertIRIToHashResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ContentHash != nil { + value := protoreflect.ValueOfMessage(x.ContentHash.ProtoReflect()) + if !f(fd_ConvertIRIToHashResponse_content_hash, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ConvertIRIToHashResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.ConvertIRIToHashResponse.content_hash": + return x.ContentHash != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ConvertIRIToHashResponse")) + } + panic(fmt.Errorf("message regen.data.v2.ConvertIRIToHashResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ConvertIRIToHashResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.ConvertIRIToHashResponse.content_hash": + x.ContentHash = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ConvertIRIToHashResponse")) + } + panic(fmt.Errorf("message regen.data.v2.ConvertIRIToHashResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ConvertIRIToHashResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.ConvertIRIToHashResponse.content_hash": + value := x.ContentHash + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ConvertIRIToHashResponse")) + } + panic(fmt.Errorf("message regen.data.v2.ConvertIRIToHashResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ConvertIRIToHashResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.ConvertIRIToHashResponse.content_hash": + x.ContentHash = value.Message().Interface().(*ContentHash) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ConvertIRIToHashResponse")) + } + panic(fmt.Errorf("message regen.data.v2.ConvertIRIToHashResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ConvertIRIToHashResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.ConvertIRIToHashResponse.content_hash": + if x.ContentHash == nil { + x.ContentHash = new(ContentHash) + } + return protoreflect.ValueOfMessage(x.ContentHash.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ConvertIRIToHashResponse")) + } + panic(fmt.Errorf("message regen.data.v2.ConvertIRIToHashResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ConvertIRIToHashResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.ConvertIRIToHashResponse.content_hash": + m := new(ContentHash) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ConvertIRIToHashResponse")) + } + panic(fmt.Errorf("message regen.data.v2.ConvertIRIToHashResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ConvertIRIToHashResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.ConvertIRIToHashResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ConvertIRIToHashResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ConvertIRIToHashResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ConvertIRIToHashResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ConvertIRIToHashResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ConvertIRIToHashResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.ContentHash != nil { + l = options.Size(x.ContentHash) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ConvertIRIToHashResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.ContentHash != nil { + encoded, err := options.Marshal(x.ContentHash) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ConvertIRIToHashResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ConvertIRIToHashResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ConvertIRIToHashResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ContentHash", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ContentHash == nil { + x.ContentHash = &ContentHash{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ContentHash); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_ConvertHashToIRIRequest protoreflect.MessageDescriptor + fd_ConvertHashToIRIRequest_content_hash protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_ConvertHashToIRIRequest = File_regen_data_v2_query_proto.Messages().ByName("ConvertHashToIRIRequest") + fd_ConvertHashToIRIRequest_content_hash = md_ConvertHashToIRIRequest.Fields().ByName("content_hash") +} + +var _ protoreflect.Message = (*fastReflection_ConvertHashToIRIRequest)(nil) + +type fastReflection_ConvertHashToIRIRequest ConvertHashToIRIRequest + +func (x *ConvertHashToIRIRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_ConvertHashToIRIRequest)(x) +} + +func (x *ConvertHashToIRIRequest) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ConvertHashToIRIRequest_messageType fastReflection_ConvertHashToIRIRequest_messageType +var _ protoreflect.MessageType = fastReflection_ConvertHashToIRIRequest_messageType{} + +type fastReflection_ConvertHashToIRIRequest_messageType struct{} + +func (x fastReflection_ConvertHashToIRIRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_ConvertHashToIRIRequest)(nil) +} +func (x fastReflection_ConvertHashToIRIRequest_messageType) New() protoreflect.Message { + return new(fastReflection_ConvertHashToIRIRequest) +} +func (x fastReflection_ConvertHashToIRIRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ConvertHashToIRIRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ConvertHashToIRIRequest) Descriptor() protoreflect.MessageDescriptor { + return md_ConvertHashToIRIRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ConvertHashToIRIRequest) Type() protoreflect.MessageType { + return _fastReflection_ConvertHashToIRIRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ConvertHashToIRIRequest) New() protoreflect.Message { + return new(fastReflection_ConvertHashToIRIRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ConvertHashToIRIRequest) Interface() protoreflect.ProtoMessage { + return (*ConvertHashToIRIRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ConvertHashToIRIRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ContentHash != nil { + value := protoreflect.ValueOfMessage(x.ContentHash.ProtoReflect()) + if !f(fd_ConvertHashToIRIRequest_content_hash, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ConvertHashToIRIRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.ConvertHashToIRIRequest.content_hash": + return x.ContentHash != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ConvertHashToIRIRequest")) + } + panic(fmt.Errorf("message regen.data.v2.ConvertHashToIRIRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ConvertHashToIRIRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.ConvertHashToIRIRequest.content_hash": + x.ContentHash = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ConvertHashToIRIRequest")) + } + panic(fmt.Errorf("message regen.data.v2.ConvertHashToIRIRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ConvertHashToIRIRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.ConvertHashToIRIRequest.content_hash": + value := x.ContentHash + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ConvertHashToIRIRequest")) + } + panic(fmt.Errorf("message regen.data.v2.ConvertHashToIRIRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ConvertHashToIRIRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.ConvertHashToIRIRequest.content_hash": + x.ContentHash = value.Message().Interface().(*ContentHash) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ConvertHashToIRIRequest")) + } + panic(fmt.Errorf("message regen.data.v2.ConvertHashToIRIRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ConvertHashToIRIRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.ConvertHashToIRIRequest.content_hash": + if x.ContentHash == nil { + x.ContentHash = new(ContentHash) + } + return protoreflect.ValueOfMessage(x.ContentHash.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ConvertHashToIRIRequest")) + } + panic(fmt.Errorf("message regen.data.v2.ConvertHashToIRIRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ConvertHashToIRIRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.ConvertHashToIRIRequest.content_hash": + m := new(ContentHash) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ConvertHashToIRIRequest")) + } + panic(fmt.Errorf("message regen.data.v2.ConvertHashToIRIRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ConvertHashToIRIRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.ConvertHashToIRIRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ConvertHashToIRIRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ConvertHashToIRIRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ConvertHashToIRIRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ConvertHashToIRIRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ConvertHashToIRIRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.ContentHash != nil { + l = options.Size(x.ContentHash) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ConvertHashToIRIRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.ContentHash != nil { + encoded, err := options.Marshal(x.ContentHash) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ConvertHashToIRIRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ConvertHashToIRIRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ConvertHashToIRIRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ContentHash", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ContentHash == nil { + x.ContentHash = &ContentHash{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ContentHash); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_ConvertHashToIRIResponse protoreflect.MessageDescriptor + fd_ConvertHashToIRIResponse_iri protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_ConvertHashToIRIResponse = File_regen_data_v2_query_proto.Messages().ByName("ConvertHashToIRIResponse") + fd_ConvertHashToIRIResponse_iri = md_ConvertHashToIRIResponse.Fields().ByName("iri") +} + +var _ protoreflect.Message = (*fastReflection_ConvertHashToIRIResponse)(nil) + +type fastReflection_ConvertHashToIRIResponse ConvertHashToIRIResponse + +func (x *ConvertHashToIRIResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_ConvertHashToIRIResponse)(x) +} + +func (x *ConvertHashToIRIResponse) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ConvertHashToIRIResponse_messageType fastReflection_ConvertHashToIRIResponse_messageType +var _ protoreflect.MessageType = fastReflection_ConvertHashToIRIResponse_messageType{} + +type fastReflection_ConvertHashToIRIResponse_messageType struct{} + +func (x fastReflection_ConvertHashToIRIResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_ConvertHashToIRIResponse)(nil) +} +func (x fastReflection_ConvertHashToIRIResponse_messageType) New() protoreflect.Message { + return new(fastReflection_ConvertHashToIRIResponse) +} +func (x fastReflection_ConvertHashToIRIResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ConvertHashToIRIResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ConvertHashToIRIResponse) Descriptor() protoreflect.MessageDescriptor { + return md_ConvertHashToIRIResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ConvertHashToIRIResponse) Type() protoreflect.MessageType { + return _fastReflection_ConvertHashToIRIResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ConvertHashToIRIResponse) New() protoreflect.Message { + return new(fastReflection_ConvertHashToIRIResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ConvertHashToIRIResponse) Interface() protoreflect.ProtoMessage { + return (*ConvertHashToIRIResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ConvertHashToIRIResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Iri != "" { + value := protoreflect.ValueOfString(x.Iri) + if !f(fd_ConvertHashToIRIResponse_iri, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ConvertHashToIRIResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.ConvertHashToIRIResponse.iri": + return x.Iri != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ConvertHashToIRIResponse")) + } + panic(fmt.Errorf("message regen.data.v2.ConvertHashToIRIResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ConvertHashToIRIResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.ConvertHashToIRIResponse.iri": + x.Iri = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ConvertHashToIRIResponse")) + } + panic(fmt.Errorf("message regen.data.v2.ConvertHashToIRIResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ConvertHashToIRIResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.ConvertHashToIRIResponse.iri": + value := x.Iri + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ConvertHashToIRIResponse")) + } + panic(fmt.Errorf("message regen.data.v2.ConvertHashToIRIResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ConvertHashToIRIResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.ConvertHashToIRIResponse.iri": + x.Iri = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ConvertHashToIRIResponse")) + } + panic(fmt.Errorf("message regen.data.v2.ConvertHashToIRIResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ConvertHashToIRIResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.ConvertHashToIRIResponse.iri": + panic(fmt.Errorf("field iri of message regen.data.v2.ConvertHashToIRIResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ConvertHashToIRIResponse")) + } + panic(fmt.Errorf("message regen.data.v2.ConvertHashToIRIResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ConvertHashToIRIResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.ConvertHashToIRIResponse.iri": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ConvertHashToIRIResponse")) + } + panic(fmt.Errorf("message regen.data.v2.ConvertHashToIRIResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ConvertHashToIRIResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.ConvertHashToIRIResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ConvertHashToIRIResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ConvertHashToIRIResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ConvertHashToIRIResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ConvertHashToIRIResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ConvertHashToIRIResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Iri) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ConvertHashToIRIResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Iri) > 0 { + i -= len(x.Iri) + copy(dAtA[i:], x.Iri) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Iri))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ConvertHashToIRIResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ConvertHashToIRIResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ConvertHashToIRIResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Iri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Iri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_AnchorInfo protoreflect.MessageDescriptor + fd_AnchorInfo_iri protoreflect.FieldDescriptor + fd_AnchorInfo_content_hash protoreflect.FieldDescriptor + fd_AnchorInfo_timestamp protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_AnchorInfo = File_regen_data_v2_query_proto.Messages().ByName("AnchorInfo") + fd_AnchorInfo_iri = md_AnchorInfo.Fields().ByName("iri") + fd_AnchorInfo_content_hash = md_AnchorInfo.Fields().ByName("content_hash") + fd_AnchorInfo_timestamp = md_AnchorInfo.Fields().ByName("timestamp") +} + +var _ protoreflect.Message = (*fastReflection_AnchorInfo)(nil) + +type fastReflection_AnchorInfo AnchorInfo + +func (x *AnchorInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_AnchorInfo)(x) +} + +func (x *AnchorInfo) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_AnchorInfo_messageType fastReflection_AnchorInfo_messageType +var _ protoreflect.MessageType = fastReflection_AnchorInfo_messageType{} + +type fastReflection_AnchorInfo_messageType struct{} + +func (x fastReflection_AnchorInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_AnchorInfo)(nil) +} +func (x fastReflection_AnchorInfo_messageType) New() protoreflect.Message { + return new(fastReflection_AnchorInfo) +} +func (x fastReflection_AnchorInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AnchorInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AnchorInfo) Descriptor() protoreflect.MessageDescriptor { + return md_AnchorInfo +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_AnchorInfo) Type() protoreflect.MessageType { + return _fastReflection_AnchorInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AnchorInfo) New() protoreflect.Message { + return new(fastReflection_AnchorInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AnchorInfo) Interface() protoreflect.ProtoMessage { + return (*AnchorInfo)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_AnchorInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Iri != "" { + value := protoreflect.ValueOfString(x.Iri) + if !f(fd_AnchorInfo_iri, value) { + return + } + } + if x.ContentHash != nil { + value := protoreflect.ValueOfMessage(x.ContentHash.ProtoReflect()) + if !f(fd_AnchorInfo_content_hash, value) { + return + } + } + if x.Timestamp != nil { + value := protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) + if !f(fd_AnchorInfo_timestamp, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_AnchorInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.AnchorInfo.iri": + return x.Iri != "" + case "regen.data.v2.AnchorInfo.content_hash": + return x.ContentHash != nil + case "regen.data.v2.AnchorInfo.timestamp": + return x.Timestamp != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.AnchorInfo")) + } + panic(fmt.Errorf("message regen.data.v2.AnchorInfo does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AnchorInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.AnchorInfo.iri": + x.Iri = "" + case "regen.data.v2.AnchorInfo.content_hash": + x.ContentHash = nil + case "regen.data.v2.AnchorInfo.timestamp": + x.Timestamp = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.AnchorInfo")) + } + panic(fmt.Errorf("message regen.data.v2.AnchorInfo does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_AnchorInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.AnchorInfo.iri": + value := x.Iri + return protoreflect.ValueOfString(value) + case "regen.data.v2.AnchorInfo.content_hash": + value := x.ContentHash + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "regen.data.v2.AnchorInfo.timestamp": + value := x.Timestamp + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.AnchorInfo")) + } + panic(fmt.Errorf("message regen.data.v2.AnchorInfo does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AnchorInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.AnchorInfo.iri": + x.Iri = value.Interface().(string) + case "regen.data.v2.AnchorInfo.content_hash": + x.ContentHash = value.Message().Interface().(*ContentHash) + case "regen.data.v2.AnchorInfo.timestamp": + x.Timestamp = value.Message().Interface().(*timestamppb.Timestamp) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.AnchorInfo")) + } + panic(fmt.Errorf("message regen.data.v2.AnchorInfo does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AnchorInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.AnchorInfo.content_hash": + if x.ContentHash == nil { + x.ContentHash = new(ContentHash) + } + return protoreflect.ValueOfMessage(x.ContentHash.ProtoReflect()) + case "regen.data.v2.AnchorInfo.timestamp": + if x.Timestamp == nil { + x.Timestamp = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) + case "regen.data.v2.AnchorInfo.iri": + panic(fmt.Errorf("field iri of message regen.data.v2.AnchorInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.AnchorInfo")) + } + panic(fmt.Errorf("message regen.data.v2.AnchorInfo does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_AnchorInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.AnchorInfo.iri": + return protoreflect.ValueOfString("") + case "regen.data.v2.AnchorInfo.content_hash": + m := new(ContentHash) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "regen.data.v2.AnchorInfo.timestamp": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.AnchorInfo")) + } + panic(fmt.Errorf("message regen.data.v2.AnchorInfo does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_AnchorInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.AnchorInfo", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_AnchorInfo) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AnchorInfo) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_AnchorInfo) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_AnchorInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AnchorInfo) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Iri) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ContentHash != nil { + l = options.Size(x.ContentHash) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Timestamp != nil { + l = options.Size(x.Timestamp) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*AnchorInfo) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Timestamp != nil { + encoded, err := options.Marshal(x.Timestamp) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if x.ContentHash != nil { + encoded, err := options.Marshal(x.ContentHash) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Iri) > 0 { + i -= len(x.Iri) + copy(dAtA[i:], x.Iri) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Iri))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*AnchorInfo) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AnchorInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AnchorInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Iri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Iri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ContentHash", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ContentHash == nil { + x.ContentHash = &ContentHash{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ContentHash); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Timestamp == nil { + x.Timestamp = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Timestamp); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_AttestationInfo protoreflect.MessageDescriptor + fd_AttestationInfo_iri protoreflect.FieldDescriptor + fd_AttestationInfo_attestor protoreflect.FieldDescriptor + fd_AttestationInfo_timestamp protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_AttestationInfo = File_regen_data_v2_query_proto.Messages().ByName("AttestationInfo") + fd_AttestationInfo_iri = md_AttestationInfo.Fields().ByName("iri") + fd_AttestationInfo_attestor = md_AttestationInfo.Fields().ByName("attestor") + fd_AttestationInfo_timestamp = md_AttestationInfo.Fields().ByName("timestamp") +} + +var _ protoreflect.Message = (*fastReflection_AttestationInfo)(nil) + +type fastReflection_AttestationInfo AttestationInfo + +func (x *AttestationInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_AttestationInfo)(x) +} + +func (x *AttestationInfo) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_AttestationInfo_messageType fastReflection_AttestationInfo_messageType +var _ protoreflect.MessageType = fastReflection_AttestationInfo_messageType{} + +type fastReflection_AttestationInfo_messageType struct{} + +func (x fastReflection_AttestationInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_AttestationInfo)(nil) +} +func (x fastReflection_AttestationInfo_messageType) New() protoreflect.Message { + return new(fastReflection_AttestationInfo) +} +func (x fastReflection_AttestationInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AttestationInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AttestationInfo) Descriptor() protoreflect.MessageDescriptor { + return md_AttestationInfo +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_AttestationInfo) Type() protoreflect.MessageType { + return _fastReflection_AttestationInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AttestationInfo) New() protoreflect.Message { + return new(fastReflection_AttestationInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AttestationInfo) Interface() protoreflect.ProtoMessage { + return (*AttestationInfo)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_AttestationInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Iri != "" { + value := protoreflect.ValueOfString(x.Iri) + if !f(fd_AttestationInfo_iri, value) { + return + } + } + if x.Attestor != "" { + value := protoreflect.ValueOfString(x.Attestor) + if !f(fd_AttestationInfo_attestor, value) { + return + } + } + if x.Timestamp != nil { + value := protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) + if !f(fd_AttestationInfo_timestamp, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_AttestationInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.AttestationInfo.iri": + return x.Iri != "" + case "regen.data.v2.AttestationInfo.attestor": + return x.Attestor != "" + case "regen.data.v2.AttestationInfo.timestamp": + return x.Timestamp != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.AttestationInfo")) + } + panic(fmt.Errorf("message regen.data.v2.AttestationInfo does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AttestationInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.AttestationInfo.iri": + x.Iri = "" + case "regen.data.v2.AttestationInfo.attestor": + x.Attestor = "" + case "regen.data.v2.AttestationInfo.timestamp": + x.Timestamp = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.AttestationInfo")) + } + panic(fmt.Errorf("message regen.data.v2.AttestationInfo does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_AttestationInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.AttestationInfo.iri": + value := x.Iri + return protoreflect.ValueOfString(value) + case "regen.data.v2.AttestationInfo.attestor": + value := x.Attestor + return protoreflect.ValueOfString(value) + case "regen.data.v2.AttestationInfo.timestamp": + value := x.Timestamp + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.AttestationInfo")) + } + panic(fmt.Errorf("message regen.data.v2.AttestationInfo does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AttestationInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.AttestationInfo.iri": + x.Iri = value.Interface().(string) + case "regen.data.v2.AttestationInfo.attestor": + x.Attestor = value.Interface().(string) + case "regen.data.v2.AttestationInfo.timestamp": + x.Timestamp = value.Message().Interface().(*timestamppb.Timestamp) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.AttestationInfo")) + } + panic(fmt.Errorf("message regen.data.v2.AttestationInfo does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AttestationInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.AttestationInfo.timestamp": + if x.Timestamp == nil { + x.Timestamp = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) + case "regen.data.v2.AttestationInfo.iri": + panic(fmt.Errorf("field iri of message regen.data.v2.AttestationInfo is not mutable")) + case "regen.data.v2.AttestationInfo.attestor": + panic(fmt.Errorf("field attestor of message regen.data.v2.AttestationInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.AttestationInfo")) + } + panic(fmt.Errorf("message regen.data.v2.AttestationInfo does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_AttestationInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.AttestationInfo.iri": + return protoreflect.ValueOfString("") + case "regen.data.v2.AttestationInfo.attestor": + return protoreflect.ValueOfString("") + case "regen.data.v2.AttestationInfo.timestamp": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.AttestationInfo")) + } + panic(fmt.Errorf("message regen.data.v2.AttestationInfo does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_AttestationInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.AttestationInfo", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_AttestationInfo) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AttestationInfo) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_AttestationInfo) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_AttestationInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AttestationInfo) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Iri) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Attestor) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Timestamp != nil { + l = options.Size(x.Timestamp) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*AttestationInfo) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Timestamp != nil { + encoded, err := options.Marshal(x.Timestamp) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if len(x.Attestor) > 0 { + i -= len(x.Attestor) + copy(dAtA[i:], x.Attestor) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Attestor))) + i-- + dAtA[i] = 0x12 + } + if len(x.Iri) > 0 { + i -= len(x.Iri) + copy(dAtA[i:], x.Iri) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Iri))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*AttestationInfo) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AttestationInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AttestationInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Iri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Iri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Attestor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Attestor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Timestamp == nil { + x.Timestamp = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Timestamp); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_ResolverInfo protoreflect.MessageDescriptor + fd_ResolverInfo_id protoreflect.FieldDescriptor + fd_ResolverInfo_url protoreflect.FieldDescriptor + fd_ResolverInfo_manager protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_query_proto_init() + md_ResolverInfo = File_regen_data_v2_query_proto.Messages().ByName("ResolverInfo") + fd_ResolverInfo_id = md_ResolverInfo.Fields().ByName("id") + fd_ResolverInfo_url = md_ResolverInfo.Fields().ByName("url") + fd_ResolverInfo_manager = md_ResolverInfo.Fields().ByName("manager") +} + +var _ protoreflect.Message = (*fastReflection_ResolverInfo)(nil) + +type fastReflection_ResolverInfo ResolverInfo + +func (x *ResolverInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_ResolverInfo)(x) +} + +func (x *ResolverInfo) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_query_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ResolverInfo_messageType fastReflection_ResolverInfo_messageType +var _ protoreflect.MessageType = fastReflection_ResolverInfo_messageType{} + +type fastReflection_ResolverInfo_messageType struct{} + +func (x fastReflection_ResolverInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_ResolverInfo)(nil) +} +func (x fastReflection_ResolverInfo_messageType) New() protoreflect.Message { + return new(fastReflection_ResolverInfo) +} +func (x fastReflection_ResolverInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ResolverInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ResolverInfo) Descriptor() protoreflect.MessageDescriptor { + return md_ResolverInfo +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ResolverInfo) Type() protoreflect.MessageType { + return _fastReflection_ResolverInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ResolverInfo) New() protoreflect.Message { + return new(fastReflection_ResolverInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ResolverInfo) Interface() protoreflect.ProtoMessage { + return (*ResolverInfo)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ResolverInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != uint64(0) { + value := protoreflect.ValueOfUint64(x.Id) + if !f(fd_ResolverInfo_id, value) { + return + } + } + if x.Url != "" { + value := protoreflect.ValueOfString(x.Url) + if !f(fd_ResolverInfo_url, value) { + return + } + } + if x.Manager != "" { + value := protoreflect.ValueOfString(x.Manager) + if !f(fd_ResolverInfo_manager, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ResolverInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.ResolverInfo.id": + return x.Id != uint64(0) + case "regen.data.v2.ResolverInfo.url": + return x.Url != "" + case "regen.data.v2.ResolverInfo.manager": + return x.Manager != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ResolverInfo")) + } + panic(fmt.Errorf("message regen.data.v2.ResolverInfo does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ResolverInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.ResolverInfo.id": + x.Id = uint64(0) + case "regen.data.v2.ResolverInfo.url": + x.Url = "" + case "regen.data.v2.ResolverInfo.manager": + x.Manager = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ResolverInfo")) + } + panic(fmt.Errorf("message regen.data.v2.ResolverInfo does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ResolverInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.ResolverInfo.id": + value := x.Id + return protoreflect.ValueOfUint64(value) + case "regen.data.v2.ResolverInfo.url": + value := x.Url + return protoreflect.ValueOfString(value) + case "regen.data.v2.ResolverInfo.manager": + value := x.Manager + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ResolverInfo")) + } + panic(fmt.Errorf("message regen.data.v2.ResolverInfo does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ResolverInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.ResolverInfo.id": + x.Id = value.Uint() + case "regen.data.v2.ResolverInfo.url": + x.Url = value.Interface().(string) + case "regen.data.v2.ResolverInfo.manager": + x.Manager = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ResolverInfo")) + } + panic(fmt.Errorf("message regen.data.v2.ResolverInfo does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ResolverInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.ResolverInfo.id": + panic(fmt.Errorf("field id of message regen.data.v2.ResolverInfo is not mutable")) + case "regen.data.v2.ResolverInfo.url": + panic(fmt.Errorf("field url of message regen.data.v2.ResolverInfo is not mutable")) + case "regen.data.v2.ResolverInfo.manager": + panic(fmt.Errorf("field manager of message regen.data.v2.ResolverInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ResolverInfo")) + } + panic(fmt.Errorf("message regen.data.v2.ResolverInfo does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ResolverInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.ResolverInfo.id": + return protoreflect.ValueOfUint64(uint64(0)) + case "regen.data.v2.ResolverInfo.url": + return protoreflect.ValueOfString("") + case "regen.data.v2.ResolverInfo.manager": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ResolverInfo")) + } + panic(fmt.Errorf("message regen.data.v2.ResolverInfo does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ResolverInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.ResolverInfo", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ResolverInfo) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ResolverInfo) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ResolverInfo) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ResolverInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ResolverInfo) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Id != 0 { + n += 1 + runtime.Sov(uint64(x.Id)) + } + l = len(x.Url) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Manager) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ResolverInfo) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Manager) > 0 { + i -= len(x.Manager) + copy(dAtA[i:], x.Manager) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Manager))) + i-- + dAtA[i] = 0x1a + } + if len(x.Url) > 0 { + i -= len(x.Url) + copy(dAtA[i:], x.Url) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Url))) + i-- + dAtA[i] = 0x12 + } + if x.Id != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ResolverInfo) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ResolverInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ResolverInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + x.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Url = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Manager", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Manager = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: regen/data/v2/query.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// QueryAnchorByIRIRequest is the Query/AnchorByIRI request type. +type QueryAnchorByIRIRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // iri is the IRI of the anchored data. + Iri string `protobuf:"bytes,1,opt,name=iri,proto3" json:"iri,omitempty"` +} + +func (x *QueryAnchorByIRIRequest) Reset() { + *x = QueryAnchorByIRIRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAnchorByIRIRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAnchorByIRIRequest) ProtoMessage() {} + +// Deprecated: Use QueryAnchorByIRIRequest.ProtoReflect.Descriptor instead. +func (*QueryAnchorByIRIRequest) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{0} +} + +func (x *QueryAnchorByIRIRequest) GetIri() string { + if x != nil { + return x.Iri + } + return "" +} + +// QueryAnchorByIRIResponse is the Query/AnchorByIRI response type. +type QueryAnchorByIRIResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // anchor is information about the data anchor. + Anchor *AnchorInfo `protobuf:"bytes,1,opt,name=anchor,proto3" json:"anchor,omitempty"` +} + +func (x *QueryAnchorByIRIResponse) Reset() { + *x = QueryAnchorByIRIResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAnchorByIRIResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAnchorByIRIResponse) ProtoMessage() {} + +// Deprecated: Use QueryAnchorByIRIResponse.ProtoReflect.Descriptor instead. +func (*QueryAnchorByIRIResponse) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryAnchorByIRIResponse) GetAnchor() *AnchorInfo { + if x != nil { + return x.Anchor + } + return nil +} + +// QueryAnchorByHashRequest is the Query/AnchorByHash request type. +type QueryAnchorByHashRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // content_hash is the ContentHash of the anchored data. + ContentHash *ContentHash `protobuf:"bytes,1,opt,name=content_hash,json=contentHash,proto3" json:"content_hash,omitempty"` +} + +func (x *QueryAnchorByHashRequest) Reset() { + *x = QueryAnchorByHashRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAnchorByHashRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAnchorByHashRequest) ProtoMessage() {} + +// Deprecated: Use QueryAnchorByHashRequest.ProtoReflect.Descriptor instead. +func (*QueryAnchorByHashRequest) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{2} +} + +func (x *QueryAnchorByHashRequest) GetContentHash() *ContentHash { + if x != nil { + return x.ContentHash + } + return nil +} + +// QueryAnchorByHashResponse is the Query/AnchorByHash response type. +type QueryAnchorByHashResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // anchor is information about the data anchor. + Anchor *AnchorInfo `protobuf:"bytes,1,opt,name=anchor,proto3" json:"anchor,omitempty"` +} + +func (x *QueryAnchorByHashResponse) Reset() { + *x = QueryAnchorByHashResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAnchorByHashResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAnchorByHashResponse) ProtoMessage() {} + +// Deprecated: Use QueryAnchorByHashResponse.ProtoReflect.Descriptor instead. +func (*QueryAnchorByHashResponse) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{3} +} + +func (x *QueryAnchorByHashResponse) GetAnchor() *AnchorInfo { + if x != nil { + return x.Anchor + } + return nil +} + +// QueryAttestationsByAttestorRequest is the Query/AttestationsByAttestor +// request type. +type QueryAttestationsByAttestorRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // attestor is the address of the attestor. + Attestor string `protobuf:"bytes,1,opt,name=attestor,proto3" json:"attestor,omitempty"` + // pagination is the PageRequest to use for pagination. + Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryAttestationsByAttestorRequest) Reset() { + *x = QueryAttestationsByAttestorRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAttestationsByAttestorRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAttestationsByAttestorRequest) ProtoMessage() {} + +// Deprecated: Use QueryAttestationsByAttestorRequest.ProtoReflect.Descriptor instead. +func (*QueryAttestationsByAttestorRequest) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{4} +} + +func (x *QueryAttestationsByAttestorRequest) GetAttestor() string { + if x != nil { + return x.Attestor + } + return "" +} + +func (x *QueryAttestationsByAttestorRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryAttestationsByAttestorResponse is the Query/AttestationsByAttestor +// response type. +type QueryAttestationsByAttestorResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // attestations are the attestations by the attestor. + Attestations []*AttestationInfo `protobuf:"bytes,1,rep,name=attestations,proto3" json:"attestations,omitempty"` + // pagination is the pagination PageResponse. + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryAttestationsByAttestorResponse) Reset() { + *x = QueryAttestationsByAttestorResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAttestationsByAttestorResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAttestationsByAttestorResponse) ProtoMessage() {} + +// Deprecated: Use QueryAttestationsByAttestorResponse.ProtoReflect.Descriptor instead. +func (*QueryAttestationsByAttestorResponse) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{5} +} + +func (x *QueryAttestationsByAttestorResponse) GetAttestations() []*AttestationInfo { + if x != nil { + return x.Attestations + } + return nil +} + +func (x *QueryAttestationsByAttestorResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryAttestationsByIRIRequest is the Query/AttestationsByIRI request type. +type QueryAttestationsByIRIRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // iri is the IRI of the anchored data. + Iri string `protobuf:"bytes,1,opt,name=iri,proto3" json:"iri,omitempty"` + // pagination is the PageRequest to use for pagination. + Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryAttestationsByIRIRequest) Reset() { + *x = QueryAttestationsByIRIRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAttestationsByIRIRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAttestationsByIRIRequest) ProtoMessage() {} + +// Deprecated: Use QueryAttestationsByIRIRequest.ProtoReflect.Descriptor instead. +func (*QueryAttestationsByIRIRequest) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{6} +} + +func (x *QueryAttestationsByIRIRequest) GetIri() string { + if x != nil { + return x.Iri + } + return "" +} + +func (x *QueryAttestationsByIRIRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryAttestationsByIRIResponse is the Query/AttestationsByIRI response type. +type QueryAttestationsByIRIResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // attestations are the attestations that have been made to the anchored data. + Attestations []*AttestationInfo `protobuf:"bytes,1,rep,name=attestations,proto3" json:"attestations,omitempty"` + // pagination is the pagination PageResponse. + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryAttestationsByIRIResponse) Reset() { + *x = QueryAttestationsByIRIResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAttestationsByIRIResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAttestationsByIRIResponse) ProtoMessage() {} + +// Deprecated: Use QueryAttestationsByIRIResponse.ProtoReflect.Descriptor instead. +func (*QueryAttestationsByIRIResponse) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{7} +} + +func (x *QueryAttestationsByIRIResponse) GetAttestations() []*AttestationInfo { + if x != nil { + return x.Attestations + } + return nil +} + +func (x *QueryAttestationsByIRIResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryAttestationsByHashRequest is the Query/AttestationsByHash request type. +type QueryAttestationsByHashRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // content_hash is the ContentHash of the anchored data. + ContentHash *ContentHash `protobuf:"bytes,1,opt,name=content_hash,json=contentHash,proto3" json:"content_hash,omitempty"` + // pagination is the PageRequest to use for pagination. + Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryAttestationsByHashRequest) Reset() { + *x = QueryAttestationsByHashRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAttestationsByHashRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAttestationsByHashRequest) ProtoMessage() {} + +// Deprecated: Use QueryAttestationsByHashRequest.ProtoReflect.Descriptor instead. +func (*QueryAttestationsByHashRequest) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{8} +} + +func (x *QueryAttestationsByHashRequest) GetContentHash() *ContentHash { + if x != nil { + return x.ContentHash + } + return nil +} + +func (x *QueryAttestationsByHashRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryAttestationsByHashResponse is the Query/AttestationsByHash response +// type. +type QueryAttestationsByHashResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // attestations are the attestations that have been made to the anchored data. + Attestations []*AttestationInfo `protobuf:"bytes,1,rep,name=attestations,proto3" json:"attestations,omitempty"` + // pagination is the pagination PageResponse. + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryAttestationsByHashResponse) Reset() { + *x = QueryAttestationsByHashResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAttestationsByHashResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAttestationsByHashResponse) ProtoMessage() {} + +// Deprecated: Use QueryAttestationsByHashResponse.ProtoReflect.Descriptor instead. +func (*QueryAttestationsByHashResponse) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{9} +} + +func (x *QueryAttestationsByHashResponse) GetAttestations() []*AttestationInfo { + if x != nil { + return x.Attestations + } + return nil +} + +func (x *QueryAttestationsByHashResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryResolverRequest is the Query/Resolver request type. +type QueryResolverRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // id is the ID of the resolver. + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *QueryResolverRequest) Reset() { + *x = QueryResolverRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryResolverRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryResolverRequest) ProtoMessage() {} + +// Deprecated: Use QueryResolverRequest.ProtoReflect.Descriptor instead. +func (*QueryResolverRequest) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{10} +} + +func (x *QueryResolverRequest) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +// QueryResolverResponse is the Query/Resolver response type. +type QueryResolverResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // resolver is information about the resolver. + Resolver *ResolverInfo `protobuf:"bytes,1,opt,name=resolver,proto3" json:"resolver,omitempty"` +} + +func (x *QueryResolverResponse) Reset() { + *x = QueryResolverResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryResolverResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryResolverResponse) ProtoMessage() {} + +// Deprecated: Use QueryResolverResponse.ProtoReflect.Descriptor instead. +func (*QueryResolverResponse) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{11} +} + +func (x *QueryResolverResponse) GetResolver() *ResolverInfo { + if x != nil { + return x.Resolver + } + return nil +} + +// QueryResolversByIRIRequest is the Query/ResolversByIRI request type. +type QueryResolversByIRIRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // iri is the IRI of the anchored data. + Iri string `protobuf:"bytes,1,opt,name=iri,proto3" json:"iri,omitempty"` + // pagination is the PageRequest to use for pagination. + Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryResolversByIRIRequest) Reset() { + *x = QueryResolversByIRIRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryResolversByIRIRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryResolversByIRIRequest) ProtoMessage() {} + +// Deprecated: Use QueryResolversByIRIRequest.ProtoReflect.Descriptor instead. +func (*QueryResolversByIRIRequest) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{12} +} + +func (x *QueryResolversByIRIRequest) GetIri() string { + if x != nil { + return x.Iri + } + return "" +} + +func (x *QueryResolversByIRIRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryResolversByIRIResponse is the Query/ResolversByIRI response type. +type QueryResolversByIRIResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // resolvers are the resolvers that have registered the anchored data. + Resolvers []*ResolverInfo `protobuf:"bytes,1,rep,name=resolvers,proto3" json:"resolvers,omitempty"` + // pagination is the PageResponse to use for pagination. + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryResolversByIRIResponse) Reset() { + *x = QueryResolversByIRIResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryResolversByIRIResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryResolversByIRIResponse) ProtoMessage() {} + +// Deprecated: Use QueryResolversByIRIResponse.ProtoReflect.Descriptor instead. +func (*QueryResolversByIRIResponse) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{13} +} + +func (x *QueryResolversByIRIResponse) GetResolvers() []*ResolverInfo { + if x != nil { + return x.Resolvers + } + return nil +} + +func (x *QueryResolversByIRIResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryResolversByHashRequest is the Query/ResolversByHash request type. +type QueryResolversByHashRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // content_hash is the ContentHash of the anchored data. + ContentHash *ContentHash `protobuf:"bytes,1,opt,name=content_hash,json=contentHash,proto3" json:"content_hash,omitempty"` + // pagination is the PageRequest to use for pagination. + Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryResolversByHashRequest) Reset() { + *x = QueryResolversByHashRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryResolversByHashRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryResolversByHashRequest) ProtoMessage() {} + +// Deprecated: Use QueryResolversByHashRequest.ProtoReflect.Descriptor instead. +func (*QueryResolversByHashRequest) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{14} +} + +func (x *QueryResolversByHashRequest) GetContentHash() *ContentHash { + if x != nil { + return x.ContentHash + } + return nil +} + +func (x *QueryResolversByHashRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryResolversByHashResponse is the Query/ResolversByHash response type. +type QueryResolversByHashResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // resolvers are the resolvers that have registered the data. + Resolvers []*ResolverInfo `protobuf:"bytes,1,rep,name=resolvers,proto3" json:"resolvers,omitempty"` + // pagination is the PageResponse to use for pagination. + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryResolversByHashResponse) Reset() { + *x = QueryResolversByHashResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryResolversByHashResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryResolversByHashResponse) ProtoMessage() {} + +// Deprecated: Use QueryResolversByHashResponse.ProtoReflect.Descriptor instead. +func (*QueryResolversByHashResponse) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{15} +} + +func (x *QueryResolversByHashResponse) GetResolvers() []*ResolverInfo { + if x != nil { + return x.Resolvers + } + return nil +} + +func (x *QueryResolversByHashResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryResolversByURLRequest is the Query/ResolversByURL request type. +type QueryResolversByURLRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // url is the URL of the resolver. + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + // pagination is the PageRequest to use for pagination. + Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryResolversByURLRequest) Reset() { + *x = QueryResolversByURLRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryResolversByURLRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryResolversByURLRequest) ProtoMessage() {} + +// Deprecated: Use QueryResolversByURLRequest.ProtoReflect.Descriptor instead. +func (*QueryResolversByURLRequest) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{16} +} + +func (x *QueryResolversByURLRequest) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *QueryResolversByURLRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +// QueryResolversByURLResponse is the Query/ResolversByURL response type. +type QueryResolversByURLResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // resolvers are the resolvers that have a matching URL. + Resolvers []*ResolverInfo `protobuf:"bytes,1,rep,name=resolvers,proto3" json:"resolvers,omitempty"` + // pagination is the PageResponse to use for pagination. + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryResolversByURLResponse) Reset() { + *x = QueryResolversByURLResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryResolversByURLResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryResolversByURLResponse) ProtoMessage() {} + +// Deprecated: Use QueryResolversByURLResponse.ProtoReflect.Descriptor instead. +func (*QueryResolversByURLResponse) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{17} +} + +func (x *QueryResolversByURLResponse) GetResolvers() []*ResolverInfo { + if x != nil { + return x.Resolvers + } + return nil +} + +func (x *QueryResolversByURLResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +// ConvertIRIToHashRequest is the Query/ConvertIRIToHash request type. +type ConvertIRIToHashRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // iri is the IRI to convert to a ContentHash. + Iri string `protobuf:"bytes,1,opt,name=iri,proto3" json:"iri,omitempty"` +} + +func (x *ConvertIRIToHashRequest) Reset() { + *x = ConvertIRIToHashRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConvertIRIToHashRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConvertIRIToHashRequest) ProtoMessage() {} + +// Deprecated: Use ConvertIRIToHashRequest.ProtoReflect.Descriptor instead. +func (*ConvertIRIToHashRequest) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{18} +} + +func (x *ConvertIRIToHashRequest) GetIri() string { + if x != nil { + return x.Iri + } + return "" +} + +// ConvertIRIToHashResponse is the Query/ConvertIRIToHash response type. +type ConvertIRIToHashResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // content_hash is the ContentHash converted from the IRI. + ContentHash *ContentHash `protobuf:"bytes,1,opt,name=content_hash,json=contentHash,proto3" json:"content_hash,omitempty"` +} + +func (x *ConvertIRIToHashResponse) Reset() { + *x = ConvertIRIToHashResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConvertIRIToHashResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConvertIRIToHashResponse) ProtoMessage() {} + +// Deprecated: Use ConvertIRIToHashResponse.ProtoReflect.Descriptor instead. +func (*ConvertIRIToHashResponse) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{19} +} + +func (x *ConvertIRIToHashResponse) GetContentHash() *ContentHash { + if x != nil { + return x.ContentHash + } + return nil +} + +// ConvertHashToIRIRequest is the Query/ConvertHashToIRI request type. +type ConvertHashToIRIRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // content_hash is the ContentHash to convert to an IRI. + ContentHash *ContentHash `protobuf:"bytes,1,opt,name=content_hash,json=contentHash,proto3" json:"content_hash,omitempty"` +} + +func (x *ConvertHashToIRIRequest) Reset() { + *x = ConvertHashToIRIRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConvertHashToIRIRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConvertHashToIRIRequest) ProtoMessage() {} + +// Deprecated: Use ConvertHashToIRIRequest.ProtoReflect.Descriptor instead. +func (*ConvertHashToIRIRequest) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{20} +} + +func (x *ConvertHashToIRIRequest) GetContentHash() *ContentHash { + if x != nil { + return x.ContentHash + } + return nil +} + +// ConvertHashToIRIResponse is the Query/ConvertHashToIRI response type. +type ConvertHashToIRIResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // iri is the IRI converted from the ContentHash. + Iri string `protobuf:"bytes,1,opt,name=iri,proto3" json:"iri,omitempty"` +} + +func (x *ConvertHashToIRIResponse) Reset() { + *x = ConvertHashToIRIResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConvertHashToIRIResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConvertHashToIRIResponse) ProtoMessage() {} + +// Deprecated: Use ConvertHashToIRIResponse.ProtoReflect.Descriptor instead. +func (*ConvertHashToIRIResponse) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{21} +} + +func (x *ConvertHashToIRIResponse) GetIri() string { + if x != nil { + return x.Iri + } + return "" +} + +// AnchorInfo is the information for a data anchor. +type AnchorInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // iri is the IRI of the anchored data. + Iri string `protobuf:"bytes,1,opt,name=iri,proto3" json:"iri,omitempty"` + // content_hash is the ContentHash of the anchored data. + ContentHash *ContentHash `protobuf:"bytes,2,opt,name=content_hash,json=contentHash,proto3" json:"content_hash,omitempty"` + // timestamp is the time at which the data was anchored. + Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *AnchorInfo) Reset() { + *x = AnchorInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AnchorInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnchorInfo) ProtoMessage() {} + +// Deprecated: Use AnchorInfo.ProtoReflect.Descriptor instead. +func (*AnchorInfo) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{22} +} + +func (x *AnchorInfo) GetIri() string { + if x != nil { + return x.Iri + } + return "" +} + +func (x *AnchorInfo) GetContentHash() *ContentHash { + if x != nil { + return x.ContentHash + } + return nil +} + +func (x *AnchorInfo) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// AttestationInfo is the information for an attestation. +type AttestationInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // iri is the IRI of the anchored data. + Iri string `protobuf:"bytes,1,opt,name=iri,proto3" json:"iri,omitempty"` + // attestor is the address of the account that attested to the anchored data. + Attestor string `protobuf:"bytes,2,opt,name=attestor,proto3" json:"attestor,omitempty"` + // timestamp is the time at which the data was attested to. + Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *AttestationInfo) Reset() { + *x = AttestationInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AttestationInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AttestationInfo) ProtoMessage() {} + +// Deprecated: Use AttestationInfo.ProtoReflect.Descriptor instead. +func (*AttestationInfo) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{23} +} + +func (x *AttestationInfo) GetIri() string { + if x != nil { + return x.Iri + } + return "" +} + +func (x *AttestationInfo) GetAttestor() string { + if x != nil { + return x.Attestor + } + return "" +} + +func (x *AttestationInfo) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// ResolverInfo is the information for a resolver. +type ResolverInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // id is the ID of the resolver. + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // url is the URL of the resolver. + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + // manager is the address of the account that manages the resolver. + Manager string `protobuf:"bytes,3,opt,name=manager,proto3" json:"manager,omitempty"` +} + +func (x *ResolverInfo) Reset() { + *x = ResolverInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_query_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResolverInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResolverInfo) ProtoMessage() {} + +// Deprecated: Use ResolverInfo.ProtoReflect.Descriptor instead. +func (*ResolverInfo) Descriptor() ([]byte, []int) { + return file_regen_data_v2_query_proto_rawDescGZIP(), []int{24} +} + +func (x *ResolverInfo) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *ResolverInfo) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *ResolverInfo) GetManager() string { + if x != nil { + return x.Manager + } + return "" +} + +var File_regen_data_v2_query_proto protoreflect.FileDescriptor + +var file_regen_data_v2_query_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x32, 0x2f, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x72, 0x65, 0x67, + 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, + 0x61, 0x2f, 0x76, 0x32, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x2b, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x42, + 0x79, 0x49, 0x52, 0x49, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, + 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x72, 0x69, 0x22, 0x4d, 0x0a, + 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x42, 0x79, 0x49, 0x52, + 0x49, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x61, 0x6e, 0x63, + 0x68, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x72, 0x65, 0x67, 0x65, + 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x63, 0x68, 0x6f, 0x72, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x61, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x22, 0x59, 0x0a, 0x18, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x42, 0x79, 0x48, 0x61, 0x73, + 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x22, 0x4e, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x41, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x42, 0x79, 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x61, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x06, 0x61, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x22, 0x88, 0x01, 0x0a, 0x22, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x41, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, + 0x0a, 0x08, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0xb2, 0x01, 0x0a, 0x23, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0c, 0x61, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, + 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x47, + 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x79, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x49, 0x52, + 0x49, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x72, 0x69, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x72, 0x69, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0xad, 0x01, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x49, 0x52, 0x49, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x61, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0xa7, 0x01, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x72, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x48, 0x61, 0x73, 0x68, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xae, 0x01, 0x0a, + 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x42, 0x79, 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x42, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x26, 0x0a, + 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x02, 0x69, 0x64, 0x22, 0x50, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, + 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, + 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x72, + 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x22, 0x76, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x42, 0x79, 0x49, 0x52, 0x49, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x69, 0x72, 0x69, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0xa1, 0x01, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, + 0x72, 0x73, 0x42, 0x79, 0x49, 0x52, 0x49, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x39, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x09, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0xa4, 0x01, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, + 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x42, 0x79, 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x72, 0x65, 0x67, 0x65, + 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x48, 0x61, 0x73, 0x68, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa2, 0x01, 0x0a, 0x1c, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x42, 0x79, 0x48, + 0x61, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x72, + 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x52, + 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x72, 0x65, 0x73, + 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x76, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, + 0x73, 0x42, 0x79, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, + 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, + 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa1, 0x01, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x42, 0x79, 0x55, 0x52, 0x4c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x72, 0x65, 0x67, + 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, + 0x72, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, + 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2b, 0x0a, 0x17, 0x43, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x49, 0x52, 0x49, 0x54, 0x6f, 0x48, 0x61, 0x73, 0x68, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x72, 0x69, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x72, 0x69, 0x22, 0x59, 0x0a, 0x18, 0x43, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x74, 0x49, 0x52, 0x49, 0x54, 0x6f, 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x72, 0x65, 0x67, + 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, + 0x61, 0x73, 0x68, 0x22, 0x58, 0x0a, 0x17, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x48, 0x61, + 0x73, 0x68, 0x54, 0x6f, 0x49, 0x52, 0x49, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, + 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, + 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x22, 0x2c, 0x0a, + 0x18, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x48, 0x61, 0x73, 0x68, 0x54, 0x6f, 0x49, 0x52, + 0x49, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x72, 0x69, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x72, 0x69, 0x22, 0x97, 0x01, 0x0a, 0x0a, + 0x41, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x72, + 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x72, 0x69, 0x12, 0x3d, 0x0a, 0x0c, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x52, 0x0b, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x38, 0x0a, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x79, 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x72, 0x69, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x72, 0x69, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x22, 0x4a, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, + 0x72, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x32, 0xf6, 0x0f, 0x0a, + 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0xae, 0x01, 0x0a, 0x0b, 0x41, 0x6e, 0x63, 0x68, 0x6f, + 0x72, 0x42, 0x79, 0x49, 0x52, 0x49, 0x12, 0x26, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6e, 0x63, 0x68, + 0x6f, 0x72, 0x42, 0x79, 0x49, 0x52, 0x49, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, + 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x41, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x42, 0x79, 0x49, 0x52, 0x49, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, 0x12, + 0x22, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x32, 0x2f, + 0x61, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x2d, 0x62, 0x79, 0x2d, 0x69, 0x72, 0x69, 0x2f, 0x7b, 0x69, + 0x72, 0x69, 0x7d, 0x5a, 0x22, 0x12, 0x20, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, + 0x74, 0x61, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x73, 0x2f, 0x69, 0x72, + 0x69, 0x2f, 0x7b, 0x69, 0x72, 0x69, 0x7d, 0x12, 0xad, 0x01, 0x0a, 0x0c, 0x41, 0x6e, 0x63, 0x68, + 0x6f, 0x72, 0x42, 0x79, 0x48, 0x61, 0x73, 0x68, 0x12, 0x27, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6e, + 0x63, 0x68, 0x6f, 0x72, 0x42, 0x79, 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x28, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, + 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x42, 0x79, 0x48, + 0x61, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4a, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x44, 0x22, 0x1d, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, + 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x2d, 0x62, 0x79, 0x2d, 0x68, 0x61, + 0x73, 0x68, 0x3a, 0x01, 0x2a, 0x5a, 0x20, 0x22, 0x1b, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, + 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x73, 0x2f, + 0x68, 0x61, 0x73, 0x68, 0x3a, 0x01, 0x2a, 0x12, 0xee, 0x01, 0x0a, 0x16, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x12, 0x31, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6d, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x67, 0x12, 0x32, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, + 0x32, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2d, 0x62, + 0x79, 0x2d, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x2f, 0x7b, 0x61, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x7d, 0x5a, 0x31, 0x12, 0x2f, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, + 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x2f, 0x7b, 0x61, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x7d, 0x12, 0xcb, 0x01, 0x0a, 0x11, 0x41, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x49, 0x52, 0x49, 0x12, 0x2c, + 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x42, 0x79, 0x49, 0x52, 0x49, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x72, + 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, + 0x49, 0x52, 0x49, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x59, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x53, 0x12, 0x28, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, + 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2d, 0x62, 0x79, 0x2d, 0x69, 0x72, 0x69, 0x2f, 0x7b, 0x69, 0x72, 0x69, 0x7d, 0x5a, 0x27, 0x12, + 0x25, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x32, 0x2f, + 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x69, 0x72, 0x69, + 0x2f, 0x7b, 0x69, 0x72, 0x69, 0x7d, 0x12, 0xca, 0x01, 0x0a, 0x12, 0x41, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2d, 0x2e, + 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, + 0x79, 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x72, + 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, + 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x55, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x4f, 0x22, 0x23, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, + 0x61, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2d, 0x62, 0x79, 0x2d, 0x68, 0x61, 0x73, 0x68, 0x3a, 0x01, 0x2a, 0x5a, 0x25, 0x22, 0x20, + 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x32, 0x2f, 0x61, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x68, 0x61, 0x73, 0x68, + 0x3a, 0x01, 0x2a, 0x12, 0x9c, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, + 0x12, 0x23, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x3f, 0x12, 0x1c, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, + 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x2f, 0x7b, 0x69, 0x64, + 0x7d, 0x5a, 0x1f, 0x12, 0x1d, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, + 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x69, + 0x64, 0x7d, 0x12, 0xbc, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, + 0x42, 0x79, 0x49, 0x52, 0x49, 0x12, 0x29, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x72, 0x73, 0x42, 0x79, 0x49, 0x52, 0x49, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2a, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x42, + 0x79, 0x49, 0x52, 0x49, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x4d, 0x12, 0x25, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, + 0x61, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x2d, 0x62, + 0x79, 0x2d, 0x69, 0x72, 0x69, 0x2f, 0x7b, 0x69, 0x72, 0x69, 0x7d, 0x5a, 0x24, 0x12, 0x22, 0x2f, + 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x2f, 0x69, 0x72, 0x69, 0x2f, 0x7b, 0x69, 0x72, 0x69, + 0x7d, 0x12, 0xbb, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x42, + 0x79, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2a, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x72, 0x73, 0x42, 0x79, 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2b, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, + 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, + 0x42, 0x79, 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x49, 0x22, 0x20, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, + 0x2d, 0x62, 0x79, 0x2d, 0x68, 0x61, 0x73, 0x68, 0x3a, 0x01, 0x2a, 0x5a, 0x22, 0x22, 0x1d, 0x2f, + 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x3a, 0x01, 0x2a, 0x12, + 0xb6, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x42, 0x79, 0x55, + 0x52, 0x4c, 0x12, 0x29, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x76, 0x32, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, + 0x73, 0x42, 0x79, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, + 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x42, 0x79, 0x55, 0x52, + 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4d, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x47, 0x22, 0x1f, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, + 0x32, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x73, 0x2d, 0x62, 0x79, 0x2d, 0x75, + 0x72, 0x6c, 0x3a, 0x01, 0x2a, 0x5a, 0x21, 0x22, 0x1c, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, + 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, + 0x73, 0x2f, 0x75, 0x72, 0x6c, 0x3a, 0x01, 0x2a, 0x12, 0x95, 0x01, 0x0a, 0x10, 0x43, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x74, 0x49, 0x52, 0x49, 0x54, 0x6f, 0x48, 0x61, 0x73, 0x68, 0x12, 0x26, 0x2e, + 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x74, 0x49, 0x52, 0x49, 0x54, 0x6f, 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x49, 0x52, 0x49, + 0x54, 0x6f, 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x2d, 0x69, + 0x72, 0x69, 0x2d, 0x74, 0x6f, 0x2d, 0x68, 0x61, 0x73, 0x68, 0x2f, 0x7b, 0x69, 0x72, 0x69, 0x7d, + 0x12, 0x92, 0x01, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x48, 0x61, 0x73, 0x68, + 0x54, 0x6f, 0x49, 0x52, 0x49, 0x12, 0x26, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x48, 0x61, 0x73, + 0x68, 0x54, 0x6f, 0x49, 0x52, 0x49, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, + 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x74, 0x48, 0x61, 0x73, 0x68, 0x54, 0x6f, 0x49, 0x52, 0x49, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x22, 0x22, + 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x32, 0x2f, 0x63, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x2d, 0x68, 0x61, 0x73, 0x68, 0x2d, 0x74, 0x6f, 0x2d, 0x69, + 0x72, 0x69, 0x3a, 0x01, 0x2a, 0x42, 0xb5, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x42, 0x0a, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, + 0x76, 0x32, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x58, 0xaa, + 0x02, 0x0d, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x32, 0xca, + 0x02, 0x0d, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x5c, 0x56, 0x32, 0xe2, + 0x02, 0x19, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x5c, 0x56, 0x32, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x52, 0x65, + 0x67, 0x65, 0x6e, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_regen_data_v2_query_proto_rawDescOnce sync.Once + file_regen_data_v2_query_proto_rawDescData = file_regen_data_v2_query_proto_rawDesc +) + +func file_regen_data_v2_query_proto_rawDescGZIP() []byte { + file_regen_data_v2_query_proto_rawDescOnce.Do(func() { + file_regen_data_v2_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_regen_data_v2_query_proto_rawDescData) + }) + return file_regen_data_v2_query_proto_rawDescData +} + +var file_regen_data_v2_query_proto_msgTypes = make([]protoimpl.MessageInfo, 25) +var file_regen_data_v2_query_proto_goTypes = []interface{}{ + (*QueryAnchorByIRIRequest)(nil), // 0: regen.data.v2.QueryAnchorByIRIRequest + (*QueryAnchorByIRIResponse)(nil), // 1: regen.data.v2.QueryAnchorByIRIResponse + (*QueryAnchorByHashRequest)(nil), // 2: regen.data.v2.QueryAnchorByHashRequest + (*QueryAnchorByHashResponse)(nil), // 3: regen.data.v2.QueryAnchorByHashResponse + (*QueryAttestationsByAttestorRequest)(nil), // 4: regen.data.v2.QueryAttestationsByAttestorRequest + (*QueryAttestationsByAttestorResponse)(nil), // 5: regen.data.v2.QueryAttestationsByAttestorResponse + (*QueryAttestationsByIRIRequest)(nil), // 6: regen.data.v2.QueryAttestationsByIRIRequest + (*QueryAttestationsByIRIResponse)(nil), // 7: regen.data.v2.QueryAttestationsByIRIResponse + (*QueryAttestationsByHashRequest)(nil), // 8: regen.data.v2.QueryAttestationsByHashRequest + (*QueryAttestationsByHashResponse)(nil), // 9: regen.data.v2.QueryAttestationsByHashResponse + (*QueryResolverRequest)(nil), // 10: regen.data.v2.QueryResolverRequest + (*QueryResolverResponse)(nil), // 11: regen.data.v2.QueryResolverResponse + (*QueryResolversByIRIRequest)(nil), // 12: regen.data.v2.QueryResolversByIRIRequest + (*QueryResolversByIRIResponse)(nil), // 13: regen.data.v2.QueryResolversByIRIResponse + (*QueryResolversByHashRequest)(nil), // 14: regen.data.v2.QueryResolversByHashRequest + (*QueryResolversByHashResponse)(nil), // 15: regen.data.v2.QueryResolversByHashResponse + (*QueryResolversByURLRequest)(nil), // 16: regen.data.v2.QueryResolversByURLRequest + (*QueryResolversByURLResponse)(nil), // 17: regen.data.v2.QueryResolversByURLResponse + (*ConvertIRIToHashRequest)(nil), // 18: regen.data.v2.ConvertIRIToHashRequest + (*ConvertIRIToHashResponse)(nil), // 19: regen.data.v2.ConvertIRIToHashResponse + (*ConvertHashToIRIRequest)(nil), // 20: regen.data.v2.ConvertHashToIRIRequest + (*ConvertHashToIRIResponse)(nil), // 21: regen.data.v2.ConvertHashToIRIResponse + (*AnchorInfo)(nil), // 22: regen.data.v2.AnchorInfo + (*AttestationInfo)(nil), // 23: regen.data.v2.AttestationInfo + (*ResolverInfo)(nil), // 24: regen.data.v2.ResolverInfo + (*ContentHash)(nil), // 25: regen.data.v2.ContentHash + (*v1beta1.PageRequest)(nil), // 26: cosmos.base.query.v1beta1.PageRequest + (*v1beta1.PageResponse)(nil), // 27: cosmos.base.query.v1beta1.PageResponse + (*timestamppb.Timestamp)(nil), // 28: google.protobuf.Timestamp +} +var file_regen_data_v2_query_proto_depIdxs = []int32{ + 22, // 0: regen.data.v2.QueryAnchorByIRIResponse.anchor:type_name -> regen.data.v2.AnchorInfo + 25, // 1: regen.data.v2.QueryAnchorByHashRequest.content_hash:type_name -> regen.data.v2.ContentHash + 22, // 2: regen.data.v2.QueryAnchorByHashResponse.anchor:type_name -> regen.data.v2.AnchorInfo + 26, // 3: regen.data.v2.QueryAttestationsByAttestorRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 23, // 4: regen.data.v2.QueryAttestationsByAttestorResponse.attestations:type_name -> regen.data.v2.AttestationInfo + 27, // 5: regen.data.v2.QueryAttestationsByAttestorResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 26, // 6: regen.data.v2.QueryAttestationsByIRIRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 23, // 7: regen.data.v2.QueryAttestationsByIRIResponse.attestations:type_name -> regen.data.v2.AttestationInfo + 27, // 8: regen.data.v2.QueryAttestationsByIRIResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 25, // 9: regen.data.v2.QueryAttestationsByHashRequest.content_hash:type_name -> regen.data.v2.ContentHash + 26, // 10: regen.data.v2.QueryAttestationsByHashRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 23, // 11: regen.data.v2.QueryAttestationsByHashResponse.attestations:type_name -> regen.data.v2.AttestationInfo + 27, // 12: regen.data.v2.QueryAttestationsByHashResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 24, // 13: regen.data.v2.QueryResolverResponse.resolver:type_name -> regen.data.v2.ResolverInfo + 26, // 14: regen.data.v2.QueryResolversByIRIRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 24, // 15: regen.data.v2.QueryResolversByIRIResponse.resolvers:type_name -> regen.data.v2.ResolverInfo + 27, // 16: regen.data.v2.QueryResolversByIRIResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 25, // 17: regen.data.v2.QueryResolversByHashRequest.content_hash:type_name -> regen.data.v2.ContentHash + 26, // 18: regen.data.v2.QueryResolversByHashRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 24, // 19: regen.data.v2.QueryResolversByHashResponse.resolvers:type_name -> regen.data.v2.ResolverInfo + 27, // 20: regen.data.v2.QueryResolversByHashResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 26, // 21: regen.data.v2.QueryResolversByURLRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 24, // 22: regen.data.v2.QueryResolversByURLResponse.resolvers:type_name -> regen.data.v2.ResolverInfo + 27, // 23: regen.data.v2.QueryResolversByURLResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 25, // 24: regen.data.v2.ConvertIRIToHashResponse.content_hash:type_name -> regen.data.v2.ContentHash + 25, // 25: regen.data.v2.ConvertHashToIRIRequest.content_hash:type_name -> regen.data.v2.ContentHash + 25, // 26: regen.data.v2.AnchorInfo.content_hash:type_name -> regen.data.v2.ContentHash + 28, // 27: regen.data.v2.AnchorInfo.timestamp:type_name -> google.protobuf.Timestamp + 28, // 28: regen.data.v2.AttestationInfo.timestamp:type_name -> google.protobuf.Timestamp + 0, // 29: regen.data.v2.Query.AnchorByIRI:input_type -> regen.data.v2.QueryAnchorByIRIRequest + 2, // 30: regen.data.v2.Query.AnchorByHash:input_type -> regen.data.v2.QueryAnchorByHashRequest + 4, // 31: regen.data.v2.Query.AttestationsByAttestor:input_type -> regen.data.v2.QueryAttestationsByAttestorRequest + 6, // 32: regen.data.v2.Query.AttestationsByIRI:input_type -> regen.data.v2.QueryAttestationsByIRIRequest + 8, // 33: regen.data.v2.Query.AttestationsByHash:input_type -> regen.data.v2.QueryAttestationsByHashRequest + 10, // 34: regen.data.v2.Query.Resolver:input_type -> regen.data.v2.QueryResolverRequest + 12, // 35: regen.data.v2.Query.ResolversByIRI:input_type -> regen.data.v2.QueryResolversByIRIRequest + 14, // 36: regen.data.v2.Query.ResolversByHash:input_type -> regen.data.v2.QueryResolversByHashRequest + 16, // 37: regen.data.v2.Query.ResolversByURL:input_type -> regen.data.v2.QueryResolversByURLRequest + 18, // 38: regen.data.v2.Query.ConvertIRIToHash:input_type -> regen.data.v2.ConvertIRIToHashRequest + 20, // 39: regen.data.v2.Query.ConvertHashToIRI:input_type -> regen.data.v2.ConvertHashToIRIRequest + 1, // 40: regen.data.v2.Query.AnchorByIRI:output_type -> regen.data.v2.QueryAnchorByIRIResponse + 3, // 41: regen.data.v2.Query.AnchorByHash:output_type -> regen.data.v2.QueryAnchorByHashResponse + 5, // 42: regen.data.v2.Query.AttestationsByAttestor:output_type -> regen.data.v2.QueryAttestationsByAttestorResponse + 7, // 43: regen.data.v2.Query.AttestationsByIRI:output_type -> regen.data.v2.QueryAttestationsByIRIResponse + 9, // 44: regen.data.v2.Query.AttestationsByHash:output_type -> regen.data.v2.QueryAttestationsByHashResponse + 11, // 45: regen.data.v2.Query.Resolver:output_type -> regen.data.v2.QueryResolverResponse + 13, // 46: regen.data.v2.Query.ResolversByIRI:output_type -> regen.data.v2.QueryResolversByIRIResponse + 15, // 47: regen.data.v2.Query.ResolversByHash:output_type -> regen.data.v2.QueryResolversByHashResponse + 17, // 48: regen.data.v2.Query.ResolversByURL:output_type -> regen.data.v2.QueryResolversByURLResponse + 19, // 49: regen.data.v2.Query.ConvertIRIToHash:output_type -> regen.data.v2.ConvertIRIToHashResponse + 21, // 50: regen.data.v2.Query.ConvertHashToIRI:output_type -> regen.data.v2.ConvertHashToIRIResponse + 40, // [40:51] is the sub-list for method output_type + 29, // [29:40] is the sub-list for method input_type + 29, // [29:29] is the sub-list for extension type_name + 29, // [29:29] is the sub-list for extension extendee + 0, // [0:29] is the sub-list for field type_name +} + +func init() { file_regen_data_v2_query_proto_init() } +func file_regen_data_v2_query_proto_init() { + if File_regen_data_v2_query_proto != nil { + return + } + file_regen_data_v2_types_proto_init() + if !protoimpl.UnsafeEnabled { + file_regen_data_v2_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAnchorByIRIRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAnchorByIRIResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAnchorByHashRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAnchorByHashResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAttestationsByAttestorRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAttestationsByAttestorResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAttestationsByIRIRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAttestationsByIRIResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAttestationsByHashRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAttestationsByHashResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryResolverRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryResolverResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryResolversByIRIRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryResolversByIRIResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryResolversByHashRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryResolversByHashResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_query_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryResolversByURLRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_query_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryResolversByURLResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConvertIRIToHashRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_query_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConvertIRIToHashResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_query_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConvertHashToIRIRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_query_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConvertHashToIRIResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_query_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AnchorInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_query_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AttestationInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_query_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResolverInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_regen_data_v2_query_proto_rawDesc, + NumEnums: 0, + NumMessages: 25, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_regen_data_v2_query_proto_goTypes, + DependencyIndexes: file_regen_data_v2_query_proto_depIdxs, + MessageInfos: file_regen_data_v2_query_proto_msgTypes, + }.Build() + File_regen_data_v2_query_proto = out.File + file_regen_data_v2_query_proto_rawDesc = nil + file_regen_data_v2_query_proto_goTypes = nil + file_regen_data_v2_query_proto_depIdxs = nil +} diff --git a/api/regen/data/v2/query_grpc.pb.go b/api/regen/data/v2/query_grpc.pb.go new file mode 100644 index 0000000000..495e01b797 --- /dev/null +++ b/api/regen/data/v2/query_grpc.pb.go @@ -0,0 +1,507 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: regen/data/v2/query.proto + +package datav2 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Query_AnchorByIRI_FullMethodName = "/regen.data.v2.Query/AnchorByIRI" + Query_AnchorByHash_FullMethodName = "/regen.data.v2.Query/AnchorByHash" + Query_AttestationsByAttestor_FullMethodName = "/regen.data.v2.Query/AttestationsByAttestor" + Query_AttestationsByIRI_FullMethodName = "/regen.data.v2.Query/AttestationsByIRI" + Query_AttestationsByHash_FullMethodName = "/regen.data.v2.Query/AttestationsByHash" + Query_Resolver_FullMethodName = "/regen.data.v2.Query/Resolver" + Query_ResolversByIRI_FullMethodName = "/regen.data.v2.Query/ResolversByIRI" + Query_ResolversByHash_FullMethodName = "/regen.data.v2.Query/ResolversByHash" + Query_ResolversByURL_FullMethodName = "/regen.data.v2.Query/ResolversByURL" + Query_ConvertIRIToHash_FullMethodName = "/regen.data.v2.Query/ConvertIRIToHash" + Query_ConvertHashToIRI_FullMethodName = "/regen.data.v2.Query/ConvertHashToIRI" +) + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type QueryClient interface { + // AnchorByIRI queries a data anchor by the IRI of the data. + AnchorByIRI(ctx context.Context, in *QueryAnchorByIRIRequest, opts ...grpc.CallOption) (*QueryAnchorByIRIResponse, error) + // AnchorByHash queries a data anchor by the ContentHash of the data. + AnchorByHash(ctx context.Context, in *QueryAnchorByHashRequest, opts ...grpc.CallOption) (*QueryAnchorByHashResponse, error) + // AttestationsByAttestor queries data attestations by an attestor. + AttestationsByAttestor(ctx context.Context, in *QueryAttestationsByAttestorRequest, opts ...grpc.CallOption) (*QueryAttestationsByAttestorResponse, error) + // AttestationsByIRI queries data attestations by the IRI of the data. + AttestationsByIRI(ctx context.Context, in *QueryAttestationsByIRIRequest, opts ...grpc.CallOption) (*QueryAttestationsByIRIResponse, error) + // AttestationsByHash queries data attestations by the ContentHash of the + // data. + AttestationsByHash(ctx context.Context, in *QueryAttestationsByHashRequest, opts ...grpc.CallOption) (*QueryAttestationsByHashResponse, error) + // Resolver queries a resolver by its unique identifier. + Resolver(ctx context.Context, in *QueryResolverRequest, opts ...grpc.CallOption) (*QueryResolverResponse, error) + // ResolversByIRI queries resolvers with registered data by the IRI of the + // data. + ResolversByIRI(ctx context.Context, in *QueryResolversByIRIRequest, opts ...grpc.CallOption) (*QueryResolversByIRIResponse, error) + // ResolversByHash queries resolvers with registered data by the ContentHash + // of the data. + ResolversByHash(ctx context.Context, in *QueryResolversByHashRequest, opts ...grpc.CallOption) (*QueryResolversByHashResponse, error) + // ResolversByURL queries resolvers by URL. + ResolversByURL(ctx context.Context, in *QueryResolversByURLRequest, opts ...grpc.CallOption) (*QueryResolversByURLResponse, error) + // ConvertIRIToHash converts an IRI to a ContentHash. + ConvertIRIToHash(ctx context.Context, in *ConvertIRIToHashRequest, opts ...grpc.CallOption) (*ConvertIRIToHashResponse, error) + // ConvertHashToIRI converts a ContentHash to an IRI. + ConvertHashToIRI(ctx context.Context, in *ConvertHashToIRIRequest, opts ...grpc.CallOption) (*ConvertHashToIRIResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) AnchorByIRI(ctx context.Context, in *QueryAnchorByIRIRequest, opts ...grpc.CallOption) (*QueryAnchorByIRIResponse, error) { + out := new(QueryAnchorByIRIResponse) + err := c.cc.Invoke(ctx, Query_AnchorByIRI_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AnchorByHash(ctx context.Context, in *QueryAnchorByHashRequest, opts ...grpc.CallOption) (*QueryAnchorByHashResponse, error) { + out := new(QueryAnchorByHashResponse) + err := c.cc.Invoke(ctx, Query_AnchorByHash_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AttestationsByAttestor(ctx context.Context, in *QueryAttestationsByAttestorRequest, opts ...grpc.CallOption) (*QueryAttestationsByAttestorResponse, error) { + out := new(QueryAttestationsByAttestorResponse) + err := c.cc.Invoke(ctx, Query_AttestationsByAttestor_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AttestationsByIRI(ctx context.Context, in *QueryAttestationsByIRIRequest, opts ...grpc.CallOption) (*QueryAttestationsByIRIResponse, error) { + out := new(QueryAttestationsByIRIResponse) + err := c.cc.Invoke(ctx, Query_AttestationsByIRI_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AttestationsByHash(ctx context.Context, in *QueryAttestationsByHashRequest, opts ...grpc.CallOption) (*QueryAttestationsByHashResponse, error) { + out := new(QueryAttestationsByHashResponse) + err := c.cc.Invoke(ctx, Query_AttestationsByHash_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Resolver(ctx context.Context, in *QueryResolverRequest, opts ...grpc.CallOption) (*QueryResolverResponse, error) { + out := new(QueryResolverResponse) + err := c.cc.Invoke(ctx, Query_Resolver_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ResolversByIRI(ctx context.Context, in *QueryResolversByIRIRequest, opts ...grpc.CallOption) (*QueryResolversByIRIResponse, error) { + out := new(QueryResolversByIRIResponse) + err := c.cc.Invoke(ctx, Query_ResolversByIRI_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ResolversByHash(ctx context.Context, in *QueryResolversByHashRequest, opts ...grpc.CallOption) (*QueryResolversByHashResponse, error) { + out := new(QueryResolversByHashResponse) + err := c.cc.Invoke(ctx, Query_ResolversByHash_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ResolversByURL(ctx context.Context, in *QueryResolversByURLRequest, opts ...grpc.CallOption) (*QueryResolversByURLResponse, error) { + out := new(QueryResolversByURLResponse) + err := c.cc.Invoke(ctx, Query_ResolversByURL_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ConvertIRIToHash(ctx context.Context, in *ConvertIRIToHashRequest, opts ...grpc.CallOption) (*ConvertIRIToHashResponse, error) { + out := new(ConvertIRIToHashResponse) + err := c.cc.Invoke(ctx, Query_ConvertIRIToHash_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ConvertHashToIRI(ctx context.Context, in *ConvertHashToIRIRequest, opts ...grpc.CallOption) (*ConvertHashToIRIResponse, error) { + out := new(ConvertHashToIRIResponse) + err := c.cc.Invoke(ctx, Query_ConvertHashToIRI_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility +type QueryServer interface { + // AnchorByIRI queries a data anchor by the IRI of the data. + AnchorByIRI(context.Context, *QueryAnchorByIRIRequest) (*QueryAnchorByIRIResponse, error) + // AnchorByHash queries a data anchor by the ContentHash of the data. + AnchorByHash(context.Context, *QueryAnchorByHashRequest) (*QueryAnchorByHashResponse, error) + // AttestationsByAttestor queries data attestations by an attestor. + AttestationsByAttestor(context.Context, *QueryAttestationsByAttestorRequest) (*QueryAttestationsByAttestorResponse, error) + // AttestationsByIRI queries data attestations by the IRI of the data. + AttestationsByIRI(context.Context, *QueryAttestationsByIRIRequest) (*QueryAttestationsByIRIResponse, error) + // AttestationsByHash queries data attestations by the ContentHash of the + // data. + AttestationsByHash(context.Context, *QueryAttestationsByHashRequest) (*QueryAttestationsByHashResponse, error) + // Resolver queries a resolver by its unique identifier. + Resolver(context.Context, *QueryResolverRequest) (*QueryResolverResponse, error) + // ResolversByIRI queries resolvers with registered data by the IRI of the + // data. + ResolversByIRI(context.Context, *QueryResolversByIRIRequest) (*QueryResolversByIRIResponse, error) + // ResolversByHash queries resolvers with registered data by the ContentHash + // of the data. + ResolversByHash(context.Context, *QueryResolversByHashRequest) (*QueryResolversByHashResponse, error) + // ResolversByURL queries resolvers by URL. + ResolversByURL(context.Context, *QueryResolversByURLRequest) (*QueryResolversByURLResponse, error) + // ConvertIRIToHash converts an IRI to a ContentHash. + ConvertIRIToHash(context.Context, *ConvertIRIToHashRequest) (*ConvertIRIToHashResponse, error) + // ConvertHashToIRI converts a ContentHash to an IRI. + ConvertHashToIRI(context.Context, *ConvertHashToIRIRequest) (*ConvertHashToIRIResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (UnimplementedQueryServer) AnchorByIRI(context.Context, *QueryAnchorByIRIRequest) (*QueryAnchorByIRIResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AnchorByIRI not implemented") +} +func (UnimplementedQueryServer) AnchorByHash(context.Context, *QueryAnchorByHashRequest) (*QueryAnchorByHashResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AnchorByHash not implemented") +} +func (UnimplementedQueryServer) AttestationsByAttestor(context.Context, *QueryAttestationsByAttestorRequest) (*QueryAttestationsByAttestorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AttestationsByAttestor not implemented") +} +func (UnimplementedQueryServer) AttestationsByIRI(context.Context, *QueryAttestationsByIRIRequest) (*QueryAttestationsByIRIResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AttestationsByIRI not implemented") +} +func (UnimplementedQueryServer) AttestationsByHash(context.Context, *QueryAttestationsByHashRequest) (*QueryAttestationsByHashResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AttestationsByHash not implemented") +} +func (UnimplementedQueryServer) Resolver(context.Context, *QueryResolverRequest) (*QueryResolverResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Resolver not implemented") +} +func (UnimplementedQueryServer) ResolversByIRI(context.Context, *QueryResolversByIRIRequest) (*QueryResolversByIRIResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResolversByIRI not implemented") +} +func (UnimplementedQueryServer) ResolversByHash(context.Context, *QueryResolversByHashRequest) (*QueryResolversByHashResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResolversByHash not implemented") +} +func (UnimplementedQueryServer) ResolversByURL(context.Context, *QueryResolversByURLRequest) (*QueryResolversByURLResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResolversByURL not implemented") +} +func (UnimplementedQueryServer) ConvertIRIToHash(context.Context, *ConvertIRIToHashRequest) (*ConvertIRIToHashResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ConvertIRIToHash not implemented") +} +func (UnimplementedQueryServer) ConvertHashToIRI(context.Context, *ConvertHashToIRIRequest) (*ConvertHashToIRIResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ConvertHashToIRI not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_AnchorByIRI_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAnchorByIRIRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AnchorByIRI(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_AnchorByIRI_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AnchorByIRI(ctx, req.(*QueryAnchorByIRIRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AnchorByHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAnchorByHashRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AnchorByHash(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_AnchorByHash_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AnchorByHash(ctx, req.(*QueryAnchorByHashRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AttestationsByAttestor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAttestationsByAttestorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AttestationsByAttestor(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_AttestationsByAttestor_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AttestationsByAttestor(ctx, req.(*QueryAttestationsByAttestorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AttestationsByIRI_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAttestationsByIRIRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AttestationsByIRI(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_AttestationsByIRI_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AttestationsByIRI(ctx, req.(*QueryAttestationsByIRIRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AttestationsByHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAttestationsByHashRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AttestationsByHash(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_AttestationsByHash_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AttestationsByHash(ctx, req.(*QueryAttestationsByHashRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Resolver_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryResolverRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Resolver(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Resolver_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Resolver(ctx, req.(*QueryResolverRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ResolversByIRI_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryResolversByIRIRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ResolversByIRI(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_ResolversByIRI_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ResolversByIRI(ctx, req.(*QueryResolversByIRIRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ResolversByHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryResolversByHashRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ResolversByHash(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_ResolversByHash_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ResolversByHash(ctx, req.(*QueryResolversByHashRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ResolversByURL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryResolversByURLRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ResolversByURL(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_ResolversByURL_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ResolversByURL(ctx, req.(*QueryResolversByURLRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ConvertIRIToHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ConvertIRIToHashRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ConvertIRIToHash(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_ConvertIRIToHash_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ConvertIRIToHash(ctx, req.(*ConvertIRIToHashRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ConvertHashToIRI_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ConvertHashToIRIRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ConvertHashToIRI(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_ConvertHashToIRI_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ConvertHashToIRI(ctx, req.(*ConvertHashToIRIRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "regen.data.v2.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "AnchorByIRI", + Handler: _Query_AnchorByIRI_Handler, + }, + { + MethodName: "AnchorByHash", + Handler: _Query_AnchorByHash_Handler, + }, + { + MethodName: "AttestationsByAttestor", + Handler: _Query_AttestationsByAttestor_Handler, + }, + { + MethodName: "AttestationsByIRI", + Handler: _Query_AttestationsByIRI_Handler, + }, + { + MethodName: "AttestationsByHash", + Handler: _Query_AttestationsByHash_Handler, + }, + { + MethodName: "Resolver", + Handler: _Query_Resolver_Handler, + }, + { + MethodName: "ResolversByIRI", + Handler: _Query_ResolversByIRI_Handler, + }, + { + MethodName: "ResolversByHash", + Handler: _Query_ResolversByHash_Handler, + }, + { + MethodName: "ResolversByURL", + Handler: _Query_ResolversByURL_Handler, + }, + { + MethodName: "ConvertIRIToHash", + Handler: _Query_ConvertIRIToHash_Handler, + }, + { + MethodName: "ConvertHashToIRI", + Handler: _Query_ConvertHashToIRI_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "regen/data/v2/query.proto", +} diff --git a/api/regen/data/v2/state.cosmos_orm.go b/api/regen/data/v2/state.cosmos_orm.go new file mode 100644 index 0000000000..ca78962c1e --- /dev/null +++ b/api/regen/data/v2/state.cosmos_orm.go @@ -0,0 +1,777 @@ +// Code generated by protoc-gen-go-cosmos-orm. DO NOT EDIT. + +package datav2 + +import ( + context "context" + ormlist "github.com/cosmos/cosmos-sdk/orm/model/ormlist" + ormtable "github.com/cosmos/cosmos-sdk/orm/model/ormtable" + ormerrors "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" +) + +type DataIDTable interface { + Insert(ctx context.Context, dataID *DataID) error + Update(ctx context.Context, dataID *DataID) error + Save(ctx context.Context, dataID *DataID) error + Delete(ctx context.Context, dataID *DataID) error + Has(ctx context.Context, id []byte) (found bool, err error) + // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + Get(ctx context.Context, id []byte) (*DataID, error) + HasByIri(ctx context.Context, iri string) (found bool, err error) + // GetByIri returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByIri(ctx context.Context, iri string) (*DataID, error) + List(ctx context.Context, prefixKey DataIDIndexKey, opts ...ormlist.Option) (DataIDIterator, error) + ListRange(ctx context.Context, from, to DataIDIndexKey, opts ...ormlist.Option) (DataIDIterator, error) + DeleteBy(ctx context.Context, prefixKey DataIDIndexKey) error + DeleteRange(ctx context.Context, from, to DataIDIndexKey) error + + doNotImplement() +} + +type DataIDIterator struct { + ormtable.Iterator +} + +func (i DataIDIterator) Value() (*DataID, error) { + var dataID DataID + err := i.UnmarshalMessage(&dataID) + return &dataID, err +} + +type DataIDIndexKey interface { + id() uint32 + values() []interface{} + dataIDIndexKey() +} + +// primary key starting index.. +type DataIDPrimaryKey = DataIDIdIndexKey + +type DataIDIdIndexKey struct { + vs []interface{} +} + +func (x DataIDIdIndexKey) id() uint32 { return 0 } +func (x DataIDIdIndexKey) values() []interface{} { return x.vs } +func (x DataIDIdIndexKey) dataIDIndexKey() {} + +func (this DataIDIdIndexKey) WithId(id []byte) DataIDIdIndexKey { + this.vs = []interface{}{id} + return this +} + +type DataIDIriIndexKey struct { + vs []interface{} +} + +func (x DataIDIriIndexKey) id() uint32 { return 1 } +func (x DataIDIriIndexKey) values() []interface{} { return x.vs } +func (x DataIDIriIndexKey) dataIDIndexKey() {} + +func (this DataIDIriIndexKey) WithIri(iri string) DataIDIriIndexKey { + this.vs = []interface{}{iri} + return this +} + +type dataIDTable struct { + table ormtable.Table +} + +func (this dataIDTable) Insert(ctx context.Context, dataID *DataID) error { + return this.table.Insert(ctx, dataID) +} + +func (this dataIDTable) Update(ctx context.Context, dataID *DataID) error { + return this.table.Update(ctx, dataID) +} + +func (this dataIDTable) Save(ctx context.Context, dataID *DataID) error { + return this.table.Save(ctx, dataID) +} + +func (this dataIDTable) Delete(ctx context.Context, dataID *DataID) error { + return this.table.Delete(ctx, dataID) +} + +func (this dataIDTable) Has(ctx context.Context, id []byte) (found bool, err error) { + return this.table.PrimaryKey().Has(ctx, id) +} + +func (this dataIDTable) Get(ctx context.Context, id []byte) (*DataID, error) { + var dataID DataID + found, err := this.table.PrimaryKey().Get(ctx, &dataID, id) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &dataID, nil +} + +func (this dataIDTable) HasByIri(ctx context.Context, iri string) (found bool, err error) { + return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, + iri, + ) +} + +func (this dataIDTable) GetByIri(ctx context.Context, iri string) (*DataID, error) { + var dataID DataID + found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &dataID, + iri, + ) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &dataID, nil +} + +func (this dataIDTable) List(ctx context.Context, prefixKey DataIDIndexKey, opts ...ormlist.Option) (DataIDIterator, error) { + it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) + return DataIDIterator{it}, err +} + +func (this dataIDTable) ListRange(ctx context.Context, from, to DataIDIndexKey, opts ...ormlist.Option) (DataIDIterator, error) { + it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) + return DataIDIterator{it}, err +} + +func (this dataIDTable) DeleteBy(ctx context.Context, prefixKey DataIDIndexKey) error { + return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) +} + +func (this dataIDTable) DeleteRange(ctx context.Context, from, to DataIDIndexKey) error { + return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) +} + +func (this dataIDTable) doNotImplement() {} + +var _ DataIDTable = dataIDTable{} + +func NewDataIDTable(db ormtable.Schema) (DataIDTable, error) { + table := db.GetTable(&DataID{}) + if table == nil { + return nil, ormerrors.TableNotFound.Wrap(string((&DataID{}).ProtoReflect().Descriptor().FullName())) + } + return dataIDTable{table}, nil +} + +type DataAnchorTable interface { + Insert(ctx context.Context, dataAnchor *DataAnchor) error + Update(ctx context.Context, dataAnchor *DataAnchor) error + Save(ctx context.Context, dataAnchor *DataAnchor) error + Delete(ctx context.Context, dataAnchor *DataAnchor) error + Has(ctx context.Context, id []byte) (found bool, err error) + // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + Get(ctx context.Context, id []byte) (*DataAnchor, error) + List(ctx context.Context, prefixKey DataAnchorIndexKey, opts ...ormlist.Option) (DataAnchorIterator, error) + ListRange(ctx context.Context, from, to DataAnchorIndexKey, opts ...ormlist.Option) (DataAnchorIterator, error) + DeleteBy(ctx context.Context, prefixKey DataAnchorIndexKey) error + DeleteRange(ctx context.Context, from, to DataAnchorIndexKey) error + + doNotImplement() +} + +type DataAnchorIterator struct { + ormtable.Iterator +} + +func (i DataAnchorIterator) Value() (*DataAnchor, error) { + var dataAnchor DataAnchor + err := i.UnmarshalMessage(&dataAnchor) + return &dataAnchor, err +} + +type DataAnchorIndexKey interface { + id() uint32 + values() []interface{} + dataAnchorIndexKey() +} + +// primary key starting index.. +type DataAnchorPrimaryKey = DataAnchorIdIndexKey + +type DataAnchorIdIndexKey struct { + vs []interface{} +} + +func (x DataAnchorIdIndexKey) id() uint32 { return 0 } +func (x DataAnchorIdIndexKey) values() []interface{} { return x.vs } +func (x DataAnchorIdIndexKey) dataAnchorIndexKey() {} + +func (this DataAnchorIdIndexKey) WithId(id []byte) DataAnchorIdIndexKey { + this.vs = []interface{}{id} + return this +} + +type dataAnchorTable struct { + table ormtable.Table +} + +func (this dataAnchorTable) Insert(ctx context.Context, dataAnchor *DataAnchor) error { + return this.table.Insert(ctx, dataAnchor) +} + +func (this dataAnchorTable) Update(ctx context.Context, dataAnchor *DataAnchor) error { + return this.table.Update(ctx, dataAnchor) +} + +func (this dataAnchorTable) Save(ctx context.Context, dataAnchor *DataAnchor) error { + return this.table.Save(ctx, dataAnchor) +} + +func (this dataAnchorTable) Delete(ctx context.Context, dataAnchor *DataAnchor) error { + return this.table.Delete(ctx, dataAnchor) +} + +func (this dataAnchorTable) Has(ctx context.Context, id []byte) (found bool, err error) { + return this.table.PrimaryKey().Has(ctx, id) +} + +func (this dataAnchorTable) Get(ctx context.Context, id []byte) (*DataAnchor, error) { + var dataAnchor DataAnchor + found, err := this.table.PrimaryKey().Get(ctx, &dataAnchor, id) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &dataAnchor, nil +} + +func (this dataAnchorTable) List(ctx context.Context, prefixKey DataAnchorIndexKey, opts ...ormlist.Option) (DataAnchorIterator, error) { + it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) + return DataAnchorIterator{it}, err +} + +func (this dataAnchorTable) ListRange(ctx context.Context, from, to DataAnchorIndexKey, opts ...ormlist.Option) (DataAnchorIterator, error) { + it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) + return DataAnchorIterator{it}, err +} + +func (this dataAnchorTable) DeleteBy(ctx context.Context, prefixKey DataAnchorIndexKey) error { + return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) +} + +func (this dataAnchorTable) DeleteRange(ctx context.Context, from, to DataAnchorIndexKey) error { + return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) +} + +func (this dataAnchorTable) doNotImplement() {} + +var _ DataAnchorTable = dataAnchorTable{} + +func NewDataAnchorTable(db ormtable.Schema) (DataAnchorTable, error) { + table := db.GetTable(&DataAnchor{}) + if table == nil { + return nil, ormerrors.TableNotFound.Wrap(string((&DataAnchor{}).ProtoReflect().Descriptor().FullName())) + } + return dataAnchorTable{table}, nil +} + +type DataAttestorTable interface { + Insert(ctx context.Context, dataAttestor *DataAttestor) error + Update(ctx context.Context, dataAttestor *DataAttestor) error + Save(ctx context.Context, dataAttestor *DataAttestor) error + Delete(ctx context.Context, dataAttestor *DataAttestor) error + Has(ctx context.Context, id []byte, attestor []byte) (found bool, err error) + // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + Get(ctx context.Context, id []byte, attestor []byte) (*DataAttestor, error) + List(ctx context.Context, prefixKey DataAttestorIndexKey, opts ...ormlist.Option) (DataAttestorIterator, error) + ListRange(ctx context.Context, from, to DataAttestorIndexKey, opts ...ormlist.Option) (DataAttestorIterator, error) + DeleteBy(ctx context.Context, prefixKey DataAttestorIndexKey) error + DeleteRange(ctx context.Context, from, to DataAttestorIndexKey) error + + doNotImplement() +} + +type DataAttestorIterator struct { + ormtable.Iterator +} + +func (i DataAttestorIterator) Value() (*DataAttestor, error) { + var dataAttestor DataAttestor + err := i.UnmarshalMessage(&dataAttestor) + return &dataAttestor, err +} + +type DataAttestorIndexKey interface { + id() uint32 + values() []interface{} + dataAttestorIndexKey() +} + +// primary key starting index.. +type DataAttestorPrimaryKey = DataAttestorIdAttestorIndexKey + +type DataAttestorIdAttestorIndexKey struct { + vs []interface{} +} + +func (x DataAttestorIdAttestorIndexKey) id() uint32 { return 0 } +func (x DataAttestorIdAttestorIndexKey) values() []interface{} { return x.vs } +func (x DataAttestorIdAttestorIndexKey) dataAttestorIndexKey() {} + +func (this DataAttestorIdAttestorIndexKey) WithId(id []byte) DataAttestorIdAttestorIndexKey { + this.vs = []interface{}{id} + return this +} + +func (this DataAttestorIdAttestorIndexKey) WithIdAttestor(id []byte, attestor []byte) DataAttestorIdAttestorIndexKey { + this.vs = []interface{}{id, attestor} + return this +} + +type DataAttestorAttestorIndexKey struct { + vs []interface{} +} + +func (x DataAttestorAttestorIndexKey) id() uint32 { return 1 } +func (x DataAttestorAttestorIndexKey) values() []interface{} { return x.vs } +func (x DataAttestorAttestorIndexKey) dataAttestorIndexKey() {} + +func (this DataAttestorAttestorIndexKey) WithAttestor(attestor []byte) DataAttestorAttestorIndexKey { + this.vs = []interface{}{attestor} + return this +} + +type dataAttestorTable struct { + table ormtable.Table +} + +func (this dataAttestorTable) Insert(ctx context.Context, dataAttestor *DataAttestor) error { + return this.table.Insert(ctx, dataAttestor) +} + +func (this dataAttestorTable) Update(ctx context.Context, dataAttestor *DataAttestor) error { + return this.table.Update(ctx, dataAttestor) +} + +func (this dataAttestorTable) Save(ctx context.Context, dataAttestor *DataAttestor) error { + return this.table.Save(ctx, dataAttestor) +} + +func (this dataAttestorTable) Delete(ctx context.Context, dataAttestor *DataAttestor) error { + return this.table.Delete(ctx, dataAttestor) +} + +func (this dataAttestorTable) Has(ctx context.Context, id []byte, attestor []byte) (found bool, err error) { + return this.table.PrimaryKey().Has(ctx, id, attestor) +} + +func (this dataAttestorTable) Get(ctx context.Context, id []byte, attestor []byte) (*DataAttestor, error) { + var dataAttestor DataAttestor + found, err := this.table.PrimaryKey().Get(ctx, &dataAttestor, id, attestor) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &dataAttestor, nil +} + +func (this dataAttestorTable) List(ctx context.Context, prefixKey DataAttestorIndexKey, opts ...ormlist.Option) (DataAttestorIterator, error) { + it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) + return DataAttestorIterator{it}, err +} + +func (this dataAttestorTable) ListRange(ctx context.Context, from, to DataAttestorIndexKey, opts ...ormlist.Option) (DataAttestorIterator, error) { + it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) + return DataAttestorIterator{it}, err +} + +func (this dataAttestorTable) DeleteBy(ctx context.Context, prefixKey DataAttestorIndexKey) error { + return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) +} + +func (this dataAttestorTable) DeleteRange(ctx context.Context, from, to DataAttestorIndexKey) error { + return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) +} + +func (this dataAttestorTable) doNotImplement() {} + +var _ DataAttestorTable = dataAttestorTable{} + +func NewDataAttestorTable(db ormtable.Schema) (DataAttestorTable, error) { + table := db.GetTable(&DataAttestor{}) + if table == nil { + return nil, ormerrors.TableNotFound.Wrap(string((&DataAttestor{}).ProtoReflect().Descriptor().FullName())) + } + return dataAttestorTable{table}, nil +} + +type ResolverTable interface { + Insert(ctx context.Context, resolver *Resolver) error + InsertReturningID(ctx context.Context, resolver *Resolver) (uint64, error) + Update(ctx context.Context, resolver *Resolver) error + Save(ctx context.Context, resolver *Resolver) error + Delete(ctx context.Context, resolver *Resolver) error + Has(ctx context.Context, id uint64) (found bool, err error) + // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + Get(ctx context.Context, id uint64) (*Resolver, error) + HasByUrlManager(ctx context.Context, url string, manager []byte) (found bool, err error) + // GetByUrlManager returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByUrlManager(ctx context.Context, url string, manager []byte) (*Resolver, error) + List(ctx context.Context, prefixKey ResolverIndexKey, opts ...ormlist.Option) (ResolverIterator, error) + ListRange(ctx context.Context, from, to ResolverIndexKey, opts ...ormlist.Option) (ResolverIterator, error) + DeleteBy(ctx context.Context, prefixKey ResolverIndexKey) error + DeleteRange(ctx context.Context, from, to ResolverIndexKey) error + + doNotImplement() +} + +type ResolverIterator struct { + ormtable.Iterator +} + +func (i ResolverIterator) Value() (*Resolver, error) { + var resolver Resolver + err := i.UnmarshalMessage(&resolver) + return &resolver, err +} + +type ResolverIndexKey interface { + id() uint32 + values() []interface{} + resolverIndexKey() +} + +// primary key starting index.. +type ResolverPrimaryKey = ResolverIdIndexKey + +type ResolverIdIndexKey struct { + vs []interface{} +} + +func (x ResolverIdIndexKey) id() uint32 { return 0 } +func (x ResolverIdIndexKey) values() []interface{} { return x.vs } +func (x ResolverIdIndexKey) resolverIndexKey() {} + +func (this ResolverIdIndexKey) WithId(id uint64) ResolverIdIndexKey { + this.vs = []interface{}{id} + return this +} + +type ResolverUrlIndexKey struct { + vs []interface{} +} + +func (x ResolverUrlIndexKey) id() uint32 { return 1 } +func (x ResolverUrlIndexKey) values() []interface{} { return x.vs } +func (x ResolverUrlIndexKey) resolverIndexKey() {} + +func (this ResolverUrlIndexKey) WithUrl(url string) ResolverUrlIndexKey { + this.vs = []interface{}{url} + return this +} + +type ResolverUrlManagerIndexKey struct { + vs []interface{} +} + +func (x ResolverUrlManagerIndexKey) id() uint32 { return 2 } +func (x ResolverUrlManagerIndexKey) values() []interface{} { return x.vs } +func (x ResolverUrlManagerIndexKey) resolverIndexKey() {} + +func (this ResolverUrlManagerIndexKey) WithUrl(url string) ResolverUrlManagerIndexKey { + this.vs = []interface{}{url} + return this +} + +func (this ResolverUrlManagerIndexKey) WithUrlManager(url string, manager []byte) ResolverUrlManagerIndexKey { + this.vs = []interface{}{url, manager} + return this +} + +type resolverTable struct { + table ormtable.AutoIncrementTable +} + +func (this resolverTable) Insert(ctx context.Context, resolver *Resolver) error { + return this.table.Insert(ctx, resolver) +} + +func (this resolverTable) Update(ctx context.Context, resolver *Resolver) error { + return this.table.Update(ctx, resolver) +} + +func (this resolverTable) Save(ctx context.Context, resolver *Resolver) error { + return this.table.Save(ctx, resolver) +} + +func (this resolverTable) Delete(ctx context.Context, resolver *Resolver) error { + return this.table.Delete(ctx, resolver) +} + +func (this resolverTable) InsertReturningID(ctx context.Context, resolver *Resolver) (uint64, error) { + return this.table.InsertReturningID(ctx, resolver) +} + +func (this resolverTable) Has(ctx context.Context, id uint64) (found bool, err error) { + return this.table.PrimaryKey().Has(ctx, id) +} + +func (this resolverTable) Get(ctx context.Context, id uint64) (*Resolver, error) { + var resolver Resolver + found, err := this.table.PrimaryKey().Get(ctx, &resolver, id) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &resolver, nil +} + +func (this resolverTable) HasByUrlManager(ctx context.Context, url string, manager []byte) (found bool, err error) { + return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx, + url, + manager, + ) +} + +func (this resolverTable) GetByUrlManager(ctx context.Context, url string, manager []byte) (*Resolver, error) { + var resolver Resolver + found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &resolver, + url, + manager, + ) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &resolver, nil +} + +func (this resolverTable) List(ctx context.Context, prefixKey ResolverIndexKey, opts ...ormlist.Option) (ResolverIterator, error) { + it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) + return ResolverIterator{it}, err +} + +func (this resolverTable) ListRange(ctx context.Context, from, to ResolverIndexKey, opts ...ormlist.Option) (ResolverIterator, error) { + it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) + return ResolverIterator{it}, err +} + +func (this resolverTable) DeleteBy(ctx context.Context, prefixKey ResolverIndexKey) error { + return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) +} + +func (this resolverTable) DeleteRange(ctx context.Context, from, to ResolverIndexKey) error { + return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) +} + +func (this resolverTable) doNotImplement() {} + +var _ ResolverTable = resolverTable{} + +func NewResolverTable(db ormtable.Schema) (ResolverTable, error) { + table := db.GetTable(&Resolver{}) + if table == nil { + return nil, ormerrors.TableNotFound.Wrap(string((&Resolver{}).ProtoReflect().Descriptor().FullName())) + } + return resolverTable{table.(ormtable.AutoIncrementTable)}, nil +} + +type DataResolverTable interface { + Insert(ctx context.Context, dataResolver *DataResolver) error + Update(ctx context.Context, dataResolver *DataResolver) error + Save(ctx context.Context, dataResolver *DataResolver) error + Delete(ctx context.Context, dataResolver *DataResolver) error + Has(ctx context.Context, id []byte, resolver_id uint64) (found bool, err error) + // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + Get(ctx context.Context, id []byte, resolver_id uint64) (*DataResolver, error) + List(ctx context.Context, prefixKey DataResolverIndexKey, opts ...ormlist.Option) (DataResolverIterator, error) + ListRange(ctx context.Context, from, to DataResolverIndexKey, opts ...ormlist.Option) (DataResolverIterator, error) + DeleteBy(ctx context.Context, prefixKey DataResolverIndexKey) error + DeleteRange(ctx context.Context, from, to DataResolverIndexKey) error + + doNotImplement() +} + +type DataResolverIterator struct { + ormtable.Iterator +} + +func (i DataResolverIterator) Value() (*DataResolver, error) { + var dataResolver DataResolver + err := i.UnmarshalMessage(&dataResolver) + return &dataResolver, err +} + +type DataResolverIndexKey interface { + id() uint32 + values() []interface{} + dataResolverIndexKey() +} + +// primary key starting index.. +type DataResolverPrimaryKey = DataResolverIdResolverIdIndexKey + +type DataResolverIdResolverIdIndexKey struct { + vs []interface{} +} + +func (x DataResolverIdResolverIdIndexKey) id() uint32 { return 0 } +func (x DataResolverIdResolverIdIndexKey) values() []interface{} { return x.vs } +func (x DataResolverIdResolverIdIndexKey) dataResolverIndexKey() {} + +func (this DataResolverIdResolverIdIndexKey) WithId(id []byte) DataResolverIdResolverIdIndexKey { + this.vs = []interface{}{id} + return this +} + +func (this DataResolverIdResolverIdIndexKey) WithIdResolverId(id []byte, resolver_id uint64) DataResolverIdResolverIdIndexKey { + this.vs = []interface{}{id, resolver_id} + return this +} + +type dataResolverTable struct { + table ormtable.Table +} + +func (this dataResolverTable) Insert(ctx context.Context, dataResolver *DataResolver) error { + return this.table.Insert(ctx, dataResolver) +} + +func (this dataResolverTable) Update(ctx context.Context, dataResolver *DataResolver) error { + return this.table.Update(ctx, dataResolver) +} + +func (this dataResolverTable) Save(ctx context.Context, dataResolver *DataResolver) error { + return this.table.Save(ctx, dataResolver) +} + +func (this dataResolverTable) Delete(ctx context.Context, dataResolver *DataResolver) error { + return this.table.Delete(ctx, dataResolver) +} + +func (this dataResolverTable) Has(ctx context.Context, id []byte, resolver_id uint64) (found bool, err error) { + return this.table.PrimaryKey().Has(ctx, id, resolver_id) +} + +func (this dataResolverTable) Get(ctx context.Context, id []byte, resolver_id uint64) (*DataResolver, error) { + var dataResolver DataResolver + found, err := this.table.PrimaryKey().Get(ctx, &dataResolver, id, resolver_id) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &dataResolver, nil +} + +func (this dataResolverTable) List(ctx context.Context, prefixKey DataResolverIndexKey, opts ...ormlist.Option) (DataResolverIterator, error) { + it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) + return DataResolverIterator{it}, err +} + +func (this dataResolverTable) ListRange(ctx context.Context, from, to DataResolverIndexKey, opts ...ormlist.Option) (DataResolverIterator, error) { + it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) + return DataResolverIterator{it}, err +} + +func (this dataResolverTable) DeleteBy(ctx context.Context, prefixKey DataResolverIndexKey) error { + return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) +} + +func (this dataResolverTable) DeleteRange(ctx context.Context, from, to DataResolverIndexKey) error { + return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) +} + +func (this dataResolverTable) doNotImplement() {} + +var _ DataResolverTable = dataResolverTable{} + +func NewDataResolverTable(db ormtable.Schema) (DataResolverTable, error) { + table := db.GetTable(&DataResolver{}) + if table == nil { + return nil, ormerrors.TableNotFound.Wrap(string((&DataResolver{}).ProtoReflect().Descriptor().FullName())) + } + return dataResolverTable{table}, nil +} + +type StateStore interface { + DataIDTable() DataIDTable + DataAnchorTable() DataAnchorTable + DataAttestorTable() DataAttestorTable + ResolverTable() ResolverTable + DataResolverTable() DataResolverTable + + doNotImplement() +} + +type stateStore struct { + dataID DataIDTable + dataAnchor DataAnchorTable + dataAttestor DataAttestorTable + resolver ResolverTable + dataResolver DataResolverTable +} + +func (x stateStore) DataIDTable() DataIDTable { + return x.dataID +} + +func (x stateStore) DataAnchorTable() DataAnchorTable { + return x.dataAnchor +} + +func (x stateStore) DataAttestorTable() DataAttestorTable { + return x.dataAttestor +} + +func (x stateStore) ResolverTable() ResolverTable { + return x.resolver +} + +func (x stateStore) DataResolverTable() DataResolverTable { + return x.dataResolver +} + +func (stateStore) doNotImplement() {} + +var _ StateStore = stateStore{} + +func NewStateStore(db ormtable.Schema) (StateStore, error) { + dataIDTable, err := NewDataIDTable(db) + if err != nil { + return nil, err + } + + dataAnchorTable, err := NewDataAnchorTable(db) + if err != nil { + return nil, err + } + + dataAttestorTable, err := NewDataAttestorTable(db) + if err != nil { + return nil, err + } + + resolverTable, err := NewResolverTable(db) + if err != nil { + return nil, err + } + + dataResolverTable, err := NewDataResolverTable(db) + if err != nil { + return nil, err + } + + return stateStore{ + dataIDTable, + dataAnchorTable, + dataAttestorTable, + resolverTable, + dataResolverTable, + }, nil +} diff --git a/api/regen/data/v2/state.pulsar.go b/api/regen/data/v2/state.pulsar.go new file mode 100644 index 0000000000..f15defaf27 --- /dev/null +++ b/api/regen/data/v2/state.pulsar.go @@ -0,0 +1,3013 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package datav2 + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_DataID protoreflect.MessageDescriptor + fd_DataID_id protoreflect.FieldDescriptor + fd_DataID_iri protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_state_proto_init() + md_DataID = File_regen_data_v2_state_proto.Messages().ByName("DataID") + fd_DataID_id = md_DataID.Fields().ByName("id") + fd_DataID_iri = md_DataID.Fields().ByName("iri") +} + +var _ protoreflect.Message = (*fastReflection_DataID)(nil) + +type fastReflection_DataID DataID + +func (x *DataID) ProtoReflect() protoreflect.Message { + return (*fastReflection_DataID)(x) +} + +func (x *DataID) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_state_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_DataID_messageType fastReflection_DataID_messageType +var _ protoreflect.MessageType = fastReflection_DataID_messageType{} + +type fastReflection_DataID_messageType struct{} + +func (x fastReflection_DataID_messageType) Zero() protoreflect.Message { + return (*fastReflection_DataID)(nil) +} +func (x fastReflection_DataID_messageType) New() protoreflect.Message { + return new(fastReflection_DataID) +} +func (x fastReflection_DataID_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_DataID +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_DataID) Descriptor() protoreflect.MessageDescriptor { + return md_DataID +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_DataID) Type() protoreflect.MessageType { + return _fastReflection_DataID_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_DataID) New() protoreflect.Message { + return new(fastReflection_DataID) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_DataID) Interface() protoreflect.ProtoMessage { + return (*DataID)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_DataID) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Id) != 0 { + value := protoreflect.ValueOfBytes(x.Id) + if !f(fd_DataID_id, value) { + return + } + } + if x.Iri != "" { + value := protoreflect.ValueOfString(x.Iri) + if !f(fd_DataID_iri, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_DataID) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.DataID.id": + return len(x.Id) != 0 + case "regen.data.v2.DataID.iri": + return x.Iri != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.DataID")) + } + panic(fmt.Errorf("message regen.data.v2.DataID does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DataID) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.DataID.id": + x.Id = nil + case "regen.data.v2.DataID.iri": + x.Iri = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.DataID")) + } + panic(fmt.Errorf("message regen.data.v2.DataID does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_DataID) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.DataID.id": + value := x.Id + return protoreflect.ValueOfBytes(value) + case "regen.data.v2.DataID.iri": + value := x.Iri + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.DataID")) + } + panic(fmt.Errorf("message regen.data.v2.DataID does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DataID) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.DataID.id": + x.Id = value.Bytes() + case "regen.data.v2.DataID.iri": + x.Iri = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.DataID")) + } + panic(fmt.Errorf("message regen.data.v2.DataID does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DataID) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.DataID.id": + panic(fmt.Errorf("field id of message regen.data.v2.DataID is not mutable")) + case "regen.data.v2.DataID.iri": + panic(fmt.Errorf("field iri of message regen.data.v2.DataID is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.DataID")) + } + panic(fmt.Errorf("message regen.data.v2.DataID does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_DataID) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.DataID.id": + return protoreflect.ValueOfBytes(nil) + case "regen.data.v2.DataID.iri": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.DataID")) + } + panic(fmt.Errorf("message regen.data.v2.DataID does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_DataID) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.DataID", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_DataID) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DataID) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_DataID) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_DataID) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*DataID) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Iri) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*DataID) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Iri) > 0 { + i -= len(x.Iri) + copy(dAtA[i:], x.Iri) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Iri))) + i-- + dAtA[i] = 0x12 + } + if len(x.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*DataID) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DataID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DataID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Id = append(x.Id[:0], dAtA[iNdEx:postIndex]...) + if x.Id == nil { + x.Id = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Iri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Iri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_DataAnchor protoreflect.MessageDescriptor + fd_DataAnchor_id protoreflect.FieldDescriptor + fd_DataAnchor_timestamp protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_state_proto_init() + md_DataAnchor = File_regen_data_v2_state_proto.Messages().ByName("DataAnchor") + fd_DataAnchor_id = md_DataAnchor.Fields().ByName("id") + fd_DataAnchor_timestamp = md_DataAnchor.Fields().ByName("timestamp") +} + +var _ protoreflect.Message = (*fastReflection_DataAnchor)(nil) + +type fastReflection_DataAnchor DataAnchor + +func (x *DataAnchor) ProtoReflect() protoreflect.Message { + return (*fastReflection_DataAnchor)(x) +} + +func (x *DataAnchor) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_state_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_DataAnchor_messageType fastReflection_DataAnchor_messageType +var _ protoreflect.MessageType = fastReflection_DataAnchor_messageType{} + +type fastReflection_DataAnchor_messageType struct{} + +func (x fastReflection_DataAnchor_messageType) Zero() protoreflect.Message { + return (*fastReflection_DataAnchor)(nil) +} +func (x fastReflection_DataAnchor_messageType) New() protoreflect.Message { + return new(fastReflection_DataAnchor) +} +func (x fastReflection_DataAnchor_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_DataAnchor +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_DataAnchor) Descriptor() protoreflect.MessageDescriptor { + return md_DataAnchor +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_DataAnchor) Type() protoreflect.MessageType { + return _fastReflection_DataAnchor_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_DataAnchor) New() protoreflect.Message { + return new(fastReflection_DataAnchor) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_DataAnchor) Interface() protoreflect.ProtoMessage { + return (*DataAnchor)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_DataAnchor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Id) != 0 { + value := protoreflect.ValueOfBytes(x.Id) + if !f(fd_DataAnchor_id, value) { + return + } + } + if x.Timestamp != nil { + value := protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) + if !f(fd_DataAnchor_timestamp, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_DataAnchor) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.DataAnchor.id": + return len(x.Id) != 0 + case "regen.data.v2.DataAnchor.timestamp": + return x.Timestamp != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.DataAnchor")) + } + panic(fmt.Errorf("message regen.data.v2.DataAnchor does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DataAnchor) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.DataAnchor.id": + x.Id = nil + case "regen.data.v2.DataAnchor.timestamp": + x.Timestamp = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.DataAnchor")) + } + panic(fmt.Errorf("message regen.data.v2.DataAnchor does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_DataAnchor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.DataAnchor.id": + value := x.Id + return protoreflect.ValueOfBytes(value) + case "regen.data.v2.DataAnchor.timestamp": + value := x.Timestamp + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.DataAnchor")) + } + panic(fmt.Errorf("message regen.data.v2.DataAnchor does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DataAnchor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.DataAnchor.id": + x.Id = value.Bytes() + case "regen.data.v2.DataAnchor.timestamp": + x.Timestamp = value.Message().Interface().(*timestamppb.Timestamp) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.DataAnchor")) + } + panic(fmt.Errorf("message regen.data.v2.DataAnchor does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DataAnchor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.DataAnchor.timestamp": + if x.Timestamp == nil { + x.Timestamp = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) + case "regen.data.v2.DataAnchor.id": + panic(fmt.Errorf("field id of message regen.data.v2.DataAnchor is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.DataAnchor")) + } + panic(fmt.Errorf("message regen.data.v2.DataAnchor does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_DataAnchor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.DataAnchor.id": + return protoreflect.ValueOfBytes(nil) + case "regen.data.v2.DataAnchor.timestamp": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.DataAnchor")) + } + panic(fmt.Errorf("message regen.data.v2.DataAnchor does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_DataAnchor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.DataAnchor", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_DataAnchor) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DataAnchor) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_DataAnchor) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_DataAnchor) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*DataAnchor) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Timestamp != nil { + l = options.Size(x.Timestamp) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*DataAnchor) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Timestamp != nil { + encoded, err := options.Marshal(x.Timestamp) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*DataAnchor) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DataAnchor: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DataAnchor: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Id = append(x.Id[:0], dAtA[iNdEx:postIndex]...) + if x.Id == nil { + x.Id = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Timestamp == nil { + x.Timestamp = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Timestamp); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_DataAttestor protoreflect.MessageDescriptor + fd_DataAttestor_id protoreflect.FieldDescriptor + fd_DataAttestor_attestor protoreflect.FieldDescriptor + fd_DataAttestor_timestamp protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_state_proto_init() + md_DataAttestor = File_regen_data_v2_state_proto.Messages().ByName("DataAttestor") + fd_DataAttestor_id = md_DataAttestor.Fields().ByName("id") + fd_DataAttestor_attestor = md_DataAttestor.Fields().ByName("attestor") + fd_DataAttestor_timestamp = md_DataAttestor.Fields().ByName("timestamp") +} + +var _ protoreflect.Message = (*fastReflection_DataAttestor)(nil) + +type fastReflection_DataAttestor DataAttestor + +func (x *DataAttestor) ProtoReflect() protoreflect.Message { + return (*fastReflection_DataAttestor)(x) +} + +func (x *DataAttestor) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_state_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_DataAttestor_messageType fastReflection_DataAttestor_messageType +var _ protoreflect.MessageType = fastReflection_DataAttestor_messageType{} + +type fastReflection_DataAttestor_messageType struct{} + +func (x fastReflection_DataAttestor_messageType) Zero() protoreflect.Message { + return (*fastReflection_DataAttestor)(nil) +} +func (x fastReflection_DataAttestor_messageType) New() protoreflect.Message { + return new(fastReflection_DataAttestor) +} +func (x fastReflection_DataAttestor_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_DataAttestor +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_DataAttestor) Descriptor() protoreflect.MessageDescriptor { + return md_DataAttestor +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_DataAttestor) Type() protoreflect.MessageType { + return _fastReflection_DataAttestor_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_DataAttestor) New() protoreflect.Message { + return new(fastReflection_DataAttestor) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_DataAttestor) Interface() protoreflect.ProtoMessage { + return (*DataAttestor)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_DataAttestor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Id) != 0 { + value := protoreflect.ValueOfBytes(x.Id) + if !f(fd_DataAttestor_id, value) { + return + } + } + if len(x.Attestor) != 0 { + value := protoreflect.ValueOfBytes(x.Attestor) + if !f(fd_DataAttestor_attestor, value) { + return + } + } + if x.Timestamp != nil { + value := protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) + if !f(fd_DataAttestor_timestamp, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_DataAttestor) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.DataAttestor.id": + return len(x.Id) != 0 + case "regen.data.v2.DataAttestor.attestor": + return len(x.Attestor) != 0 + case "regen.data.v2.DataAttestor.timestamp": + return x.Timestamp != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.DataAttestor")) + } + panic(fmt.Errorf("message regen.data.v2.DataAttestor does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DataAttestor) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.DataAttestor.id": + x.Id = nil + case "regen.data.v2.DataAttestor.attestor": + x.Attestor = nil + case "regen.data.v2.DataAttestor.timestamp": + x.Timestamp = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.DataAttestor")) + } + panic(fmt.Errorf("message regen.data.v2.DataAttestor does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_DataAttestor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.DataAttestor.id": + value := x.Id + return protoreflect.ValueOfBytes(value) + case "regen.data.v2.DataAttestor.attestor": + value := x.Attestor + return protoreflect.ValueOfBytes(value) + case "regen.data.v2.DataAttestor.timestamp": + value := x.Timestamp + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.DataAttestor")) + } + panic(fmt.Errorf("message regen.data.v2.DataAttestor does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DataAttestor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.DataAttestor.id": + x.Id = value.Bytes() + case "regen.data.v2.DataAttestor.attestor": + x.Attestor = value.Bytes() + case "regen.data.v2.DataAttestor.timestamp": + x.Timestamp = value.Message().Interface().(*timestamppb.Timestamp) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.DataAttestor")) + } + panic(fmt.Errorf("message regen.data.v2.DataAttestor does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DataAttestor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.DataAttestor.timestamp": + if x.Timestamp == nil { + x.Timestamp = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) + case "regen.data.v2.DataAttestor.id": + panic(fmt.Errorf("field id of message regen.data.v2.DataAttestor is not mutable")) + case "regen.data.v2.DataAttestor.attestor": + panic(fmt.Errorf("field attestor of message regen.data.v2.DataAttestor is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.DataAttestor")) + } + panic(fmt.Errorf("message regen.data.v2.DataAttestor does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_DataAttestor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.DataAttestor.id": + return protoreflect.ValueOfBytes(nil) + case "regen.data.v2.DataAttestor.attestor": + return protoreflect.ValueOfBytes(nil) + case "regen.data.v2.DataAttestor.timestamp": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.DataAttestor")) + } + panic(fmt.Errorf("message regen.data.v2.DataAttestor does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_DataAttestor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.DataAttestor", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_DataAttestor) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DataAttestor) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_DataAttestor) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_DataAttestor) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*DataAttestor) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Attestor) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Timestamp != nil { + l = options.Size(x.Timestamp) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*DataAttestor) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Timestamp != nil { + encoded, err := options.Marshal(x.Timestamp) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + if len(x.Attestor) > 0 { + i -= len(x.Attestor) + copy(dAtA[i:], x.Attestor) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Attestor))) + i-- + dAtA[i] = 0x12 + } + if len(x.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*DataAttestor) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DataAttestor: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DataAttestor: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Id = append(x.Id[:0], dAtA[iNdEx:postIndex]...) + if x.Id == nil { + x.Id = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Attestor", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Attestor = append(x.Attestor[:0], dAtA[iNdEx:postIndex]...) + if x.Attestor == nil { + x.Attestor = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Timestamp == nil { + x.Timestamp = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Timestamp); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_Resolver protoreflect.MessageDescriptor + fd_Resolver_id protoreflect.FieldDescriptor + fd_Resolver_url protoreflect.FieldDescriptor + fd_Resolver_manager protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_state_proto_init() + md_Resolver = File_regen_data_v2_state_proto.Messages().ByName("Resolver") + fd_Resolver_id = md_Resolver.Fields().ByName("id") + fd_Resolver_url = md_Resolver.Fields().ByName("url") + fd_Resolver_manager = md_Resolver.Fields().ByName("manager") +} + +var _ protoreflect.Message = (*fastReflection_Resolver)(nil) + +type fastReflection_Resolver Resolver + +func (x *Resolver) ProtoReflect() protoreflect.Message { + return (*fastReflection_Resolver)(x) +} + +func (x *Resolver) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_state_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Resolver_messageType fastReflection_Resolver_messageType +var _ protoreflect.MessageType = fastReflection_Resolver_messageType{} + +type fastReflection_Resolver_messageType struct{} + +func (x fastReflection_Resolver_messageType) Zero() protoreflect.Message { + return (*fastReflection_Resolver)(nil) +} +func (x fastReflection_Resolver_messageType) New() protoreflect.Message { + return new(fastReflection_Resolver) +} +func (x fastReflection_Resolver_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Resolver +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Resolver) Descriptor() protoreflect.MessageDescriptor { + return md_Resolver +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Resolver) Type() protoreflect.MessageType { + return _fastReflection_Resolver_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Resolver) New() protoreflect.Message { + return new(fastReflection_Resolver) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Resolver) Interface() protoreflect.ProtoMessage { + return (*Resolver)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Resolver) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != uint64(0) { + value := protoreflect.ValueOfUint64(x.Id) + if !f(fd_Resolver_id, value) { + return + } + } + if x.Url != "" { + value := protoreflect.ValueOfString(x.Url) + if !f(fd_Resolver_url, value) { + return + } + } + if len(x.Manager) != 0 { + value := protoreflect.ValueOfBytes(x.Manager) + if !f(fd_Resolver_manager, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Resolver) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.Resolver.id": + return x.Id != uint64(0) + case "regen.data.v2.Resolver.url": + return x.Url != "" + case "regen.data.v2.Resolver.manager": + return len(x.Manager) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.Resolver")) + } + panic(fmt.Errorf("message regen.data.v2.Resolver does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Resolver) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.Resolver.id": + x.Id = uint64(0) + case "regen.data.v2.Resolver.url": + x.Url = "" + case "regen.data.v2.Resolver.manager": + x.Manager = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.Resolver")) + } + panic(fmt.Errorf("message regen.data.v2.Resolver does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Resolver) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.Resolver.id": + value := x.Id + return protoreflect.ValueOfUint64(value) + case "regen.data.v2.Resolver.url": + value := x.Url + return protoreflect.ValueOfString(value) + case "regen.data.v2.Resolver.manager": + value := x.Manager + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.Resolver")) + } + panic(fmt.Errorf("message regen.data.v2.Resolver does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Resolver) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.Resolver.id": + x.Id = value.Uint() + case "regen.data.v2.Resolver.url": + x.Url = value.Interface().(string) + case "regen.data.v2.Resolver.manager": + x.Manager = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.Resolver")) + } + panic(fmt.Errorf("message regen.data.v2.Resolver does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Resolver) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.Resolver.id": + panic(fmt.Errorf("field id of message regen.data.v2.Resolver is not mutable")) + case "regen.data.v2.Resolver.url": + panic(fmt.Errorf("field url of message regen.data.v2.Resolver is not mutable")) + case "regen.data.v2.Resolver.manager": + panic(fmt.Errorf("field manager of message regen.data.v2.Resolver is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.Resolver")) + } + panic(fmt.Errorf("message regen.data.v2.Resolver does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Resolver) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.Resolver.id": + return protoreflect.ValueOfUint64(uint64(0)) + case "regen.data.v2.Resolver.url": + return protoreflect.ValueOfString("") + case "regen.data.v2.Resolver.manager": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.Resolver")) + } + panic(fmt.Errorf("message regen.data.v2.Resolver does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Resolver) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.Resolver", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Resolver) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Resolver) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Resolver) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Resolver) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Resolver) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Id != 0 { + n += 1 + runtime.Sov(uint64(x.Id)) + } + l = len(x.Url) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Manager) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Resolver) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Manager) > 0 { + i -= len(x.Manager) + copy(dAtA[i:], x.Manager) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Manager))) + i-- + dAtA[i] = 0x1a + } + if len(x.Url) > 0 { + i -= len(x.Url) + copy(dAtA[i:], x.Url) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Url))) + i-- + dAtA[i] = 0x12 + } + if x.Id != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Resolver) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Resolver: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Resolver: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + x.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Url = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Manager", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Manager = append(x.Manager[:0], dAtA[iNdEx:postIndex]...) + if x.Manager == nil { + x.Manager = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_DataResolver protoreflect.MessageDescriptor + fd_DataResolver_id protoreflect.FieldDescriptor + fd_DataResolver_resolver_id protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_state_proto_init() + md_DataResolver = File_regen_data_v2_state_proto.Messages().ByName("DataResolver") + fd_DataResolver_id = md_DataResolver.Fields().ByName("id") + fd_DataResolver_resolver_id = md_DataResolver.Fields().ByName("resolver_id") +} + +var _ protoreflect.Message = (*fastReflection_DataResolver)(nil) + +type fastReflection_DataResolver DataResolver + +func (x *DataResolver) ProtoReflect() protoreflect.Message { + return (*fastReflection_DataResolver)(x) +} + +func (x *DataResolver) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_state_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_DataResolver_messageType fastReflection_DataResolver_messageType +var _ protoreflect.MessageType = fastReflection_DataResolver_messageType{} + +type fastReflection_DataResolver_messageType struct{} + +func (x fastReflection_DataResolver_messageType) Zero() protoreflect.Message { + return (*fastReflection_DataResolver)(nil) +} +func (x fastReflection_DataResolver_messageType) New() protoreflect.Message { + return new(fastReflection_DataResolver) +} +func (x fastReflection_DataResolver_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_DataResolver +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_DataResolver) Descriptor() protoreflect.MessageDescriptor { + return md_DataResolver +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_DataResolver) Type() protoreflect.MessageType { + return _fastReflection_DataResolver_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_DataResolver) New() protoreflect.Message { + return new(fastReflection_DataResolver) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_DataResolver) Interface() protoreflect.ProtoMessage { + return (*DataResolver)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_DataResolver) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Id) != 0 { + value := protoreflect.ValueOfBytes(x.Id) + if !f(fd_DataResolver_id, value) { + return + } + } + if x.ResolverId != uint64(0) { + value := protoreflect.ValueOfUint64(x.ResolverId) + if !f(fd_DataResolver_resolver_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_DataResolver) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.DataResolver.id": + return len(x.Id) != 0 + case "regen.data.v2.DataResolver.resolver_id": + return x.ResolverId != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.DataResolver")) + } + panic(fmt.Errorf("message regen.data.v2.DataResolver does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DataResolver) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.DataResolver.id": + x.Id = nil + case "regen.data.v2.DataResolver.resolver_id": + x.ResolverId = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.DataResolver")) + } + panic(fmt.Errorf("message regen.data.v2.DataResolver does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_DataResolver) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.DataResolver.id": + value := x.Id + return protoreflect.ValueOfBytes(value) + case "regen.data.v2.DataResolver.resolver_id": + value := x.ResolverId + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.DataResolver")) + } + panic(fmt.Errorf("message regen.data.v2.DataResolver does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DataResolver) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.DataResolver.id": + x.Id = value.Bytes() + case "regen.data.v2.DataResolver.resolver_id": + x.ResolverId = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.DataResolver")) + } + panic(fmt.Errorf("message regen.data.v2.DataResolver does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DataResolver) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.DataResolver.id": + panic(fmt.Errorf("field id of message regen.data.v2.DataResolver is not mutable")) + case "regen.data.v2.DataResolver.resolver_id": + panic(fmt.Errorf("field resolver_id of message regen.data.v2.DataResolver is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.DataResolver")) + } + panic(fmt.Errorf("message regen.data.v2.DataResolver does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_DataResolver) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.DataResolver.id": + return protoreflect.ValueOfBytes(nil) + case "regen.data.v2.DataResolver.resolver_id": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.DataResolver")) + } + panic(fmt.Errorf("message regen.data.v2.DataResolver does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_DataResolver) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.DataResolver", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_DataResolver) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_DataResolver) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_DataResolver) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_DataResolver) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*DataResolver) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ResolverId != 0 { + n += 1 + runtime.Sov(uint64(x.ResolverId)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*DataResolver) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.ResolverId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ResolverId)) + i-- + dAtA[i] = 0x10 + } + if len(x.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*DataResolver) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DataResolver: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DataResolver: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Id = append(x.Id[:0], dAtA[iNdEx:postIndex]...) + if x.Id == nil { + x.Id = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ResolverId", wireType) + } + x.ResolverId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.ResolverId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: regen/data/v2/state.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// DataID stores a compact data ID and its full IRI. +type DataID struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // id is the compact automatically-generated data ID. + Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // iri is the IRI of the data which contains its full ContentHash. + Iri string `protobuf:"bytes,2,opt,name=iri,proto3" json:"iri,omitempty"` +} + +func (x *DataID) Reset() { + *x = DataID{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_state_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataID) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataID) ProtoMessage() {} + +// Deprecated: Use DataID.ProtoReflect.Descriptor instead. +func (*DataID) Descriptor() ([]byte, []int) { + return file_regen_data_v2_state_proto_rawDescGZIP(), []int{0} +} + +func (x *DataID) GetId() []byte { + if x != nil { + return x.Id + } + return nil +} + +func (x *DataID) GetIri() string { + if x != nil { + return x.Iri + } + return "" +} + +// DataAnchor stores the anchor timestamp for a data object. +type DataAnchor struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // id is the compact data ID. + Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // timestamp is the anchor timestamp for this object - the time at which + // it was first known to the blockchain. + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *DataAnchor) Reset() { + *x = DataAnchor{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_state_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataAnchor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataAnchor) ProtoMessage() {} + +// Deprecated: Use DataAnchor.ProtoReflect.Descriptor instead. +func (*DataAnchor) Descriptor() ([]byte, []int) { + return file_regen_data_v2_state_proto_rawDescGZIP(), []int{1} +} + +func (x *DataAnchor) GetId() []byte { + if x != nil { + return x.Id + } + return nil +} + +func (x *DataAnchor) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// DataAttestor is a join table for associating data IDs and attestors. +type DataAttestor struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // id is the compact data ID. + Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // attestor is the account address of the attestor. + Attestor []byte `protobuf:"bytes,2,opt,name=attestor,proto3" json:"attestor,omitempty"` + // timestamp is the time at which the attestor signed this data object. + Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *DataAttestor) Reset() { + *x = DataAttestor{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_state_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataAttestor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataAttestor) ProtoMessage() {} + +// Deprecated: Use DataAttestor.ProtoReflect.Descriptor instead. +func (*DataAttestor) Descriptor() ([]byte, []int) { + return file_regen_data_v2_state_proto_rawDescGZIP(), []int{2} +} + +func (x *DataAttestor) GetId() []byte { + if x != nil { + return x.Id + } + return nil +} + +func (x *DataAttestor) GetAttestor() []byte { + if x != nil { + return x.Attestor + } + return nil +} + +func (x *DataAttestor) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// Resolver describes a data resolver. +type Resolver struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // id is the ID of the resolver. + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // url is the URL of the resolver. + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + // manager is the bytes address of the resolver manager who is allowed + // to make calls to Msg/RegisterResolver for this resolver. + Manager []byte `protobuf:"bytes,3,opt,name=manager,proto3" json:"manager,omitempty"` +} + +func (x *Resolver) Reset() { + *x = Resolver{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_state_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Resolver) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Resolver) ProtoMessage() {} + +// Deprecated: Use Resolver.ProtoReflect.Descriptor instead. +func (*Resolver) Descriptor() ([]byte, []int) { + return file_regen_data_v2_state_proto_rawDescGZIP(), []int{3} +} + +func (x *Resolver) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *Resolver) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *Resolver) GetManager() []byte { + if x != nil { + return x.Manager + } + return nil +} + +// DataResolver is a join table between data objects and resolvers and indicates +// that a resolver claims to be able to resolve this data object. +type DataResolver struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // id is the compact data ID. + Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // resolver_id is the ID of the resolver. + ResolverId uint64 `protobuf:"varint,2,opt,name=resolver_id,json=resolverId,proto3" json:"resolver_id,omitempty"` +} + +func (x *DataResolver) Reset() { + *x = DataResolver{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_state_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataResolver) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataResolver) ProtoMessage() {} + +// Deprecated: Use DataResolver.ProtoReflect.Descriptor instead. +func (*DataResolver) Descriptor() ([]byte, []int) { + return file_regen_data_v2_state_proto_rawDescGZIP(), []int{4} +} + +func (x *DataResolver) GetId() []byte { + if x != nil { + return x.Id + } + return nil +} + +func (x *DataResolver) GetResolverId() uint64 { + if x != nil { + return x.ResolverId + } + return 0 +} + +var File_regen_data_v2_state_proto protoreflect.FileDescriptor + +var file_regen_data_v2_state_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x32, 0x2f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x72, 0x65, 0x67, + 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x45, 0x0a, 0x06, 0x44, 0x61, 0x74, 0x61, 0x49, 0x44, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, + 0x0a, 0x03, 0x69, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x69, 0x72, 0x69, + 0x3a, 0x19, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x13, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x09, + 0x0a, 0x03, 0x69, 0x72, 0x69, 0x10, 0x01, 0x18, 0x01, 0x18, 0x01, 0x22, 0x66, 0x0a, 0x0a, 0x44, + 0x61, 0x74, 0x61, 0x41, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x02, 0x22, 0x9b, 0x01, 0x0a, 0x0c, 0x44, 0x61, 0x74, 0x61, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3a, 0x25, 0xf2, 0x9e, 0xd3, 0x8e, + 0x03, 0x1f, 0x0a, 0x0d, 0x0a, 0x0b, 0x69, 0x64, 0x2c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x12, 0x0c, 0x0a, 0x08, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x10, 0x01, 0x18, + 0x03, 0x22, 0x74, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, + 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, + 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x07, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x3a, 0x2c, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, + 0x26, 0x0a, 0x06, 0x0a, 0x02, 0x69, 0x64, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x75, 0x72, 0x6c, + 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0b, 0x75, 0x72, 0x6c, 0x2c, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x10, 0x02, 0x18, 0x01, 0x18, 0x04, 0x22, 0x5b, 0x0a, 0x0c, 0x44, 0x61, 0x74, 0x61, 0x52, + 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x72, 0x65, + 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x49, 0x64, 0x3a, 0x1a, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x14, + 0x0a, 0x10, 0x0a, 0x0e, 0x69, 0x64, 0x2c, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x05, 0x42, 0xb5, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x65, 0x67, + 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, + 0x32, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x58, 0xaa, 0x02, + 0x0d, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x32, 0xca, 0x02, + 0x0d, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x5c, 0x56, 0x32, 0xe2, 0x02, + 0x19, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x5c, 0x56, 0x32, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x52, 0x65, 0x67, + 0x65, 0x6e, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_regen_data_v2_state_proto_rawDescOnce sync.Once + file_regen_data_v2_state_proto_rawDescData = file_regen_data_v2_state_proto_rawDesc +) + +func file_regen_data_v2_state_proto_rawDescGZIP() []byte { + file_regen_data_v2_state_proto_rawDescOnce.Do(func() { + file_regen_data_v2_state_proto_rawDescData = protoimpl.X.CompressGZIP(file_regen_data_v2_state_proto_rawDescData) + }) + return file_regen_data_v2_state_proto_rawDescData +} + +var file_regen_data_v2_state_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_regen_data_v2_state_proto_goTypes = []interface{}{ + (*DataID)(nil), // 0: regen.data.v2.DataID + (*DataAnchor)(nil), // 1: regen.data.v2.DataAnchor + (*DataAttestor)(nil), // 2: regen.data.v2.DataAttestor + (*Resolver)(nil), // 3: regen.data.v2.Resolver + (*DataResolver)(nil), // 4: regen.data.v2.DataResolver + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp +} +var file_regen_data_v2_state_proto_depIdxs = []int32{ + 5, // 0: regen.data.v2.DataAnchor.timestamp:type_name -> google.protobuf.Timestamp + 5, // 1: regen.data.v2.DataAttestor.timestamp:type_name -> google.protobuf.Timestamp + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_regen_data_v2_state_proto_init() } +func file_regen_data_v2_state_proto_init() { + if File_regen_data_v2_state_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_regen_data_v2_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataID); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_state_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataAnchor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_state_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataAttestor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_state_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Resolver); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_state_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataResolver); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_regen_data_v2_state_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_regen_data_v2_state_proto_goTypes, + DependencyIndexes: file_regen_data_v2_state_proto_depIdxs, + MessageInfos: file_regen_data_v2_state_proto_msgTypes, + }.Build() + File_regen_data_v2_state_proto = out.File + file_regen_data_v2_state_proto_rawDesc = nil + file_regen_data_v2_state_proto_goTypes = nil + file_regen_data_v2_state_proto_depIdxs = nil +} diff --git a/api/regen/data/v2/tx.pulsar.go b/api/regen/data/v2/tx.pulsar.go new file mode 100644 index 0000000000..ccf53c696d --- /dev/null +++ b/api/regen/data/v2/tx.pulsar.go @@ -0,0 +1,4628 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package datav2 + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/cosmos-sdk/api/cosmos/msg/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_MsgAnchor protoreflect.MessageDescriptor + fd_MsgAnchor_sender protoreflect.FieldDescriptor + fd_MsgAnchor_content_hash protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_tx_proto_init() + md_MsgAnchor = File_regen_data_v2_tx_proto.Messages().ByName("MsgAnchor") + fd_MsgAnchor_sender = md_MsgAnchor.Fields().ByName("sender") + fd_MsgAnchor_content_hash = md_MsgAnchor.Fields().ByName("content_hash") +} + +var _ protoreflect.Message = (*fastReflection_MsgAnchor)(nil) + +type fastReflection_MsgAnchor MsgAnchor + +func (x *MsgAnchor) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgAnchor)(x) +} + +func (x *MsgAnchor) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_tx_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgAnchor_messageType fastReflection_MsgAnchor_messageType +var _ protoreflect.MessageType = fastReflection_MsgAnchor_messageType{} + +type fastReflection_MsgAnchor_messageType struct{} + +func (x fastReflection_MsgAnchor_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgAnchor)(nil) +} +func (x fastReflection_MsgAnchor_messageType) New() protoreflect.Message { + return new(fastReflection_MsgAnchor) +} +func (x fastReflection_MsgAnchor_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAnchor +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgAnchor) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAnchor +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgAnchor) Type() protoreflect.MessageType { + return _fastReflection_MsgAnchor_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgAnchor) New() protoreflect.Message { + return new(fastReflection_MsgAnchor) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgAnchor) Interface() protoreflect.ProtoMessage { + return (*MsgAnchor)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgAnchor) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Sender != "" { + value := protoreflect.ValueOfString(x.Sender) + if !f(fd_MsgAnchor_sender, value) { + return + } + } + if x.ContentHash != nil { + value := protoreflect.ValueOfMessage(x.ContentHash.ProtoReflect()) + if !f(fd_MsgAnchor_content_hash, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgAnchor) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.MsgAnchor.sender": + return x.Sender != "" + case "regen.data.v2.MsgAnchor.content_hash": + return x.ContentHash != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgAnchor")) + } + panic(fmt.Errorf("message regen.data.v2.MsgAnchor does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAnchor) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.MsgAnchor.sender": + x.Sender = "" + case "regen.data.v2.MsgAnchor.content_hash": + x.ContentHash = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgAnchor")) + } + panic(fmt.Errorf("message regen.data.v2.MsgAnchor does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgAnchor) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.MsgAnchor.sender": + value := x.Sender + return protoreflect.ValueOfString(value) + case "regen.data.v2.MsgAnchor.content_hash": + value := x.ContentHash + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgAnchor")) + } + panic(fmt.Errorf("message regen.data.v2.MsgAnchor does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAnchor) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.MsgAnchor.sender": + x.Sender = value.Interface().(string) + case "regen.data.v2.MsgAnchor.content_hash": + x.ContentHash = value.Message().Interface().(*ContentHash) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgAnchor")) + } + panic(fmt.Errorf("message regen.data.v2.MsgAnchor does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAnchor) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.MsgAnchor.content_hash": + if x.ContentHash == nil { + x.ContentHash = new(ContentHash) + } + return protoreflect.ValueOfMessage(x.ContentHash.ProtoReflect()) + case "regen.data.v2.MsgAnchor.sender": + panic(fmt.Errorf("field sender of message regen.data.v2.MsgAnchor is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgAnchor")) + } + panic(fmt.Errorf("message regen.data.v2.MsgAnchor does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgAnchor) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.MsgAnchor.sender": + return protoreflect.ValueOfString("") + case "regen.data.v2.MsgAnchor.content_hash": + m := new(ContentHash) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgAnchor")) + } + panic(fmt.Errorf("message regen.data.v2.MsgAnchor does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgAnchor) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.MsgAnchor", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgAnchor) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAnchor) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgAnchor) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgAnchor) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgAnchor) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ContentHash != nil { + l = options.Size(x.ContentHash) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgAnchor) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.ContentHash != nil { + encoded, err := options.Marshal(x.ContentHash) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgAnchor) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAnchor: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAnchor: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ContentHash", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ContentHash == nil { + x.ContentHash = &ContentHash{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ContentHash); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgAnchorResponse protoreflect.MessageDescriptor + fd_MsgAnchorResponse_iri protoreflect.FieldDescriptor + fd_MsgAnchorResponse_timestamp protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_tx_proto_init() + md_MsgAnchorResponse = File_regen_data_v2_tx_proto.Messages().ByName("MsgAnchorResponse") + fd_MsgAnchorResponse_iri = md_MsgAnchorResponse.Fields().ByName("iri") + fd_MsgAnchorResponse_timestamp = md_MsgAnchorResponse.Fields().ByName("timestamp") +} + +var _ protoreflect.Message = (*fastReflection_MsgAnchorResponse)(nil) + +type fastReflection_MsgAnchorResponse MsgAnchorResponse + +func (x *MsgAnchorResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgAnchorResponse)(x) +} + +func (x *MsgAnchorResponse) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_tx_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgAnchorResponse_messageType fastReflection_MsgAnchorResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgAnchorResponse_messageType{} + +type fastReflection_MsgAnchorResponse_messageType struct{} + +func (x fastReflection_MsgAnchorResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgAnchorResponse)(nil) +} +func (x fastReflection_MsgAnchorResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgAnchorResponse) +} +func (x fastReflection_MsgAnchorResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAnchorResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgAnchorResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAnchorResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgAnchorResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgAnchorResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgAnchorResponse) New() protoreflect.Message { + return new(fastReflection_MsgAnchorResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgAnchorResponse) Interface() protoreflect.ProtoMessage { + return (*MsgAnchorResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgAnchorResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Iri != "" { + value := protoreflect.ValueOfString(x.Iri) + if !f(fd_MsgAnchorResponse_iri, value) { + return + } + } + if x.Timestamp != nil { + value := protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) + if !f(fd_MsgAnchorResponse_timestamp, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgAnchorResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.MsgAnchorResponse.iri": + return x.Iri != "" + case "regen.data.v2.MsgAnchorResponse.timestamp": + return x.Timestamp != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgAnchorResponse")) + } + panic(fmt.Errorf("message regen.data.v2.MsgAnchorResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAnchorResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.MsgAnchorResponse.iri": + x.Iri = "" + case "regen.data.v2.MsgAnchorResponse.timestamp": + x.Timestamp = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgAnchorResponse")) + } + panic(fmt.Errorf("message regen.data.v2.MsgAnchorResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgAnchorResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.MsgAnchorResponse.iri": + value := x.Iri + return protoreflect.ValueOfString(value) + case "regen.data.v2.MsgAnchorResponse.timestamp": + value := x.Timestamp + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgAnchorResponse")) + } + panic(fmt.Errorf("message regen.data.v2.MsgAnchorResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAnchorResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.MsgAnchorResponse.iri": + x.Iri = value.Interface().(string) + case "regen.data.v2.MsgAnchorResponse.timestamp": + x.Timestamp = value.Message().Interface().(*timestamppb.Timestamp) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgAnchorResponse")) + } + panic(fmt.Errorf("message regen.data.v2.MsgAnchorResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAnchorResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.MsgAnchorResponse.timestamp": + if x.Timestamp == nil { + x.Timestamp = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) + case "regen.data.v2.MsgAnchorResponse.iri": + panic(fmt.Errorf("field iri of message regen.data.v2.MsgAnchorResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgAnchorResponse")) + } + panic(fmt.Errorf("message regen.data.v2.MsgAnchorResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgAnchorResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.MsgAnchorResponse.iri": + return protoreflect.ValueOfString("") + case "regen.data.v2.MsgAnchorResponse.timestamp": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgAnchorResponse")) + } + panic(fmt.Errorf("message regen.data.v2.MsgAnchorResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgAnchorResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.MsgAnchorResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgAnchorResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAnchorResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgAnchorResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgAnchorResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgAnchorResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Iri) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Timestamp != nil { + l = options.Size(x.Timestamp) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgAnchorResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Timestamp != nil { + encoded, err := options.Marshal(x.Timestamp) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Iri) > 0 { + i -= len(x.Iri) + copy(dAtA[i:], x.Iri) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Iri))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgAnchorResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAnchorResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAnchorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Iri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Iri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Timestamp == nil { + x.Timestamp = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Timestamp); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgAttest_2_list)(nil) + +type _MsgAttest_2_list struct { + list *[]*ContentHash_Graph +} + +func (x *_MsgAttest_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgAttest_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgAttest_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ContentHash_Graph) + (*x.list)[i] = concreteValue +} + +func (x *_MsgAttest_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ContentHash_Graph) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgAttest_2_list) AppendMutable() protoreflect.Value { + v := new(ContentHash_Graph) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgAttest_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgAttest_2_list) NewElement() protoreflect.Value { + v := new(ContentHash_Graph) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgAttest_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgAttest protoreflect.MessageDescriptor + fd_MsgAttest_attestor protoreflect.FieldDescriptor + fd_MsgAttest_content_hashes protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_tx_proto_init() + md_MsgAttest = File_regen_data_v2_tx_proto.Messages().ByName("MsgAttest") + fd_MsgAttest_attestor = md_MsgAttest.Fields().ByName("attestor") + fd_MsgAttest_content_hashes = md_MsgAttest.Fields().ByName("content_hashes") +} + +var _ protoreflect.Message = (*fastReflection_MsgAttest)(nil) + +type fastReflection_MsgAttest MsgAttest + +func (x *MsgAttest) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgAttest)(x) +} + +func (x *MsgAttest) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_tx_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgAttest_messageType fastReflection_MsgAttest_messageType +var _ protoreflect.MessageType = fastReflection_MsgAttest_messageType{} + +type fastReflection_MsgAttest_messageType struct{} + +func (x fastReflection_MsgAttest_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgAttest)(nil) +} +func (x fastReflection_MsgAttest_messageType) New() protoreflect.Message { + return new(fastReflection_MsgAttest) +} +func (x fastReflection_MsgAttest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAttest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgAttest) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAttest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgAttest) Type() protoreflect.MessageType { + return _fastReflection_MsgAttest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgAttest) New() protoreflect.Message { + return new(fastReflection_MsgAttest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgAttest) Interface() protoreflect.ProtoMessage { + return (*MsgAttest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgAttest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Attestor != "" { + value := protoreflect.ValueOfString(x.Attestor) + if !f(fd_MsgAttest_attestor, value) { + return + } + } + if len(x.ContentHashes) != 0 { + value := protoreflect.ValueOfList(&_MsgAttest_2_list{list: &x.ContentHashes}) + if !f(fd_MsgAttest_content_hashes, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgAttest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.MsgAttest.attestor": + return x.Attestor != "" + case "regen.data.v2.MsgAttest.content_hashes": + return len(x.ContentHashes) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgAttest")) + } + panic(fmt.Errorf("message regen.data.v2.MsgAttest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAttest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.MsgAttest.attestor": + x.Attestor = "" + case "regen.data.v2.MsgAttest.content_hashes": + x.ContentHashes = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgAttest")) + } + panic(fmt.Errorf("message regen.data.v2.MsgAttest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgAttest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.MsgAttest.attestor": + value := x.Attestor + return protoreflect.ValueOfString(value) + case "regen.data.v2.MsgAttest.content_hashes": + if len(x.ContentHashes) == 0 { + return protoreflect.ValueOfList(&_MsgAttest_2_list{}) + } + listValue := &_MsgAttest_2_list{list: &x.ContentHashes} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgAttest")) + } + panic(fmt.Errorf("message regen.data.v2.MsgAttest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAttest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.MsgAttest.attestor": + x.Attestor = value.Interface().(string) + case "regen.data.v2.MsgAttest.content_hashes": + lv := value.List() + clv := lv.(*_MsgAttest_2_list) + x.ContentHashes = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgAttest")) + } + panic(fmt.Errorf("message regen.data.v2.MsgAttest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAttest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.MsgAttest.content_hashes": + if x.ContentHashes == nil { + x.ContentHashes = []*ContentHash_Graph{} + } + value := &_MsgAttest_2_list{list: &x.ContentHashes} + return protoreflect.ValueOfList(value) + case "regen.data.v2.MsgAttest.attestor": + panic(fmt.Errorf("field attestor of message regen.data.v2.MsgAttest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgAttest")) + } + panic(fmt.Errorf("message regen.data.v2.MsgAttest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgAttest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.MsgAttest.attestor": + return protoreflect.ValueOfString("") + case "regen.data.v2.MsgAttest.content_hashes": + list := []*ContentHash_Graph{} + return protoreflect.ValueOfList(&_MsgAttest_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgAttest")) + } + panic(fmt.Errorf("message regen.data.v2.MsgAttest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgAttest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.MsgAttest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgAttest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAttest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgAttest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgAttest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgAttest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Attestor) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.ContentHashes) > 0 { + for _, e := range x.ContentHashes { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgAttest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ContentHashes) > 0 { + for iNdEx := len(x.ContentHashes) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ContentHashes[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.Attestor) > 0 { + i -= len(x.Attestor) + copy(dAtA[i:], x.Attestor) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Attestor))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgAttest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAttest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAttest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Attestor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Attestor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ContentHashes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ContentHashes = append(x.ContentHashes, &ContentHash_Graph{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ContentHashes[len(x.ContentHashes)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgAttestResponse_1_list)(nil) + +type _MsgAttestResponse_1_list struct { + list *[]string +} + +func (x *_MsgAttestResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgAttestResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_MsgAttestResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgAttestResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgAttestResponse_1_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgAttestResponse at list field Iris as it is not of Message kind")) +} + +func (x *_MsgAttestResponse_1_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgAttestResponse_1_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_MsgAttestResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgAttestResponse protoreflect.MessageDescriptor + fd_MsgAttestResponse_iris protoreflect.FieldDescriptor + fd_MsgAttestResponse_timestamp protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_tx_proto_init() + md_MsgAttestResponse = File_regen_data_v2_tx_proto.Messages().ByName("MsgAttestResponse") + fd_MsgAttestResponse_iris = md_MsgAttestResponse.Fields().ByName("iris") + fd_MsgAttestResponse_timestamp = md_MsgAttestResponse.Fields().ByName("timestamp") +} + +var _ protoreflect.Message = (*fastReflection_MsgAttestResponse)(nil) + +type fastReflection_MsgAttestResponse MsgAttestResponse + +func (x *MsgAttestResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgAttestResponse)(x) +} + +func (x *MsgAttestResponse) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_tx_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgAttestResponse_messageType fastReflection_MsgAttestResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgAttestResponse_messageType{} + +type fastReflection_MsgAttestResponse_messageType struct{} + +func (x fastReflection_MsgAttestResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgAttestResponse)(nil) +} +func (x fastReflection_MsgAttestResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgAttestResponse) +} +func (x fastReflection_MsgAttestResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAttestResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgAttestResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAttestResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgAttestResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgAttestResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgAttestResponse) New() protoreflect.Message { + return new(fastReflection_MsgAttestResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgAttestResponse) Interface() protoreflect.ProtoMessage { + return (*MsgAttestResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgAttestResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Iris) != 0 { + value := protoreflect.ValueOfList(&_MsgAttestResponse_1_list{list: &x.Iris}) + if !f(fd_MsgAttestResponse_iris, value) { + return + } + } + if x.Timestamp != nil { + value := protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) + if !f(fd_MsgAttestResponse_timestamp, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgAttestResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.MsgAttestResponse.iris": + return len(x.Iris) != 0 + case "regen.data.v2.MsgAttestResponse.timestamp": + return x.Timestamp != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgAttestResponse")) + } + panic(fmt.Errorf("message regen.data.v2.MsgAttestResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAttestResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.MsgAttestResponse.iris": + x.Iris = nil + case "regen.data.v2.MsgAttestResponse.timestamp": + x.Timestamp = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgAttestResponse")) + } + panic(fmt.Errorf("message regen.data.v2.MsgAttestResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgAttestResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.MsgAttestResponse.iris": + if len(x.Iris) == 0 { + return protoreflect.ValueOfList(&_MsgAttestResponse_1_list{}) + } + listValue := &_MsgAttestResponse_1_list{list: &x.Iris} + return protoreflect.ValueOfList(listValue) + case "regen.data.v2.MsgAttestResponse.timestamp": + value := x.Timestamp + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgAttestResponse")) + } + panic(fmt.Errorf("message regen.data.v2.MsgAttestResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAttestResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.MsgAttestResponse.iris": + lv := value.List() + clv := lv.(*_MsgAttestResponse_1_list) + x.Iris = *clv.list + case "regen.data.v2.MsgAttestResponse.timestamp": + x.Timestamp = value.Message().Interface().(*timestamppb.Timestamp) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgAttestResponse")) + } + panic(fmt.Errorf("message regen.data.v2.MsgAttestResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAttestResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.MsgAttestResponse.iris": + if x.Iris == nil { + x.Iris = []string{} + } + value := &_MsgAttestResponse_1_list{list: &x.Iris} + return protoreflect.ValueOfList(value) + case "regen.data.v2.MsgAttestResponse.timestamp": + if x.Timestamp == nil { + x.Timestamp = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgAttestResponse")) + } + panic(fmt.Errorf("message regen.data.v2.MsgAttestResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgAttestResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.MsgAttestResponse.iris": + list := []string{} + return protoreflect.ValueOfList(&_MsgAttestResponse_1_list{list: &list}) + case "regen.data.v2.MsgAttestResponse.timestamp": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgAttestResponse")) + } + panic(fmt.Errorf("message regen.data.v2.MsgAttestResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgAttestResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.MsgAttestResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgAttestResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgAttestResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgAttestResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgAttestResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgAttestResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Iris) > 0 { + for _, s := range x.Iris { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Timestamp != nil { + l = options.Size(x.Timestamp) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgAttestResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Timestamp != nil { + encoded, err := options.Marshal(x.Timestamp) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Iris) > 0 { + for iNdEx := len(x.Iris) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Iris[iNdEx]) + copy(dAtA[i:], x.Iris[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Iris[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgAttestResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAttestResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAttestResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Iris", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Iris = append(x.Iris, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Timestamp == nil { + x.Timestamp = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Timestamp); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgDefineResolver protoreflect.MessageDescriptor + fd_MsgDefineResolver_manager protoreflect.FieldDescriptor + fd_MsgDefineResolver_resolver_url protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_tx_proto_init() + md_MsgDefineResolver = File_regen_data_v2_tx_proto.Messages().ByName("MsgDefineResolver") + fd_MsgDefineResolver_manager = md_MsgDefineResolver.Fields().ByName("manager") + fd_MsgDefineResolver_resolver_url = md_MsgDefineResolver.Fields().ByName("resolver_url") +} + +var _ protoreflect.Message = (*fastReflection_MsgDefineResolver)(nil) + +type fastReflection_MsgDefineResolver MsgDefineResolver + +func (x *MsgDefineResolver) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgDefineResolver)(x) +} + +func (x *MsgDefineResolver) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_tx_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgDefineResolver_messageType fastReflection_MsgDefineResolver_messageType +var _ protoreflect.MessageType = fastReflection_MsgDefineResolver_messageType{} + +type fastReflection_MsgDefineResolver_messageType struct{} + +func (x fastReflection_MsgDefineResolver_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgDefineResolver)(nil) +} +func (x fastReflection_MsgDefineResolver_messageType) New() protoreflect.Message { + return new(fastReflection_MsgDefineResolver) +} +func (x fastReflection_MsgDefineResolver_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDefineResolver +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgDefineResolver) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDefineResolver +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgDefineResolver) Type() protoreflect.MessageType { + return _fastReflection_MsgDefineResolver_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgDefineResolver) New() protoreflect.Message { + return new(fastReflection_MsgDefineResolver) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgDefineResolver) Interface() protoreflect.ProtoMessage { + return (*MsgDefineResolver)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgDefineResolver) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Manager != "" { + value := protoreflect.ValueOfString(x.Manager) + if !f(fd_MsgDefineResolver_manager, value) { + return + } + } + if x.ResolverUrl != "" { + value := protoreflect.ValueOfString(x.ResolverUrl) + if !f(fd_MsgDefineResolver_resolver_url, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgDefineResolver) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.MsgDefineResolver.manager": + return x.Manager != "" + case "regen.data.v2.MsgDefineResolver.resolver_url": + return x.ResolverUrl != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgDefineResolver")) + } + panic(fmt.Errorf("message regen.data.v2.MsgDefineResolver does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDefineResolver) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.MsgDefineResolver.manager": + x.Manager = "" + case "regen.data.v2.MsgDefineResolver.resolver_url": + x.ResolverUrl = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgDefineResolver")) + } + panic(fmt.Errorf("message regen.data.v2.MsgDefineResolver does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgDefineResolver) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.MsgDefineResolver.manager": + value := x.Manager + return protoreflect.ValueOfString(value) + case "regen.data.v2.MsgDefineResolver.resolver_url": + value := x.ResolverUrl + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgDefineResolver")) + } + panic(fmt.Errorf("message regen.data.v2.MsgDefineResolver does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDefineResolver) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.MsgDefineResolver.manager": + x.Manager = value.Interface().(string) + case "regen.data.v2.MsgDefineResolver.resolver_url": + x.ResolverUrl = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgDefineResolver")) + } + panic(fmt.Errorf("message regen.data.v2.MsgDefineResolver does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDefineResolver) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.MsgDefineResolver.manager": + panic(fmt.Errorf("field manager of message regen.data.v2.MsgDefineResolver is not mutable")) + case "regen.data.v2.MsgDefineResolver.resolver_url": + panic(fmt.Errorf("field resolver_url of message regen.data.v2.MsgDefineResolver is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgDefineResolver")) + } + panic(fmt.Errorf("message regen.data.v2.MsgDefineResolver does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgDefineResolver) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.MsgDefineResolver.manager": + return protoreflect.ValueOfString("") + case "regen.data.v2.MsgDefineResolver.resolver_url": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgDefineResolver")) + } + panic(fmt.Errorf("message regen.data.v2.MsgDefineResolver does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgDefineResolver) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.MsgDefineResolver", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgDefineResolver) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDefineResolver) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgDefineResolver) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgDefineResolver) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgDefineResolver) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Manager) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ResolverUrl) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgDefineResolver) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ResolverUrl) > 0 { + i -= len(x.ResolverUrl) + copy(dAtA[i:], x.ResolverUrl) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ResolverUrl))) + i-- + dAtA[i] = 0x12 + } + if len(x.Manager) > 0 { + i -= len(x.Manager) + copy(dAtA[i:], x.Manager) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Manager))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgDefineResolver) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDefineResolver: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDefineResolver: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Manager", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Manager = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ResolverUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ResolverUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgDefineResolverResponse protoreflect.MessageDescriptor + fd_MsgDefineResolverResponse_resolver_id protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_tx_proto_init() + md_MsgDefineResolverResponse = File_regen_data_v2_tx_proto.Messages().ByName("MsgDefineResolverResponse") + fd_MsgDefineResolverResponse_resolver_id = md_MsgDefineResolverResponse.Fields().ByName("resolver_id") +} + +var _ protoreflect.Message = (*fastReflection_MsgDefineResolverResponse)(nil) + +type fastReflection_MsgDefineResolverResponse MsgDefineResolverResponse + +func (x *MsgDefineResolverResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgDefineResolverResponse)(x) +} + +func (x *MsgDefineResolverResponse) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_tx_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgDefineResolverResponse_messageType fastReflection_MsgDefineResolverResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgDefineResolverResponse_messageType{} + +type fastReflection_MsgDefineResolverResponse_messageType struct{} + +func (x fastReflection_MsgDefineResolverResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgDefineResolverResponse)(nil) +} +func (x fastReflection_MsgDefineResolverResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgDefineResolverResponse) +} +func (x fastReflection_MsgDefineResolverResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDefineResolverResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgDefineResolverResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgDefineResolverResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgDefineResolverResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgDefineResolverResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgDefineResolverResponse) New() protoreflect.Message { + return new(fastReflection_MsgDefineResolverResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgDefineResolverResponse) Interface() protoreflect.ProtoMessage { + return (*MsgDefineResolverResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgDefineResolverResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ResolverId != uint64(0) { + value := protoreflect.ValueOfUint64(x.ResolverId) + if !f(fd_MsgDefineResolverResponse_resolver_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgDefineResolverResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.MsgDefineResolverResponse.resolver_id": + return x.ResolverId != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgDefineResolverResponse")) + } + panic(fmt.Errorf("message regen.data.v2.MsgDefineResolverResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDefineResolverResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.MsgDefineResolverResponse.resolver_id": + x.ResolverId = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgDefineResolverResponse")) + } + panic(fmt.Errorf("message regen.data.v2.MsgDefineResolverResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgDefineResolverResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.MsgDefineResolverResponse.resolver_id": + value := x.ResolverId + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgDefineResolverResponse")) + } + panic(fmt.Errorf("message regen.data.v2.MsgDefineResolverResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDefineResolverResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.MsgDefineResolverResponse.resolver_id": + x.ResolverId = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgDefineResolverResponse")) + } + panic(fmt.Errorf("message regen.data.v2.MsgDefineResolverResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDefineResolverResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.MsgDefineResolverResponse.resolver_id": + panic(fmt.Errorf("field resolver_id of message regen.data.v2.MsgDefineResolverResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgDefineResolverResponse")) + } + panic(fmt.Errorf("message regen.data.v2.MsgDefineResolverResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgDefineResolverResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.MsgDefineResolverResponse.resolver_id": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgDefineResolverResponse")) + } + panic(fmt.Errorf("message regen.data.v2.MsgDefineResolverResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgDefineResolverResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.MsgDefineResolverResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgDefineResolverResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgDefineResolverResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgDefineResolverResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgDefineResolverResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgDefineResolverResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.ResolverId != 0 { + n += 1 + runtime.Sov(uint64(x.ResolverId)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgDefineResolverResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.ResolverId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ResolverId)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgDefineResolverResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDefineResolverResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDefineResolverResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ResolverId", wireType) + } + x.ResolverId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.ResolverId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgRegisterResolver_3_list)(nil) + +type _MsgRegisterResolver_3_list struct { + list *[]*ContentHash +} + +func (x *_MsgRegisterResolver_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgRegisterResolver_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgRegisterResolver_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ContentHash) + (*x.list)[i] = concreteValue +} + +func (x *_MsgRegisterResolver_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ContentHash) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgRegisterResolver_3_list) AppendMutable() protoreflect.Value { + v := new(ContentHash) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgRegisterResolver_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgRegisterResolver_3_list) NewElement() protoreflect.Value { + v := new(ContentHash) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgRegisterResolver_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgRegisterResolver protoreflect.MessageDescriptor + fd_MsgRegisterResolver_manager protoreflect.FieldDescriptor + fd_MsgRegisterResolver_resolver_id protoreflect.FieldDescriptor + fd_MsgRegisterResolver_content_hashes protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_tx_proto_init() + md_MsgRegisterResolver = File_regen_data_v2_tx_proto.Messages().ByName("MsgRegisterResolver") + fd_MsgRegisterResolver_manager = md_MsgRegisterResolver.Fields().ByName("manager") + fd_MsgRegisterResolver_resolver_id = md_MsgRegisterResolver.Fields().ByName("resolver_id") + fd_MsgRegisterResolver_content_hashes = md_MsgRegisterResolver.Fields().ByName("content_hashes") +} + +var _ protoreflect.Message = (*fastReflection_MsgRegisterResolver)(nil) + +type fastReflection_MsgRegisterResolver MsgRegisterResolver + +func (x *MsgRegisterResolver) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRegisterResolver)(x) +} + +func (x *MsgRegisterResolver) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_tx_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgRegisterResolver_messageType fastReflection_MsgRegisterResolver_messageType +var _ protoreflect.MessageType = fastReflection_MsgRegisterResolver_messageType{} + +type fastReflection_MsgRegisterResolver_messageType struct{} + +func (x fastReflection_MsgRegisterResolver_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRegisterResolver)(nil) +} +func (x fastReflection_MsgRegisterResolver_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRegisterResolver) +} +func (x fastReflection_MsgRegisterResolver_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterResolver +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRegisterResolver) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterResolver +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgRegisterResolver) Type() protoreflect.MessageType { + return _fastReflection_MsgRegisterResolver_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRegisterResolver) New() protoreflect.Message { + return new(fastReflection_MsgRegisterResolver) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRegisterResolver) Interface() protoreflect.ProtoMessage { + return (*MsgRegisterResolver)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgRegisterResolver) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Manager != "" { + value := protoreflect.ValueOfString(x.Manager) + if !f(fd_MsgRegisterResolver_manager, value) { + return + } + } + if x.ResolverId != uint64(0) { + value := protoreflect.ValueOfUint64(x.ResolverId) + if !f(fd_MsgRegisterResolver_resolver_id, value) { + return + } + } + if len(x.ContentHashes) != 0 { + value := protoreflect.ValueOfList(&_MsgRegisterResolver_3_list{list: &x.ContentHashes}) + if !f(fd_MsgRegisterResolver_content_hashes, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgRegisterResolver) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.MsgRegisterResolver.manager": + return x.Manager != "" + case "regen.data.v2.MsgRegisterResolver.resolver_id": + return x.ResolverId != uint64(0) + case "regen.data.v2.MsgRegisterResolver.content_hashes": + return len(x.ContentHashes) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgRegisterResolver")) + } + panic(fmt.Errorf("message regen.data.v2.MsgRegisterResolver does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterResolver) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.MsgRegisterResolver.manager": + x.Manager = "" + case "regen.data.v2.MsgRegisterResolver.resolver_id": + x.ResolverId = uint64(0) + case "regen.data.v2.MsgRegisterResolver.content_hashes": + x.ContentHashes = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgRegisterResolver")) + } + panic(fmt.Errorf("message regen.data.v2.MsgRegisterResolver does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgRegisterResolver) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.MsgRegisterResolver.manager": + value := x.Manager + return protoreflect.ValueOfString(value) + case "regen.data.v2.MsgRegisterResolver.resolver_id": + value := x.ResolverId + return protoreflect.ValueOfUint64(value) + case "regen.data.v2.MsgRegisterResolver.content_hashes": + if len(x.ContentHashes) == 0 { + return protoreflect.ValueOfList(&_MsgRegisterResolver_3_list{}) + } + listValue := &_MsgRegisterResolver_3_list{list: &x.ContentHashes} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgRegisterResolver")) + } + panic(fmt.Errorf("message regen.data.v2.MsgRegisterResolver does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterResolver) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.MsgRegisterResolver.manager": + x.Manager = value.Interface().(string) + case "regen.data.v2.MsgRegisterResolver.resolver_id": + x.ResolverId = value.Uint() + case "regen.data.v2.MsgRegisterResolver.content_hashes": + lv := value.List() + clv := lv.(*_MsgRegisterResolver_3_list) + x.ContentHashes = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgRegisterResolver")) + } + panic(fmt.Errorf("message regen.data.v2.MsgRegisterResolver does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterResolver) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.MsgRegisterResolver.content_hashes": + if x.ContentHashes == nil { + x.ContentHashes = []*ContentHash{} + } + value := &_MsgRegisterResolver_3_list{list: &x.ContentHashes} + return protoreflect.ValueOfList(value) + case "regen.data.v2.MsgRegisterResolver.manager": + panic(fmt.Errorf("field manager of message regen.data.v2.MsgRegisterResolver is not mutable")) + case "regen.data.v2.MsgRegisterResolver.resolver_id": + panic(fmt.Errorf("field resolver_id of message regen.data.v2.MsgRegisterResolver is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgRegisterResolver")) + } + panic(fmt.Errorf("message regen.data.v2.MsgRegisterResolver does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgRegisterResolver) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.MsgRegisterResolver.manager": + return protoreflect.ValueOfString("") + case "regen.data.v2.MsgRegisterResolver.resolver_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "regen.data.v2.MsgRegisterResolver.content_hashes": + list := []*ContentHash{} + return protoreflect.ValueOfList(&_MsgRegisterResolver_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgRegisterResolver")) + } + panic(fmt.Errorf("message regen.data.v2.MsgRegisterResolver does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgRegisterResolver) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.MsgRegisterResolver", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgRegisterResolver) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterResolver) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgRegisterResolver) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgRegisterResolver) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRegisterResolver) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Manager) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ResolverId != 0 { + n += 1 + runtime.Sov(uint64(x.ResolverId)) + } + if len(x.ContentHashes) > 0 { + for _, e := range x.ContentHashes { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgRegisterResolver) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ContentHashes) > 0 { + for iNdEx := len(x.ContentHashes) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ContentHashes[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + } + if x.ResolverId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ResolverId)) + i-- + dAtA[i] = 0x10 + } + if len(x.Manager) > 0 { + i -= len(x.Manager) + copy(dAtA[i:], x.Manager) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Manager))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgRegisterResolver) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterResolver: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterResolver: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Manager", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Manager = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ResolverId", wireType) + } + x.ResolverId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.ResolverId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ContentHashes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ContentHashes = append(x.ContentHashes, &ContentHash{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ContentHashes[len(x.ContentHashes)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgRegisterResolverResponse protoreflect.MessageDescriptor +) + +func init() { + file_regen_data_v2_tx_proto_init() + md_MsgRegisterResolverResponse = File_regen_data_v2_tx_proto.Messages().ByName("MsgRegisterResolverResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgRegisterResolverResponse)(nil) + +type fastReflection_MsgRegisterResolverResponse MsgRegisterResolverResponse + +func (x *MsgRegisterResolverResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRegisterResolverResponse)(x) +} + +func (x *MsgRegisterResolverResponse) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_tx_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgRegisterResolverResponse_messageType fastReflection_MsgRegisterResolverResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgRegisterResolverResponse_messageType{} + +type fastReflection_MsgRegisterResolverResponse_messageType struct{} + +func (x fastReflection_MsgRegisterResolverResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRegisterResolverResponse)(nil) +} +func (x fastReflection_MsgRegisterResolverResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRegisterResolverResponse) +} +func (x fastReflection_MsgRegisterResolverResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterResolverResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRegisterResolverResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterResolverResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgRegisterResolverResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgRegisterResolverResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRegisterResolverResponse) New() protoreflect.Message { + return new(fastReflection_MsgRegisterResolverResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRegisterResolverResponse) Interface() protoreflect.ProtoMessage { + return (*MsgRegisterResolverResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgRegisterResolverResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgRegisterResolverResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgRegisterResolverResponse")) + } + panic(fmt.Errorf("message regen.data.v2.MsgRegisterResolverResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterResolverResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgRegisterResolverResponse")) + } + panic(fmt.Errorf("message regen.data.v2.MsgRegisterResolverResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgRegisterResolverResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgRegisterResolverResponse")) + } + panic(fmt.Errorf("message regen.data.v2.MsgRegisterResolverResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterResolverResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgRegisterResolverResponse")) + } + panic(fmt.Errorf("message regen.data.v2.MsgRegisterResolverResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterResolverResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgRegisterResolverResponse")) + } + panic(fmt.Errorf("message regen.data.v2.MsgRegisterResolverResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgRegisterResolverResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.MsgRegisterResolverResponse")) + } + panic(fmt.Errorf("message regen.data.v2.MsgRegisterResolverResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgRegisterResolverResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.MsgRegisterResolverResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgRegisterResolverResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterResolverResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgRegisterResolverResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgRegisterResolverResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRegisterResolverResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgRegisterResolverResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgRegisterResolverResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterResolverResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterResolverResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: regen/data/v2/tx.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// MsgAnchor is the Msg/Anchor request type. +type MsgAnchor struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // sender is the address of the sender of the transaction. The sender in + // Anchor is not attesting to the veracity of the underlying data. They + // can simply be an intermediary providing services. + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // content_hash is the content hash for the data to anchor. + ContentHash *ContentHash `protobuf:"bytes,2,opt,name=content_hash,json=contentHash,proto3" json:"content_hash,omitempty"` +} + +func (x *MsgAnchor) Reset() { + *x = MsgAnchor{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_tx_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgAnchor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgAnchor) ProtoMessage() {} + +// Deprecated: Use MsgAnchor.ProtoReflect.Descriptor instead. +func (*MsgAnchor) Descriptor() ([]byte, []int) { + return file_regen_data_v2_tx_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgAnchor) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *MsgAnchor) GetContentHash() *ContentHash { + if x != nil { + return x.ContentHash + } + return nil +} + +// MsgAnchor is the Msg/Anchor response type. +type MsgAnchorResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // iri is the IRI of the data that was anchored. + Iri string `protobuf:"bytes,1,opt,name=iri,proto3" json:"iri,omitempty"` + // timestamp is the time at which the data was anchored. + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *MsgAnchorResponse) Reset() { + *x = MsgAnchorResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_tx_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgAnchorResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgAnchorResponse) ProtoMessage() {} + +// Deprecated: Use MsgAnchorResponse.ProtoReflect.Descriptor instead. +func (*MsgAnchorResponse) Descriptor() ([]byte, []int) { + return file_regen_data_v2_tx_proto_rawDescGZIP(), []int{1} +} + +func (x *MsgAnchorResponse) GetIri() string { + if x != nil { + return x.Iri + } + return "" +} + +func (x *MsgAnchorResponse) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// MsgAttest is the Msg/Attest request type. +type MsgAttest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // attestor is the addresses of the account attesting to the veracity of the + // data. By making an Attest request, the attestor is attesting to the + // veracity of the data referenced by the IRI. The precise meaning of this may + // vary depending on the underlying data. + Attestor string `protobuf:"bytes,1,opt,name=attestor,proto3" json:"attestor,omitempty"` + // content_hashes are the content hashes for anchored data. Only RDF graph + // data can be signed as its data model is intended to specifically convey + // semantic meaning. + ContentHashes []*ContentHash_Graph `protobuf:"bytes,2,rep,name=content_hashes,json=contentHashes,proto3" json:"content_hashes,omitempty"` +} + +func (x *MsgAttest) Reset() { + *x = MsgAttest{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgAttest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgAttest) ProtoMessage() {} + +// Deprecated: Use MsgAttest.ProtoReflect.Descriptor instead. +func (*MsgAttest) Descriptor() ([]byte, []int) { + return file_regen_data_v2_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgAttest) GetAttestor() string { + if x != nil { + return x.Attestor + } + return "" +} + +func (x *MsgAttest) GetContentHashes() []*ContentHash_Graph { + if x != nil { + return x.ContentHashes + } + return nil +} + +// MsgAttestResponse is the Msg/Attest response type. +type MsgAttestResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // iris are the IRIs of the data that was attested to. If the attestor attests + // to the same piece of data, the previous attestation will not be updated and + // the IRI will not be included in this list. + Iris []string `protobuf:"bytes,1,rep,name=iris,proto3" json:"iris,omitempty"` + // timestamp is the time at which any new attestations were made. + Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *MsgAttestResponse) Reset() { + *x = MsgAttestResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgAttestResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgAttestResponse) ProtoMessage() {} + +// Deprecated: Use MsgAttestResponse.ProtoReflect.Descriptor instead. +func (*MsgAttestResponse) Descriptor() ([]byte, []int) { + return file_regen_data_v2_tx_proto_rawDescGZIP(), []int{3} +} + +func (x *MsgAttestResponse) GetIris() []string { + if x != nil { + return x.Iris + } + return nil +} + +func (x *MsgAttestResponse) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// MsgDefineResolver is the Msg/DefineResolver request type. +type MsgDefineResolver struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // manager is the address of the resolver manager. The manager is able + // to make future calls using the ID returned by this operation with + // Msg/RegisterResolver. To authorize other accounts to register resolvers, + // the manager should make use of cosmos.authz. + Manager string `protobuf:"bytes,1,opt,name=manager,proto3" json:"manager,omitempty"` + // resolver_url is a resolver URL which should refer to an HTTP service + // which will respond to a GET request with the IRI of a ContentHash + // and return the content if it exists or a 404. For graph data, resolvers + // should use the HTTP Accept header to negotiate the RDF serialization + // format. + ResolverUrl string `protobuf:"bytes,2,opt,name=resolver_url,json=resolverUrl,proto3" json:"resolver_url,omitempty"` +} + +func (x *MsgDefineResolver) Reset() { + *x = MsgDefineResolver{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgDefineResolver) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgDefineResolver) ProtoMessage() {} + +// Deprecated: Use MsgDefineResolver.ProtoReflect.Descriptor instead. +func (*MsgDefineResolver) Descriptor() ([]byte, []int) { + return file_regen_data_v2_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgDefineResolver) GetManager() string { + if x != nil { + return x.Manager + } + return "" +} + +func (x *MsgDefineResolver) GetResolverUrl() string { + if x != nil { + return x.ResolverUrl + } + return "" +} + +// MsgDefineResolverResponse is the Msg/DefineResolver response type. +type MsgDefineResolverResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // resolver_id is the integer ID of the resolver to be used in + // MsgRegisterResolver. + ResolverId uint64 `protobuf:"varint,1,opt,name=resolver_id,json=resolverId,proto3" json:"resolver_id,omitempty"` +} + +func (x *MsgDefineResolverResponse) Reset() { + *x = MsgDefineResolverResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgDefineResolverResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgDefineResolverResponse) ProtoMessage() {} + +// Deprecated: Use MsgDefineResolverResponse.ProtoReflect.Descriptor instead. +func (*MsgDefineResolverResponse) Descriptor() ([]byte, []int) { + return file_regen_data_v2_tx_proto_rawDescGZIP(), []int{5} +} + +func (x *MsgDefineResolverResponse) GetResolverId() uint64 { + if x != nil { + return x.ResolverId + } + return 0 +} + +// MsgRegisterResolver is the Msg/RegisterResolver request type. +type MsgRegisterResolver struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // manager is the address of the resolver manager who registered this + // resolver with Msg/DefinedResolver. + Manager string `protobuf:"bytes,1,opt,name=manager,proto3" json:"manager,omitempty"` + // resolver_id is the ID of a resolver defined with Msg/DefineResolver. + ResolverId uint64 `protobuf:"varint,2,opt,name=resolver_id,json=resolverId,proto3" json:"resolver_id,omitempty"` + // content_hashes is a list of content hashes which the resolver claims to + // serve. + ContentHashes []*ContentHash `protobuf:"bytes,3,rep,name=content_hashes,json=contentHashes,proto3" json:"content_hashes,omitempty"` +} + +func (x *MsgRegisterResolver) Reset() { + *x = MsgRegisterResolver{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRegisterResolver) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRegisterResolver) ProtoMessage() {} + +// Deprecated: Use MsgRegisterResolver.ProtoReflect.Descriptor instead. +func (*MsgRegisterResolver) Descriptor() ([]byte, []int) { + return file_regen_data_v2_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgRegisterResolver) GetManager() string { + if x != nil { + return x.Manager + } + return "" +} + +func (x *MsgRegisterResolver) GetResolverId() uint64 { + if x != nil { + return x.ResolverId + } + return 0 +} + +func (x *MsgRegisterResolver) GetContentHashes() []*ContentHash { + if x != nil { + return x.ContentHashes + } + return nil +} + +// MsgRegisterResolverResponse is the Msg/RegisterResolver response type. +type MsgRegisterResolverResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgRegisterResolverResponse) Reset() { + *x = MsgRegisterResolverResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRegisterResolverResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRegisterResolverResponse) ProtoMessage() {} + +// Deprecated: Use MsgRegisterResolverResponse.ProtoReflect.Descriptor instead. +func (*MsgRegisterResolverResponse) Descriptor() ([]byte, []int) { + return file_regen_data_v2_tx_proto_rawDescGZIP(), []int{7} +} + +var File_regen_data_v2_tx_proto protoreflect.FileDescriptor + +var file_regen_data_v2_tx_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x32, 0x2f, + 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x19, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x32, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6f, 0x0a, 0x09, + 0x4d, 0x73, 0x67, 0x41, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x12, 0x3d, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, + 0x61, 0x73, 0x68, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, + 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x5f, 0x0a, + 0x11, 0x4d, 0x73, 0x67, 0x41, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x69, 0x72, 0x69, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x7f, + 0x0a, 0x09, 0x4d, 0x73, 0x67, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x61, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x12, 0x47, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x2e, 0x47, 0x72, 0x61, 0x70, + 0x68, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, + 0x3a, 0x0d, 0x82, 0xe7, 0xb0, 0x2a, 0x08, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x22, + 0x61, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x72, 0x69, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x04, 0x69, 0x72, 0x69, 0x73, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x22, 0x5e, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x52, + 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x5f, 0x75, 0x72, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, + 0x72, 0x55, 0x72, 0x6c, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x22, 0x3c, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x52, + 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x49, 0x64, + 0x22, 0xa1, 0x01, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x41, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, + 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x72, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x22, 0x1d, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x32, 0xd3, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x44, 0x0a, 0x06, 0x41, + 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x12, 0x18, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x1a, + 0x20, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, + 0x4d, 0x73, 0x67, 0x41, 0x6e, 0x63, 0x68, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x44, 0x0a, 0x06, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x12, 0x18, 0x2e, 0x72, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x73, 0x67, 0x41, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0e, 0x44, 0x65, 0x66, 0x69, 0x6e, + 0x65, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x72, 0x65, 0x67, 0x65, + 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x66, + 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x1a, 0x28, 0x2e, 0x72, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x73, 0x67, 0x44, + 0x65, 0x66, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x72, 0x65, 0x67, 0x65, + 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x1a, 0x2a, 0x2e, + 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x73, + 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xb2, 0x01, 0x0a, 0x11, 0x63, 0x6f, + 0x6d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x42, + 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, + 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, + 0x2f, 0x76, 0x32, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x58, + 0xaa, 0x02, 0x0d, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x32, + 0xca, 0x02, 0x0d, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x5c, 0x56, 0x32, + 0xe2, 0x02, 0x19, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x5c, 0x56, 0x32, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x52, + 0x65, 0x67, 0x65, 0x6e, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_regen_data_v2_tx_proto_rawDescOnce sync.Once + file_regen_data_v2_tx_proto_rawDescData = file_regen_data_v2_tx_proto_rawDesc +) + +func file_regen_data_v2_tx_proto_rawDescGZIP() []byte { + file_regen_data_v2_tx_proto_rawDescOnce.Do(func() { + file_regen_data_v2_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_regen_data_v2_tx_proto_rawDescData) + }) + return file_regen_data_v2_tx_proto_rawDescData +} + +var file_regen_data_v2_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_regen_data_v2_tx_proto_goTypes = []interface{}{ + (*MsgAnchor)(nil), // 0: regen.data.v2.MsgAnchor + (*MsgAnchorResponse)(nil), // 1: regen.data.v2.MsgAnchorResponse + (*MsgAttest)(nil), // 2: regen.data.v2.MsgAttest + (*MsgAttestResponse)(nil), // 3: regen.data.v2.MsgAttestResponse + (*MsgDefineResolver)(nil), // 4: regen.data.v2.MsgDefineResolver + (*MsgDefineResolverResponse)(nil), // 5: regen.data.v2.MsgDefineResolverResponse + (*MsgRegisterResolver)(nil), // 6: regen.data.v2.MsgRegisterResolver + (*MsgRegisterResolverResponse)(nil), // 7: regen.data.v2.MsgRegisterResolverResponse + (*ContentHash)(nil), // 8: regen.data.v2.ContentHash + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp + (*ContentHash_Graph)(nil), // 10: regen.data.v2.ContentHash.Graph +} +var file_regen_data_v2_tx_proto_depIdxs = []int32{ + 8, // 0: regen.data.v2.MsgAnchor.content_hash:type_name -> regen.data.v2.ContentHash + 9, // 1: regen.data.v2.MsgAnchorResponse.timestamp:type_name -> google.protobuf.Timestamp + 10, // 2: regen.data.v2.MsgAttest.content_hashes:type_name -> regen.data.v2.ContentHash.Graph + 9, // 3: regen.data.v2.MsgAttestResponse.timestamp:type_name -> google.protobuf.Timestamp + 8, // 4: regen.data.v2.MsgRegisterResolver.content_hashes:type_name -> regen.data.v2.ContentHash + 0, // 5: regen.data.v2.Msg.Anchor:input_type -> regen.data.v2.MsgAnchor + 2, // 6: regen.data.v2.Msg.Attest:input_type -> regen.data.v2.MsgAttest + 4, // 7: regen.data.v2.Msg.DefineResolver:input_type -> regen.data.v2.MsgDefineResolver + 6, // 8: regen.data.v2.Msg.RegisterResolver:input_type -> regen.data.v2.MsgRegisterResolver + 1, // 9: regen.data.v2.Msg.Anchor:output_type -> regen.data.v2.MsgAnchorResponse + 3, // 10: regen.data.v2.Msg.Attest:output_type -> regen.data.v2.MsgAttestResponse + 5, // 11: regen.data.v2.Msg.DefineResolver:output_type -> regen.data.v2.MsgDefineResolverResponse + 7, // 12: regen.data.v2.Msg.RegisterResolver:output_type -> regen.data.v2.MsgRegisterResolverResponse + 9, // [9:13] is the sub-list for method output_type + 5, // [5:9] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_regen_data_v2_tx_proto_init() } +func file_regen_data_v2_tx_proto_init() { + if File_regen_data_v2_tx_proto != nil { + return + } + file_regen_data_v2_types_proto_init() + if !protoimpl.UnsafeEnabled { + file_regen_data_v2_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgAnchor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgAnchorResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgAttest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgAttestResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgDefineResolver); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgDefineResolverResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRegisterResolver); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRegisterResolverResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_regen_data_v2_tx_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_regen_data_v2_tx_proto_goTypes, + DependencyIndexes: file_regen_data_v2_tx_proto_depIdxs, + MessageInfos: file_regen_data_v2_tx_proto_msgTypes, + }.Build() + File_regen_data_v2_tx_proto = out.File + file_regen_data_v2_tx_proto_rawDesc = nil + file_regen_data_v2_tx_proto_goTypes = nil + file_regen_data_v2_tx_proto_depIdxs = nil +} diff --git a/api/regen/data/v2/tx_grpc.pb.go b/api/regen/data/v2/tx_grpc.pb.go new file mode 100644 index 0000000000..b49fd5c291 --- /dev/null +++ b/api/regen/data/v2/tx_grpc.pb.go @@ -0,0 +1,284 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: regen/data/v2/tx.proto + +package datav2 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Msg_Anchor_FullMethodName = "/regen.data.v2.Msg/Anchor" + Msg_Attest_FullMethodName = "/regen.data.v2.Msg/Attest" + Msg_DefineResolver_FullMethodName = "/regen.data.v2.Msg/DefineResolver" + Msg_RegisterResolver_FullMethodName = "/regen.data.v2.Msg/RegisterResolver" +) + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type MsgClient interface { + // Anchor "anchors" a piece of data to the blockchain based on its secure + // hash, effectively providing a tamper resistant timestamp. + // + // The sender in Anchor is not attesting to the veracity of the underlying + // data. They can simply be an intermediary providing timestamp services. + // Attest should be used to create a digital signature attesting to the + // veracity of some piece of data. + Anchor(ctx context.Context, in *MsgAnchor, opts ...grpc.CallOption) (*MsgAnchorResponse, error) + // Attest allows for digital signing of an arbitrary piece of data on the + // blockchain. By attesting to data, the attestor is making a statement about + // the veracity of the data itself. It is like signing a legal document, + // meaning that I agree to all conditions and to the best of my knowledge + // everything is true. When anchoring data, the sender is not attesting to the + // veracity of the data, they are simply communicating that it exists. + // + // On-chain signatures have the following benefits: + // - on-chain identities can be managed using different cryptographic keys + // that change over time through key rotation practices + // - an on-chain identity may represent an organization and through delegation + // individual members may sign on behalf of the group + // - the blockchain transaction envelope provides built-in replay protection + // and timestamping + // + // Attest implicitly calls Anchor if the data was not already anchored. + // + // Attest can be called multiple times for the same content hash with + // different attestors and those attestors will be appended to the list of + // attestors. If the same attestor attempts to attest to the same piece of + // data, the attestor will be ignored and a new attestation with a new + // timestamp will not be added. + Attest(ctx context.Context, in *MsgAttest, opts ...grpc.CallOption) (*MsgAttestResponse, error) + // DefineResolver defines a resolver URL and assigns it a new integer ID + // that can be used in calls to RegisterResolver. + DefineResolver(ctx context.Context, in *MsgDefineResolver, opts ...grpc.CallOption) (*MsgDefineResolverResponse, error) + // RegisterResolver registers data content hashes + RegisterResolver(ctx context.Context, in *MsgRegisterResolver, opts ...grpc.CallOption) (*MsgRegisterResolverResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) Anchor(ctx context.Context, in *MsgAnchor, opts ...grpc.CallOption) (*MsgAnchorResponse, error) { + out := new(MsgAnchorResponse) + err := c.cc.Invoke(ctx, Msg_Anchor_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) Attest(ctx context.Context, in *MsgAttest, opts ...grpc.CallOption) (*MsgAttestResponse, error) { + out := new(MsgAttestResponse) + err := c.cc.Invoke(ctx, Msg_Attest_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DefineResolver(ctx context.Context, in *MsgDefineResolver, opts ...grpc.CallOption) (*MsgDefineResolverResponse, error) { + out := new(MsgDefineResolverResponse) + err := c.cc.Invoke(ctx, Msg_DefineResolver_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RegisterResolver(ctx context.Context, in *MsgRegisterResolver, opts ...grpc.CallOption) (*MsgRegisterResolverResponse, error) { + out := new(MsgRegisterResolverResponse) + err := c.cc.Invoke(ctx, Msg_RegisterResolver_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +// All implementations must embed UnimplementedMsgServer +// for forward compatibility +type MsgServer interface { + // Anchor "anchors" a piece of data to the blockchain based on its secure + // hash, effectively providing a tamper resistant timestamp. + // + // The sender in Anchor is not attesting to the veracity of the underlying + // data. They can simply be an intermediary providing timestamp services. + // Attest should be used to create a digital signature attesting to the + // veracity of some piece of data. + Anchor(context.Context, *MsgAnchor) (*MsgAnchorResponse, error) + // Attest allows for digital signing of an arbitrary piece of data on the + // blockchain. By attesting to data, the attestor is making a statement about + // the veracity of the data itself. It is like signing a legal document, + // meaning that I agree to all conditions and to the best of my knowledge + // everything is true. When anchoring data, the sender is not attesting to the + // veracity of the data, they are simply communicating that it exists. + // + // On-chain signatures have the following benefits: + // - on-chain identities can be managed using different cryptographic keys + // that change over time through key rotation practices + // - an on-chain identity may represent an organization and through delegation + // individual members may sign on behalf of the group + // - the blockchain transaction envelope provides built-in replay protection + // and timestamping + // + // Attest implicitly calls Anchor if the data was not already anchored. + // + // Attest can be called multiple times for the same content hash with + // different attestors and those attestors will be appended to the list of + // attestors. If the same attestor attempts to attest to the same piece of + // data, the attestor will be ignored and a new attestation with a new + // timestamp will not be added. + Attest(context.Context, *MsgAttest) (*MsgAttestResponse, error) + // DefineResolver defines a resolver URL and assigns it a new integer ID + // that can be used in calls to RegisterResolver. + DefineResolver(context.Context, *MsgDefineResolver) (*MsgDefineResolverResponse, error) + // RegisterResolver registers data content hashes + RegisterResolver(context.Context, *MsgRegisterResolver) (*MsgRegisterResolverResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (UnimplementedMsgServer) Anchor(context.Context, *MsgAnchor) (*MsgAnchorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Anchor not implemented") +} +func (UnimplementedMsgServer) Attest(context.Context, *MsgAttest) (*MsgAttestResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Attest not implemented") +} +func (UnimplementedMsgServer) DefineResolver(context.Context, *MsgDefineResolver) (*MsgDefineResolverResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DefineResolver not implemented") +} +func (UnimplementedMsgServer) RegisterResolver(context.Context, *MsgRegisterResolver) (*MsgRegisterResolverResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterResolver not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} + +// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MsgServer will +// result in compilation errors. +type UnsafeMsgServer interface { + mustEmbedUnimplementedMsgServer() +} + +func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + s.RegisterService(&Msg_ServiceDesc, srv) +} + +func _Msg_Anchor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAnchor) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Anchor(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_Anchor_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Anchor(ctx, req.(*MsgAnchor)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_Attest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAttest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Attest(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_Attest_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Attest(ctx, req.(*MsgAttest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DefineResolver_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDefineResolver) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DefineResolver(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_DefineResolver_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DefineResolver(ctx, req.(*MsgDefineResolver)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_RegisterResolver_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterResolver) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RegisterResolver(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_RegisterResolver_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RegisterResolver(ctx, req.(*MsgRegisterResolver)) + } + return interceptor(ctx, in, info, handler) +} + +// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Msg_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "regen.data.v2.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Anchor", + Handler: _Msg_Anchor_Handler, + }, + { + MethodName: "Attest", + Handler: _Msg_Attest_Handler, + }, + { + MethodName: "DefineResolver", + Handler: _Msg_DefineResolver_Handler, + }, + { + MethodName: "RegisterResolver", + Handler: _Msg_RegisterResolver_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "regen/data/v2/tx.proto", +} diff --git a/api/regen/data/v2/types.pulsar.go b/api/regen/data/v2/types.pulsar.go new file mode 100644 index 0000000000..281d03823a --- /dev/null +++ b/api/regen/data/v2/types.pulsar.go @@ -0,0 +1,2694 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package datav2 + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_ContentHash protoreflect.MessageDescriptor + fd_ContentHash_raw protoreflect.FieldDescriptor + fd_ContentHash_graph protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_types_proto_init() + md_ContentHash = File_regen_data_v2_types_proto.Messages().ByName("ContentHash") + fd_ContentHash_raw = md_ContentHash.Fields().ByName("raw") + fd_ContentHash_graph = md_ContentHash.Fields().ByName("graph") +} + +var _ protoreflect.Message = (*fastReflection_ContentHash)(nil) + +type fastReflection_ContentHash ContentHash + +func (x *ContentHash) ProtoReflect() protoreflect.Message { + return (*fastReflection_ContentHash)(x) +} + +func (x *ContentHash) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_types_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ContentHash_messageType fastReflection_ContentHash_messageType +var _ protoreflect.MessageType = fastReflection_ContentHash_messageType{} + +type fastReflection_ContentHash_messageType struct{} + +func (x fastReflection_ContentHash_messageType) Zero() protoreflect.Message { + return (*fastReflection_ContentHash)(nil) +} +func (x fastReflection_ContentHash_messageType) New() protoreflect.Message { + return new(fastReflection_ContentHash) +} +func (x fastReflection_ContentHash_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ContentHash +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ContentHash) Descriptor() protoreflect.MessageDescriptor { + return md_ContentHash +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ContentHash) Type() protoreflect.MessageType { + return _fastReflection_ContentHash_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ContentHash) New() protoreflect.Message { + return new(fastReflection_ContentHash) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ContentHash) Interface() protoreflect.ProtoMessage { + return (*ContentHash)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ContentHash) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Raw != nil { + value := protoreflect.ValueOfMessage(x.Raw.ProtoReflect()) + if !f(fd_ContentHash_raw, value) { + return + } + } + if x.Graph != nil { + value := protoreflect.ValueOfMessage(x.Graph.ProtoReflect()) + if !f(fd_ContentHash_graph, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ContentHash) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.ContentHash.raw": + return x.Raw != nil + case "regen.data.v2.ContentHash.graph": + return x.Graph != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ContentHash")) + } + panic(fmt.Errorf("message regen.data.v2.ContentHash does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContentHash) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.ContentHash.raw": + x.Raw = nil + case "regen.data.v2.ContentHash.graph": + x.Graph = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ContentHash")) + } + panic(fmt.Errorf("message regen.data.v2.ContentHash does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ContentHash) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.ContentHash.raw": + value := x.Raw + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "regen.data.v2.ContentHash.graph": + value := x.Graph + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ContentHash")) + } + panic(fmt.Errorf("message regen.data.v2.ContentHash does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContentHash) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.ContentHash.raw": + x.Raw = value.Message().Interface().(*ContentHash_Raw) + case "regen.data.v2.ContentHash.graph": + x.Graph = value.Message().Interface().(*ContentHash_Graph) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ContentHash")) + } + panic(fmt.Errorf("message regen.data.v2.ContentHash does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContentHash) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.ContentHash.raw": + if x.Raw == nil { + x.Raw = new(ContentHash_Raw) + } + return protoreflect.ValueOfMessage(x.Raw.ProtoReflect()) + case "regen.data.v2.ContentHash.graph": + if x.Graph == nil { + x.Graph = new(ContentHash_Graph) + } + return protoreflect.ValueOfMessage(x.Graph.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ContentHash")) + } + panic(fmt.Errorf("message regen.data.v2.ContentHash does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ContentHash) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.ContentHash.raw": + m := new(ContentHash_Raw) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "regen.data.v2.ContentHash.graph": + m := new(ContentHash_Graph) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ContentHash")) + } + panic(fmt.Errorf("message regen.data.v2.ContentHash does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ContentHash) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.ContentHash", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ContentHash) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContentHash) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ContentHash) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ContentHash) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ContentHash) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Raw != nil { + l = options.Size(x.Raw) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Graph != nil { + l = options.Size(x.Graph) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ContentHash) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Graph != nil { + encoded, err := options.Marshal(x.Graph) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if x.Raw != nil { + encoded, err := options.Marshal(x.Raw) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ContentHash) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContentHash: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContentHash: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Raw == nil { + x.Raw = &ContentHash_Raw{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Raw); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Graph", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Graph == nil { + x.Graph = &ContentHash_Graph{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Graph); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_ContentHash_Raw protoreflect.MessageDescriptor + fd_ContentHash_Raw_hash protoreflect.FieldDescriptor + fd_ContentHash_Raw_digest_algorithm protoreflect.FieldDescriptor + fd_ContentHash_Raw_file_extension protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_types_proto_init() + md_ContentHash_Raw = File_regen_data_v2_types_proto.Messages().ByName("ContentHash").Messages().ByName("Raw") + fd_ContentHash_Raw_hash = md_ContentHash_Raw.Fields().ByName("hash") + fd_ContentHash_Raw_digest_algorithm = md_ContentHash_Raw.Fields().ByName("digest_algorithm") + fd_ContentHash_Raw_file_extension = md_ContentHash_Raw.Fields().ByName("file_extension") +} + +var _ protoreflect.Message = (*fastReflection_ContentHash_Raw)(nil) + +type fastReflection_ContentHash_Raw ContentHash_Raw + +func (x *ContentHash_Raw) ProtoReflect() protoreflect.Message { + return (*fastReflection_ContentHash_Raw)(x) +} + +func (x *ContentHash_Raw) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_types_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ContentHash_Raw_messageType fastReflection_ContentHash_Raw_messageType +var _ protoreflect.MessageType = fastReflection_ContentHash_Raw_messageType{} + +type fastReflection_ContentHash_Raw_messageType struct{} + +func (x fastReflection_ContentHash_Raw_messageType) Zero() protoreflect.Message { + return (*fastReflection_ContentHash_Raw)(nil) +} +func (x fastReflection_ContentHash_Raw_messageType) New() protoreflect.Message { + return new(fastReflection_ContentHash_Raw) +} +func (x fastReflection_ContentHash_Raw_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ContentHash_Raw +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ContentHash_Raw) Descriptor() protoreflect.MessageDescriptor { + return md_ContentHash_Raw +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ContentHash_Raw) Type() protoreflect.MessageType { + return _fastReflection_ContentHash_Raw_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ContentHash_Raw) New() protoreflect.Message { + return new(fastReflection_ContentHash_Raw) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ContentHash_Raw) Interface() protoreflect.ProtoMessage { + return (*ContentHash_Raw)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ContentHash_Raw) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Hash) != 0 { + value := protoreflect.ValueOfBytes(x.Hash) + if !f(fd_ContentHash_Raw_hash, value) { + return + } + } + if x.DigestAlgorithm != uint32(0) { + value := protoreflect.ValueOfUint32(x.DigestAlgorithm) + if !f(fd_ContentHash_Raw_digest_algorithm, value) { + return + } + } + if x.FileExtension != "" { + value := protoreflect.ValueOfString(x.FileExtension) + if !f(fd_ContentHash_Raw_file_extension, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ContentHash_Raw) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.ContentHash.Raw.hash": + return len(x.Hash) != 0 + case "regen.data.v2.ContentHash.Raw.digest_algorithm": + return x.DigestAlgorithm != uint32(0) + case "regen.data.v2.ContentHash.Raw.file_extension": + return x.FileExtension != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ContentHash.Raw")) + } + panic(fmt.Errorf("message regen.data.v2.ContentHash.Raw does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContentHash_Raw) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.ContentHash.Raw.hash": + x.Hash = nil + case "regen.data.v2.ContentHash.Raw.digest_algorithm": + x.DigestAlgorithm = uint32(0) + case "regen.data.v2.ContentHash.Raw.file_extension": + x.FileExtension = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ContentHash.Raw")) + } + panic(fmt.Errorf("message regen.data.v2.ContentHash.Raw does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ContentHash_Raw) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.ContentHash.Raw.hash": + value := x.Hash + return protoreflect.ValueOfBytes(value) + case "regen.data.v2.ContentHash.Raw.digest_algorithm": + value := x.DigestAlgorithm + return protoreflect.ValueOfUint32(value) + case "regen.data.v2.ContentHash.Raw.file_extension": + value := x.FileExtension + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ContentHash.Raw")) + } + panic(fmt.Errorf("message regen.data.v2.ContentHash.Raw does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContentHash_Raw) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.ContentHash.Raw.hash": + x.Hash = value.Bytes() + case "regen.data.v2.ContentHash.Raw.digest_algorithm": + x.DigestAlgorithm = uint32(value.Uint()) + case "regen.data.v2.ContentHash.Raw.file_extension": + x.FileExtension = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ContentHash.Raw")) + } + panic(fmt.Errorf("message regen.data.v2.ContentHash.Raw does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContentHash_Raw) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.ContentHash.Raw.hash": + panic(fmt.Errorf("field hash of message regen.data.v2.ContentHash.Raw is not mutable")) + case "regen.data.v2.ContentHash.Raw.digest_algorithm": + panic(fmt.Errorf("field digest_algorithm of message regen.data.v2.ContentHash.Raw is not mutable")) + case "regen.data.v2.ContentHash.Raw.file_extension": + panic(fmt.Errorf("field file_extension of message regen.data.v2.ContentHash.Raw is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ContentHash.Raw")) + } + panic(fmt.Errorf("message regen.data.v2.ContentHash.Raw does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ContentHash_Raw) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.ContentHash.Raw.hash": + return protoreflect.ValueOfBytes(nil) + case "regen.data.v2.ContentHash.Raw.digest_algorithm": + return protoreflect.ValueOfUint32(uint32(0)) + case "regen.data.v2.ContentHash.Raw.file_extension": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ContentHash.Raw")) + } + panic(fmt.Errorf("message regen.data.v2.ContentHash.Raw does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ContentHash_Raw) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.ContentHash.Raw", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ContentHash_Raw) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContentHash_Raw) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ContentHash_Raw) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ContentHash_Raw) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ContentHash_Raw) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Hash) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.DigestAlgorithm != 0 { + n += 1 + runtime.Sov(uint64(x.DigestAlgorithm)) + } + l = len(x.FileExtension) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ContentHash_Raw) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.FileExtension) > 0 { + i -= len(x.FileExtension) + copy(dAtA[i:], x.FileExtension) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FileExtension))) + i-- + dAtA[i] = 0x1a + } + if x.DigestAlgorithm != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.DigestAlgorithm)) + i-- + dAtA[i] = 0x10 + } + if len(x.Hash) > 0 { + i -= len(x.Hash) + copy(dAtA[i:], x.Hash) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Hash))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ContentHash_Raw) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContentHash_Raw: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContentHash_Raw: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Hash = append(x.Hash[:0], dAtA[iNdEx:postIndex]...) + if x.Hash == nil { + x.Hash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DigestAlgorithm", wireType) + } + x.DigestAlgorithm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.DigestAlgorithm |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FileExtension", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.FileExtension = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_ContentHash_Graph protoreflect.MessageDescriptor + fd_ContentHash_Graph_hash protoreflect.FieldDescriptor + fd_ContentHash_Graph_digest_algorithm protoreflect.FieldDescriptor + fd_ContentHash_Graph_canonicalization_algorithm protoreflect.FieldDescriptor + fd_ContentHash_Graph_merkle_tree protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_types_proto_init() + md_ContentHash_Graph = File_regen_data_v2_types_proto.Messages().ByName("ContentHash").Messages().ByName("Graph") + fd_ContentHash_Graph_hash = md_ContentHash_Graph.Fields().ByName("hash") + fd_ContentHash_Graph_digest_algorithm = md_ContentHash_Graph.Fields().ByName("digest_algorithm") + fd_ContentHash_Graph_canonicalization_algorithm = md_ContentHash_Graph.Fields().ByName("canonicalization_algorithm") + fd_ContentHash_Graph_merkle_tree = md_ContentHash_Graph.Fields().ByName("merkle_tree") +} + +var _ protoreflect.Message = (*fastReflection_ContentHash_Graph)(nil) + +type fastReflection_ContentHash_Graph ContentHash_Graph + +func (x *ContentHash_Graph) ProtoReflect() protoreflect.Message { + return (*fastReflection_ContentHash_Graph)(x) +} + +func (x *ContentHash_Graph) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_types_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ContentHash_Graph_messageType fastReflection_ContentHash_Graph_messageType +var _ protoreflect.MessageType = fastReflection_ContentHash_Graph_messageType{} + +type fastReflection_ContentHash_Graph_messageType struct{} + +func (x fastReflection_ContentHash_Graph_messageType) Zero() protoreflect.Message { + return (*fastReflection_ContentHash_Graph)(nil) +} +func (x fastReflection_ContentHash_Graph_messageType) New() protoreflect.Message { + return new(fastReflection_ContentHash_Graph) +} +func (x fastReflection_ContentHash_Graph_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ContentHash_Graph +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ContentHash_Graph) Descriptor() protoreflect.MessageDescriptor { + return md_ContentHash_Graph +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ContentHash_Graph) Type() protoreflect.MessageType { + return _fastReflection_ContentHash_Graph_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ContentHash_Graph) New() protoreflect.Message { + return new(fastReflection_ContentHash_Graph) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ContentHash_Graph) Interface() protoreflect.ProtoMessage { + return (*ContentHash_Graph)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ContentHash_Graph) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Hash) != 0 { + value := protoreflect.ValueOfBytes(x.Hash) + if !f(fd_ContentHash_Graph_hash, value) { + return + } + } + if x.DigestAlgorithm != uint32(0) { + value := protoreflect.ValueOfUint32(x.DigestAlgorithm) + if !f(fd_ContentHash_Graph_digest_algorithm, value) { + return + } + } + if x.CanonicalizationAlgorithm != uint32(0) { + value := protoreflect.ValueOfUint32(x.CanonicalizationAlgorithm) + if !f(fd_ContentHash_Graph_canonicalization_algorithm, value) { + return + } + } + if x.MerkleTree != uint32(0) { + value := protoreflect.ValueOfUint32(x.MerkleTree) + if !f(fd_ContentHash_Graph_merkle_tree, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ContentHash_Graph) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.ContentHash.Graph.hash": + return len(x.Hash) != 0 + case "regen.data.v2.ContentHash.Graph.digest_algorithm": + return x.DigestAlgorithm != uint32(0) + case "regen.data.v2.ContentHash.Graph.canonicalization_algorithm": + return x.CanonicalizationAlgorithm != uint32(0) + case "regen.data.v2.ContentHash.Graph.merkle_tree": + return x.MerkleTree != uint32(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ContentHash.Graph")) + } + panic(fmt.Errorf("message regen.data.v2.ContentHash.Graph does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContentHash_Graph) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.ContentHash.Graph.hash": + x.Hash = nil + case "regen.data.v2.ContentHash.Graph.digest_algorithm": + x.DigestAlgorithm = uint32(0) + case "regen.data.v2.ContentHash.Graph.canonicalization_algorithm": + x.CanonicalizationAlgorithm = uint32(0) + case "regen.data.v2.ContentHash.Graph.merkle_tree": + x.MerkleTree = uint32(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ContentHash.Graph")) + } + panic(fmt.Errorf("message regen.data.v2.ContentHash.Graph does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ContentHash_Graph) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.ContentHash.Graph.hash": + value := x.Hash + return protoreflect.ValueOfBytes(value) + case "regen.data.v2.ContentHash.Graph.digest_algorithm": + value := x.DigestAlgorithm + return protoreflect.ValueOfUint32(value) + case "regen.data.v2.ContentHash.Graph.canonicalization_algorithm": + value := x.CanonicalizationAlgorithm + return protoreflect.ValueOfUint32(value) + case "regen.data.v2.ContentHash.Graph.merkle_tree": + value := x.MerkleTree + return protoreflect.ValueOfUint32(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ContentHash.Graph")) + } + panic(fmt.Errorf("message regen.data.v2.ContentHash.Graph does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContentHash_Graph) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.ContentHash.Graph.hash": + x.Hash = value.Bytes() + case "regen.data.v2.ContentHash.Graph.digest_algorithm": + x.DigestAlgorithm = uint32(value.Uint()) + case "regen.data.v2.ContentHash.Graph.canonicalization_algorithm": + x.CanonicalizationAlgorithm = uint32(value.Uint()) + case "regen.data.v2.ContentHash.Graph.merkle_tree": + x.MerkleTree = uint32(value.Uint()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ContentHash.Graph")) + } + panic(fmt.Errorf("message regen.data.v2.ContentHash.Graph does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContentHash_Graph) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.ContentHash.Graph.hash": + panic(fmt.Errorf("field hash of message regen.data.v2.ContentHash.Graph is not mutable")) + case "regen.data.v2.ContentHash.Graph.digest_algorithm": + panic(fmt.Errorf("field digest_algorithm of message regen.data.v2.ContentHash.Graph is not mutable")) + case "regen.data.v2.ContentHash.Graph.canonicalization_algorithm": + panic(fmt.Errorf("field canonicalization_algorithm of message regen.data.v2.ContentHash.Graph is not mutable")) + case "regen.data.v2.ContentHash.Graph.merkle_tree": + panic(fmt.Errorf("field merkle_tree of message regen.data.v2.ContentHash.Graph is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ContentHash.Graph")) + } + panic(fmt.Errorf("message regen.data.v2.ContentHash.Graph does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ContentHash_Graph) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.ContentHash.Graph.hash": + return protoreflect.ValueOfBytes(nil) + case "regen.data.v2.ContentHash.Graph.digest_algorithm": + return protoreflect.ValueOfUint32(uint32(0)) + case "regen.data.v2.ContentHash.Graph.canonicalization_algorithm": + return protoreflect.ValueOfUint32(uint32(0)) + case "regen.data.v2.ContentHash.Graph.merkle_tree": + return protoreflect.ValueOfUint32(uint32(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ContentHash.Graph")) + } + panic(fmt.Errorf("message regen.data.v2.ContentHash.Graph does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ContentHash_Graph) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.ContentHash.Graph", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ContentHash_Graph) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContentHash_Graph) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ContentHash_Graph) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ContentHash_Graph) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ContentHash_Graph) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Hash) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.DigestAlgorithm != 0 { + n += 1 + runtime.Sov(uint64(x.DigestAlgorithm)) + } + if x.CanonicalizationAlgorithm != 0 { + n += 1 + runtime.Sov(uint64(x.CanonicalizationAlgorithm)) + } + if x.MerkleTree != 0 { + n += 1 + runtime.Sov(uint64(x.MerkleTree)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ContentHash_Graph) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.MerkleTree != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.MerkleTree)) + i-- + dAtA[i] = 0x20 + } + if x.CanonicalizationAlgorithm != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.CanonicalizationAlgorithm)) + i-- + dAtA[i] = 0x18 + } + if x.DigestAlgorithm != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.DigestAlgorithm)) + i-- + dAtA[i] = 0x10 + } + if len(x.Hash) > 0 { + i -= len(x.Hash) + copy(dAtA[i:], x.Hash) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Hash))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ContentHash_Graph) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContentHash_Graph: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContentHash_Graph: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Hash = append(x.Hash[:0], dAtA[iNdEx:postIndex]...) + if x.Hash == nil { + x.Hash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DigestAlgorithm", wireType) + } + x.DigestAlgorithm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.DigestAlgorithm |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CanonicalizationAlgorithm", wireType) + } + x.CanonicalizationAlgorithm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.CanonicalizationAlgorithm |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MerkleTree", wireType) + } + x.MerkleTree = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.MerkleTree |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_ContentHashes_1_list)(nil) + +type _ContentHashes_1_list struct { + list *[]*ContentHash +} + +func (x *_ContentHashes_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ContentHashes_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ContentHashes_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ContentHash) + (*x.list)[i] = concreteValue +} + +func (x *_ContentHashes_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ContentHash) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ContentHashes_1_list) AppendMutable() protoreflect.Value { + v := new(ContentHash) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ContentHashes_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ContentHashes_1_list) NewElement() protoreflect.Value { + v := new(ContentHash) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ContentHashes_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ContentHashes protoreflect.MessageDescriptor + fd_ContentHashes_content_hashes protoreflect.FieldDescriptor +) + +func init() { + file_regen_data_v2_types_proto_init() + md_ContentHashes = File_regen_data_v2_types_proto.Messages().ByName("ContentHashes") + fd_ContentHashes_content_hashes = md_ContentHashes.Fields().ByName("content_hashes") +} + +var _ protoreflect.Message = (*fastReflection_ContentHashes)(nil) + +type fastReflection_ContentHashes ContentHashes + +func (x *ContentHashes) ProtoReflect() protoreflect.Message { + return (*fastReflection_ContentHashes)(x) +} + +func (x *ContentHashes) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v2_types_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ContentHashes_messageType fastReflection_ContentHashes_messageType +var _ protoreflect.MessageType = fastReflection_ContentHashes_messageType{} + +type fastReflection_ContentHashes_messageType struct{} + +func (x fastReflection_ContentHashes_messageType) Zero() protoreflect.Message { + return (*fastReflection_ContentHashes)(nil) +} +func (x fastReflection_ContentHashes_messageType) New() protoreflect.Message { + return new(fastReflection_ContentHashes) +} +func (x fastReflection_ContentHashes_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ContentHashes +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ContentHashes) Descriptor() protoreflect.MessageDescriptor { + return md_ContentHashes +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ContentHashes) Type() protoreflect.MessageType { + return _fastReflection_ContentHashes_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ContentHashes) New() protoreflect.Message { + return new(fastReflection_ContentHashes) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ContentHashes) Interface() protoreflect.ProtoMessage { + return (*ContentHashes)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ContentHashes) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.ContentHashes) != 0 { + value := protoreflect.ValueOfList(&_ContentHashes_1_list{list: &x.ContentHashes}) + if !f(fd_ContentHashes_content_hashes, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ContentHashes) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "regen.data.v2.ContentHashes.content_hashes": + return len(x.ContentHashes) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ContentHashes")) + } + panic(fmt.Errorf("message regen.data.v2.ContentHashes does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContentHashes) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "regen.data.v2.ContentHashes.content_hashes": + x.ContentHashes = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ContentHashes")) + } + panic(fmt.Errorf("message regen.data.v2.ContentHashes does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ContentHashes) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "regen.data.v2.ContentHashes.content_hashes": + if len(x.ContentHashes) == 0 { + return protoreflect.ValueOfList(&_ContentHashes_1_list{}) + } + listValue := &_ContentHashes_1_list{list: &x.ContentHashes} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ContentHashes")) + } + panic(fmt.Errorf("message regen.data.v2.ContentHashes does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContentHashes) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "regen.data.v2.ContentHashes.content_hashes": + lv := value.List() + clv := lv.(*_ContentHashes_1_list) + x.ContentHashes = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ContentHashes")) + } + panic(fmt.Errorf("message regen.data.v2.ContentHashes does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContentHashes) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.ContentHashes.content_hashes": + if x.ContentHashes == nil { + x.ContentHashes = []*ContentHash{} + } + value := &_ContentHashes_1_list{list: &x.ContentHashes} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ContentHashes")) + } + panic(fmt.Errorf("message regen.data.v2.ContentHashes does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ContentHashes) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "regen.data.v2.ContentHashes.content_hashes": + list := []*ContentHash{} + return protoreflect.ValueOfList(&_ContentHashes_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v2.ContentHashes")) + } + panic(fmt.Errorf("message regen.data.v2.ContentHashes does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ContentHashes) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in regen.data.v2.ContentHashes", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ContentHashes) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ContentHashes) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ContentHashes) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ContentHashes) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ContentHashes) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.ContentHashes) > 0 { + for _, e := range x.ContentHashes { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ContentHashes) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.ContentHashes) > 0 { + for iNdEx := len(x.ContentHashes) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ContentHashes[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ContentHashes) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContentHashes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContentHashes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ContentHashes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ContentHashes = append(x.ContentHashes, &ContentHash{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ContentHashes[len(x.ContentHashes)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: regen/data/v2/types.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// DigestAlgorithm is the hash digest algorithm +// +// With v2, this enum is no longer validated on-chain. +// However, this enum SHOULD still be used and updated as a registry of known digest +// algorithms and all implementations should coordinate on these values. +type DigestAlgorithm int32 + +const ( + // unspecified and invalid + DigestAlgorithm_DIGEST_ALGORITHM_UNSPECIFIED DigestAlgorithm = 0 + // BLAKE2b-256 + DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256 DigestAlgorithm = 1 +) + +// Enum value maps for DigestAlgorithm. +var ( + DigestAlgorithm_name = map[int32]string{ + 0: "DIGEST_ALGORITHM_UNSPECIFIED", + 1: "DIGEST_ALGORITHM_BLAKE2B_256", + } + DigestAlgorithm_value = map[string]int32{ + "DIGEST_ALGORITHM_UNSPECIFIED": 0, + "DIGEST_ALGORITHM_BLAKE2B_256": 1, + } +) + +func (x DigestAlgorithm) Enum() *DigestAlgorithm { + p := new(DigestAlgorithm) + *p = x + return p +} + +func (x DigestAlgorithm) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DigestAlgorithm) Descriptor() protoreflect.EnumDescriptor { + return file_regen_data_v2_types_proto_enumTypes[0].Descriptor() +} + +func (DigestAlgorithm) Type() protoreflect.EnumType { + return &file_regen_data_v2_types_proto_enumTypes[0] +} + +func (x DigestAlgorithm) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DigestAlgorithm.Descriptor instead. +func (DigestAlgorithm) EnumDescriptor() ([]byte, []int) { + return file_regen_data_v2_types_proto_rawDescGZIP(), []int{0} +} + +// GraphCanonicalizationAlgorithm is the graph canonicalization algorithm +// +// With v2, this enum is no longer validated on-chain. +// However, this enum SHOULD still be used and updated as a registry of known canonicalization +// algorithms and all implementations should coordinate on these values. +type GraphCanonicalizationAlgorithm int32 + +const ( + // unspecified and invalid + GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_UNSPECIFIED GraphCanonicalizationAlgorithm = 0 + // RDFC 1.0 graph canonicalization algorithm. Essentially the same as URDNA2015 with some + // small clarifications around escaping of escape characters. + GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0 GraphCanonicalizationAlgorithm = 1 +) + +// Enum value maps for GraphCanonicalizationAlgorithm. +var ( + GraphCanonicalizationAlgorithm_name = map[int32]string{ + 0: "GRAPH_CANONICALIZATION_ALGORITHM_UNSPECIFIED", + 1: "GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0", + } + GraphCanonicalizationAlgorithm_value = map[string]int32{ + "GRAPH_CANONICALIZATION_ALGORITHM_UNSPECIFIED": 0, + "GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0": 1, + } +) + +func (x GraphCanonicalizationAlgorithm) Enum() *GraphCanonicalizationAlgorithm { + p := new(GraphCanonicalizationAlgorithm) + *p = x + return p +} + +func (x GraphCanonicalizationAlgorithm) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GraphCanonicalizationAlgorithm) Descriptor() protoreflect.EnumDescriptor { + return file_regen_data_v2_types_proto_enumTypes[1].Descriptor() +} + +func (GraphCanonicalizationAlgorithm) Type() protoreflect.EnumType { + return &file_regen_data_v2_types_proto_enumTypes[1] +} + +func (x GraphCanonicalizationAlgorithm) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GraphCanonicalizationAlgorithm.Descriptor instead. +func (GraphCanonicalizationAlgorithm) EnumDescriptor() ([]byte, []int) { + return file_regen_data_v2_types_proto_rawDescGZIP(), []int{1} +} + +// GraphMerkleTree is the graph merkle tree type used for hashing, if any. +// +// With v2, this enum is no longer validated on-chain. +// However, this enum SHOULD still be used and updated as a registry of known merkle tree +// types and all implementations should coordinate on these values. +type GraphMerkleTree int32 + +const ( + // unspecified and valid + GraphMerkleTree_GRAPH_MERKLE_TREE_NONE_UNSPECIFIED GraphMerkleTree = 0 +) + +// Enum value maps for GraphMerkleTree. +var ( + GraphMerkleTree_name = map[int32]string{ + 0: "GRAPH_MERKLE_TREE_NONE_UNSPECIFIED", + } + GraphMerkleTree_value = map[string]int32{ + "GRAPH_MERKLE_TREE_NONE_UNSPECIFIED": 0, + } +) + +func (x GraphMerkleTree) Enum() *GraphMerkleTree { + p := new(GraphMerkleTree) + *p = x + return p +} + +func (x GraphMerkleTree) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GraphMerkleTree) Descriptor() protoreflect.EnumDescriptor { + return file_regen_data_v2_types_proto_enumTypes[2].Descriptor() +} + +func (GraphMerkleTree) Type() protoreflect.EnumType { + return &file_regen_data_v2_types_proto_enumTypes[2] +} + +func (x GraphMerkleTree) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GraphMerkleTree.Descriptor instead. +func (GraphMerkleTree) EnumDescriptor() ([]byte, []int) { + return file_regen_data_v2_types_proto_rawDescGZIP(), []int{2} +} + +// ContentHash specifies a hash-based content identifier for a piece of data. +// Exactly one of its fields must be set so this message behaves like a oneof. +// A protobuf oneof was not used because this caused compatibility issues with +// amino signing. +type ContentHash struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // raw specifies "raw" data which does not specify a deterministic, canonical + // encoding. Users of these hashes MUST maintain a copy of the hashed data + // which is preserved bit by bit. All other content encodings specify a + // deterministic, canonical encoding allowing implementations to choose from a + // variety of alternative formats for transport and encoding while maintaining + // the guarantee that the canonical hash will not change. The media type for + // "raw" data is defined by the MediaType enum. + Raw *ContentHash_Raw `protobuf:"bytes,1,opt,name=raw,proto3" json:"raw,omitempty"` + // graph specifies graph data that conforms to the RDF data model. + // The canonicalization algorithm used for an RDF graph is specified by + // GraphCanonicalizationAlgorithm. + Graph *ContentHash_Graph `protobuf:"bytes,2,opt,name=graph,proto3" json:"graph,omitempty"` +} + +func (x *ContentHash) Reset() { + *x = ContentHash{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContentHash) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContentHash) ProtoMessage() {} + +// Deprecated: Use ContentHash.ProtoReflect.Descriptor instead. +func (*ContentHash) Descriptor() ([]byte, []int) { + return file_regen_data_v2_types_proto_rawDescGZIP(), []int{0} +} + +func (x *ContentHash) GetRaw() *ContentHash_Raw { + if x != nil { + return x.Raw + } + return nil +} + +func (x *ContentHash) GetGraph() *ContentHash_Graph { + if x != nil { + return x.Graph + } + return nil +} + +// ContentHashes contains list of content ContentHash. +type ContentHashes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // data is a list of content hashes which the resolver claims to serve. + ContentHashes []*ContentHash `protobuf:"bytes,1,rep,name=content_hashes,json=contentHashes,proto3" json:"content_hashes,omitempty"` +} + +func (x *ContentHashes) Reset() { + *x = ContentHashes{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContentHashes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContentHashes) ProtoMessage() {} + +// Deprecated: Use ContentHashes.ProtoReflect.Descriptor instead. +func (*ContentHashes) Descriptor() ([]byte, []int) { + return file_regen_data_v2_types_proto_rawDescGZIP(), []int{1} +} + +func (x *ContentHashes) GetContentHashes() []*ContentHash { + if x != nil { + return x.ContentHashes + } + return nil +} + +// RawVis the content hash type used for raw data. +type ContentHash_Raw struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // hash represents the hash of the data based on the specified + // digest_algorithm. It must be at least 20 bytes long and at most 64 bytes long. + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + // digest_algorithm represents the hash digest algorithm and should be a non-zero value from the DigestAlgorithm enum. + DigestAlgorithm uint32 `protobuf:"varint,2,opt,name=digest_algorithm,json=digestAlgorithm,proto3" json:"digest_algorithm,omitempty"` + // file_extension represents the file extension for raw data. It can be + // must be between 2-6 characters long, must be all lower-case and should represent + // the canonical extension for the media type. + // + // A list of canonical extensions which should be used is provided here + // and SHOULD be used by implementations: txt, json, csv, xml, pdf, tiff, + // jpg, png, svg, webp, avif, gif, apng, mpeg, mp4, webm, ogg, heic, raw. + // + // The above list should be updated as new media types come into common usage + // especially when there are two or more possible extensions (i.e. jpg vs jpeg or tif vs tiff). + FileExtension string `protobuf:"bytes,3,opt,name=file_extension,json=fileExtension,proto3" json:"file_extension,omitempty"` +} + +func (x *ContentHash_Raw) Reset() { + *x = ContentHash_Raw{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContentHash_Raw) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContentHash_Raw) ProtoMessage() {} + +// Deprecated: Use ContentHash_Raw.ProtoReflect.Descriptor instead. +func (*ContentHash_Raw) Descriptor() ([]byte, []int) { + return file_regen_data_v2_types_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *ContentHash_Raw) GetHash() []byte { + if x != nil { + return x.Hash + } + return nil +} + +func (x *ContentHash_Raw) GetDigestAlgorithm() uint32 { + if x != nil { + return x.DigestAlgorithm + } + return 0 +} + +func (x *ContentHash_Raw) GetFileExtension() string { + if x != nil { + return x.FileExtension + } + return "" +} + +// Graph is the content hash type used for RDF graph data. +type ContentHash_Graph struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // hash represents the hash of the data based on the specified + // digest_algorithm. It must be at least 20 bytes long and at most 64 bytes long. + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + // digest_algorithm represents the hash digest algorithm and should be a non-zero value from the DigestAlgorithm enum. + DigestAlgorithm uint32 `protobuf:"varint,2,opt,name=digest_algorithm,json=digestAlgorithm,proto3" json:"digest_algorithm,omitempty"` + // graph_canonicalization_algorithm represents the RDF graph + // canonicalization algorithm and should be a non-zero value from the GraphCanonicalizationAlgorithm enum. + CanonicalizationAlgorithm uint32 `protobuf:"varint,3,opt,name=canonicalization_algorithm,json=canonicalizationAlgorithm,proto3" json:"canonicalization_algorithm,omitempty"` + // merkle_tree is the merkle tree type used for the graph hash, if any and should be a value from the GraphMerkleTree enum + // or left unspecified. + MerkleTree uint32 `protobuf:"varint,4,opt,name=merkle_tree,json=merkleTree,proto3" json:"merkle_tree,omitempty"` +} + +func (x *ContentHash_Graph) Reset() { + *x = ContentHash_Graph{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_data_v2_types_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContentHash_Graph) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContentHash_Graph) ProtoMessage() {} + +// Deprecated: Use ContentHash_Graph.ProtoReflect.Descriptor instead. +func (*ContentHash_Graph) Descriptor() ([]byte, []int) { + return file_regen_data_v2_types_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *ContentHash_Graph) GetHash() []byte { + if x != nil { + return x.Hash + } + return nil +} + +func (x *ContentHash_Graph) GetDigestAlgorithm() uint32 { + if x != nil { + return x.DigestAlgorithm + } + return 0 +} + +func (x *ContentHash_Graph) GetCanonicalizationAlgorithm() uint32 { + if x != nil { + return x.CanonicalizationAlgorithm + } + return 0 +} + +func (x *ContentHash_Graph) GetMerkleTree() uint32 { + if x != nil { + return x.MerkleTree + } + return 0 +} + +var File_regen_data_v2_types_proto protoreflect.FileDescriptor + +var file_regen_data_v2_types_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x32, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x72, 0x65, 0x67, + 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x22, 0x8d, 0x03, 0x0a, 0x0b, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x30, 0x0a, 0x03, 0x72, 0x61, + 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, + 0x61, 0x73, 0x68, 0x2e, 0x52, 0x61, 0x77, 0x52, 0x03, 0x72, 0x61, 0x77, 0x12, 0x36, 0x0a, 0x05, + 0x67, 0x72, 0x61, 0x70, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x05, 0x67, + 0x72, 0x61, 0x70, 0x68, 0x1a, 0x6b, 0x0a, 0x03, 0x52, 0x61, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, + 0x29, 0x0a, 0x10, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, + 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x64, 0x69, 0x67, 0x65, 0x73, + 0x74, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x69, + 0x6c, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x1a, 0xa6, 0x01, 0x0a, 0x05, 0x47, 0x72, 0x61, 0x70, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, + 0x29, 0x0a, 0x10, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, + 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x64, 0x69, 0x67, 0x65, 0x73, + 0x74, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x3d, 0x0a, 0x1a, 0x63, 0x61, + 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, + 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x19, + 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x65, 0x72, + 0x6b, 0x6c, 0x65, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, + 0x6d, 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x54, 0x72, 0x65, 0x65, 0x22, 0x52, 0x0a, 0x0d, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0e, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x52, + 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x2a, 0x55, + 0x0a, 0x0f, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, + 0x6d, 0x12, 0x20, 0x0a, 0x1c, 0x44, 0x49, 0x47, 0x45, 0x53, 0x54, 0x5f, 0x41, 0x4c, 0x47, 0x4f, + 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1c, 0x44, 0x49, 0x47, 0x45, 0x53, 0x54, 0x5f, 0x41, 0x4c, + 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x42, 0x4c, 0x41, 0x4b, 0x45, 0x32, 0x42, 0x5f, + 0x32, 0x35, 0x36, 0x10, 0x01, 0x2a, 0x81, 0x01, 0x0a, 0x1e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x43, + 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, + 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x30, 0x0a, 0x2c, 0x47, 0x52, 0x41, 0x50, + 0x48, 0x5f, 0x43, 0x41, 0x4e, 0x4f, 0x4e, 0x49, 0x43, 0x41, 0x4c, 0x49, 0x5a, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2d, 0x0a, 0x29, 0x47, 0x52, + 0x41, 0x50, 0x48, 0x5f, 0x43, 0x41, 0x4e, 0x4f, 0x4e, 0x49, 0x43, 0x41, 0x4c, 0x49, 0x5a, 0x41, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x52, + 0x44, 0x46, 0x43, 0x5f, 0x31, 0x5f, 0x30, 0x10, 0x01, 0x2a, 0x39, 0x0a, 0x0f, 0x47, 0x72, 0x61, + 0x70, 0x68, 0x4d, 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x54, 0x72, 0x65, 0x65, 0x12, 0x26, 0x0a, 0x22, + 0x47, 0x52, 0x41, 0x50, 0x48, 0x5f, 0x4d, 0x45, 0x52, 0x4b, 0x4c, 0x45, 0x5f, 0x54, 0x52, 0x45, + 0x45, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x42, 0xb5, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x65, 0x67, + 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, + 0x32, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x58, 0xaa, 0x02, + 0x0d, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x32, 0xca, 0x02, + 0x0d, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x5c, 0x56, 0x32, 0xe2, 0x02, + 0x19, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x5c, 0x56, 0x32, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x52, 0x65, 0x67, + 0x65, 0x6e, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_regen_data_v2_types_proto_rawDescOnce sync.Once + file_regen_data_v2_types_proto_rawDescData = file_regen_data_v2_types_proto_rawDesc +) + +func file_regen_data_v2_types_proto_rawDescGZIP() []byte { + file_regen_data_v2_types_proto_rawDescOnce.Do(func() { + file_regen_data_v2_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_regen_data_v2_types_proto_rawDescData) + }) + return file_regen_data_v2_types_proto_rawDescData +} + +var file_regen_data_v2_types_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_regen_data_v2_types_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_regen_data_v2_types_proto_goTypes = []interface{}{ + (DigestAlgorithm)(0), // 0: regen.data.v2.DigestAlgorithm + (GraphCanonicalizationAlgorithm)(0), // 1: regen.data.v2.GraphCanonicalizationAlgorithm + (GraphMerkleTree)(0), // 2: regen.data.v2.GraphMerkleTree + (*ContentHash)(nil), // 3: regen.data.v2.ContentHash + (*ContentHashes)(nil), // 4: regen.data.v2.ContentHashes + (*ContentHash_Raw)(nil), // 5: regen.data.v2.ContentHash.Raw + (*ContentHash_Graph)(nil), // 6: regen.data.v2.ContentHash.Graph +} +var file_regen_data_v2_types_proto_depIdxs = []int32{ + 5, // 0: regen.data.v2.ContentHash.raw:type_name -> regen.data.v2.ContentHash.Raw + 6, // 1: regen.data.v2.ContentHash.graph:type_name -> regen.data.v2.ContentHash.Graph + 3, // 2: regen.data.v2.ContentHashes.content_hashes:type_name -> regen.data.v2.ContentHash + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_regen_data_v2_types_proto_init() } +func file_regen_data_v2_types_proto_init() { + if File_regen_data_v2_types_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_regen_data_v2_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContentHash); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContentHashes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContentHash_Raw); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_data_v2_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContentHash_Graph); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_regen_data_v2_types_proto_rawDesc, + NumEnums: 3, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_regen_data_v2_types_proto_goTypes, + DependencyIndexes: file_regen_data_v2_types_proto_depIdxs, + EnumInfos: file_regen_data_v2_types_proto_enumTypes, + MessageInfos: file_regen_data_v2_types_proto_msgTypes, + }.Build() + File_regen_data_v2_types_proto = out.File + file_regen_data_v2_types_proto_rawDesc = nil + file_regen_data_v2_types_proto_goTypes = nil + file_regen_data_v2_types_proto_depIdxs = nil +} diff --git a/app/app.go b/app/app.go index 269acc42d1..3b9c3c2fbe 100644 --- a/app/app.go +++ b/app/app.go @@ -115,8 +115,8 @@ import ( regenupgrades "github.com/regen-network/regen-ledger/v5/app/upgrades" "github.com/regen-network/regen-ledger/v5/app/upgrades/v5_0" "github.com/regen-network/regen-ledger/v5/app/upgrades/v5_1" - "github.com/regen-network/regen-ledger/x/data/v2" - datamodule "github.com/regen-network/regen-ledger/x/data/v2/module" + "github.com/regen-network/regen-ledger/x/data/v3" + datamodule "github.com/regen-network/regen-ledger/x/data/v3/module" "github.com/regen-network/regen-ledger/x/ecocredit/v3" baskettypes "github.com/regen-network/regen-ledger/x/ecocredit/v3/basket" ecocreditmodule "github.com/regen-network/regen-ledger/x/ecocredit/v3/module" diff --git a/app/simulation/app_import_export_test.go b/app/simulation/app_import_export_test.go index 688ce0e1ba..1a3a4efa07 100644 --- a/app/simulation/app_import_export_test.go +++ b/app/simulation/app_import_export_test.go @@ -32,7 +32,7 @@ import ( ibchost "github.com/cosmos/ibc-go/v5/modules/core/24-host" regen "github.com/regen-network/regen-ledger/v5/app" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" "github.com/regen-network/regen-ledger/x/ecocredit/v3" ) diff --git a/app/testsuite/modules_test.go b/app/testsuite/modules_test.go index 95fc318855..6621197bd4 100644 --- a/app/testsuite/modules_test.go +++ b/app/testsuite/modules_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/suite" - data "github.com/regen-network/regen-ledger/x/data/v2/client/testsuite" + data "github.com/regen-network/regen-ledger/x/data/v3/client/testsuite" ecocredit "github.com/regen-network/regen-ledger/x/ecocredit/v3/client/testsuite" ) diff --git a/app/upgrades/v5_0/upgrade.go b/app/upgrades/v5_0/upgrade.go index 479a446b35..8a1d14938c 100644 --- a/app/upgrades/v5_0/upgrade.go +++ b/app/upgrades/v5_0/upgrade.go @@ -15,7 +15,7 @@ import ( ibcfeetypes "github.com/cosmos/ibc-go/v5/modules/apps/29-fee/types" "github.com/regen-network/regen-ledger/v5/app/upgrades" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" "github.com/regen-network/regen-ledger/x/ecocredit/v3" ) diff --git a/go.mod b/go.mod index a3c8e7b476..bf065a8658 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/gorilla/mux v1.8.0 github.com/rakyll/statik v0.1.7 github.com/regen-network/regen-ledger/types/v2 v2.0.0 - github.com/regen-network/regen-ledger/x/data/v2 v2.0.0 + github.com/regen-network/regen-ledger/x/data/v3 v3.0.0 github.com/regen-network/regen-ledger/x/ecocredit/v3 v3.0.0 github.com/regen-network/regen-ledger/x/intertx v1.0.0 github.com/rs/zerolog v1.31.0 @@ -180,7 +180,7 @@ replace github.com/regen-network/regen-ledger/api/v2 => ./api replace github.com/regen-network/regen-ledger/types/v2 => ./types -replace github.com/regen-network/regen-ledger/x/data/v2 => ./x/data +replace github.com/regen-network/regen-ledger/x/data/v3 => ./x/data replace github.com/regen-network/regen-ledger/x/ecocredit/v3 => ./x/ecocredit diff --git a/proto/regen/data/v1/doc.proto b/proto/regen/data/v1/doc.proto index 19c84758f1..6b2c181cfe 100644 --- a/proto/regen/data/v1/doc.proto +++ b/proto/regen/data/v1/doc.proto @@ -6,8 +6,6 @@ syntax = "proto3"; // relation to tagged releases in regen-network/regen-ledger: // // - Revision 0: v4.0.0 (api/v1.0.0, x/data/v1.0.0) -// - Revision 1: (in progress) +// - Revision 1: v5.0.0 (api/v2.0.0, x/data/v2.0.0) // package regen.data.v1; - -option go_package = "github.com/regen-network/regen-ledger/x/data"; diff --git a/proto/regen/data/v1/events.proto b/proto/regen/data/v1/events.proto index 45d8fefb4c..083158f95c 100644 --- a/proto/regen/data/v1/events.proto +++ b/proto/regen/data/v1/events.proto @@ -2,8 +2,6 @@ syntax = "proto3"; package regen.data.v1; -option go_package = "github.com/regen-network/regen-ledger/x/data"; - // EventAnchor is an event emitted when data is anchored on chain. message EventAnchor { diff --git a/proto/regen/data/v1/query.proto b/proto/regen/data/v1/query.proto index 3fcc2bd433..b351e217a7 100644 --- a/proto/regen/data/v1/query.proto +++ b/proto/regen/data/v1/query.proto @@ -7,8 +7,6 @@ import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; import "regen/data/v1/types.proto"; -option go_package = "github.com/regen-network/regen-ledger/x/data"; - // Query is the regen.data.v1 Query service service Query { diff --git a/proto/regen/data/v1/state.proto b/proto/regen/data/v1/state.proto index dd641a4b6d..1501866d99 100644 --- a/proto/regen/data/v1/state.proto +++ b/proto/regen/data/v1/state.proto @@ -5,8 +5,6 @@ package regen.data.v1; import "cosmos/orm/v1/orm.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "github.com/regen-network/regen-ledger/x/data"; - // DataID stores a compact data ID and its full IRI. message DataID { option (cosmos.orm.v1.table) = { diff --git a/proto/regen/data/v1/tx.proto b/proto/regen/data/v1/tx.proto index 88334638dd..6ca096ae1e 100644 --- a/proto/regen/data/v1/tx.proto +++ b/proto/regen/data/v1/tx.proto @@ -6,8 +6,6 @@ import "cosmos/msg/v1/msg.proto"; import "google/protobuf/timestamp.proto"; import "regen/data/v1/types.proto"; -option go_package = "github.com/regen-network/regen-ledger/x/data"; - // Msg is the regen.data.v1 Msg service service Msg { diff --git a/proto/regen/data/v1/types.proto b/proto/regen/data/v1/types.proto index ba2549f5a2..22606f7af8 100644 --- a/proto/regen/data/v1/types.proto +++ b/proto/regen/data/v1/types.proto @@ -2,12 +2,7 @@ syntax = "proto3"; package regen.data.v1; -option go_package = "github.com/regen-network/regen-ledger/x/data"; - // ContentHash specifies a hash-based content identifier for a piece of data. -// Exactly one of its fields must be set so this message behaves like a oneof. -// A protobuf oneof was not used because this caused compatibility issues with -// amino signing. message ContentHash { // Deprecated: use RawV2 instead. // Raw specifies "raw" data which does not specify a deterministic, canonical @@ -72,14 +67,14 @@ message ContentHash { // RawV2 is the content hash type used for raw data. message RawV2 { // hash represents the hash of the data based on the specified - // digest_algorithm. It must be at least 20 bytes long and at most 64 bytes long. + // digest_algorithm. bytes hash = 1; - // digest_algorithm represents the hash digest algorithm and should be a non-zero value from the DigestAlgorithm enum. + // digest_algorithm represents the hash digest algorithm. uint32 digest_algorithm = 2; // file_extension represents the file extension for raw data. It can be - // must be between 2-6 characters long, must be all lower-case and should represent + // up to six characters long, must be all lower-case and should represent // the canonical extension for the media type. // // A list of canonical extensions which should be used is provided here @@ -94,14 +89,14 @@ message ContentHash { // GraphV2 is the content hash type used for RDF graph data. message GraphV2 { // hash represents the hash of the data based on the specified - // digest_algorithm. It must be at least 20 bytes long and at most 64 bytes long. + // digest_algorithm. bytes hash = 1; - // digest_algorithm represents the hash digest algorithm and should be a non-zero value from the DigestAlgorithm enum. + // digest_algorithm represents the hash digest algorithm and should be a value from the DigestAlgorithm enum. uint32 digest_algorithm = 2; // graph_canonicalization_algorithm represents the RDF graph - // canonicalization algorithm and should be a non-zero value from the GraphCanonicalizationAlgorithm enum. + // canonicalization algorithm and should be a value from the GraphCanonicalizationAlgorithm enum. uint32 canonicalization_algorithm = 3; // merkle_tree is the merkle tree type used for the graph hash, if any and should be a value from the GraphMerkleTree enum @@ -111,10 +106,6 @@ message ContentHash { } // DigestAlgorithm is the hash digest algorithm -// -// With V2 of raw and graph hash, this enum is no longer validated on-chain. -// However, this enum SHOULD still be used and updated as a registry of known digest -// algorithms and all implementations should coordinate on these values. enum DigestAlgorithm { // unspecified and invalid DIGEST_ALGORITHM_UNSPECIFIED = 0; @@ -188,10 +179,6 @@ enum RawMediaType { } // GraphCanonicalizationAlgorithm is the graph canonicalization algorithm -// -// With V2 of the graph hash, this enum is no longer validated on-chain. -// However, this enum SHOULD still be used and updated as a registry of known canonicalization -// algorithms and all implementations should coordinate on these values. enum GraphCanonicalizationAlgorithm { // unspecified and invalid GRAPH_CANONICALIZATION_ALGORITHM_UNSPECIFIED = 0; @@ -200,11 +187,7 @@ enum GraphCanonicalizationAlgorithm { GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015 = 1; } -// GraphMerkleTree is the graph merkle tree type used for hashing, if any. -// -// With V2 of the graph hash, this enum is no longer validated on-chain. -// However, this enum SHOULD still be used and updated as a registry of known merkle tree -// types and all implementations should coordinate on these values. +// GraphMerkleTree is the graph merkle tree type used for hashing, if any enum GraphMerkleTree { // unspecified and valid GRAPH_MERKLE_TREE_NONE_UNSPECIFIED = 0; diff --git a/proto/regen/data/v2/doc.proto b/proto/regen/data/v2/doc.proto new file mode 100644 index 0000000000..9aee2c5c0d --- /dev/null +++ b/proto/regen/data/v2/doc.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +// regen.data.v2 describes the API for the data module. +// +// The following outlines revisions and tagged versions of the compiled code in +// relation to tagged releases in regen-network/regen-ledger: +// +// - Revision 0: v4.0.0 (api/v1.0.0, x/data/v1.0.0) +// - Revision 1: v5.0.0 (api/v2.0.0, x/data/v2.0.0) +// - Revision 2: in progress +// +package regen.data.v2; + +option go_package = "github.com/regen-network/regen-ledger/x/data"; diff --git a/proto/regen/data/v2/events.proto b/proto/regen/data/v2/events.proto new file mode 100644 index 0000000000..a5a95411b4 --- /dev/null +++ b/proto/regen/data/v2/events.proto @@ -0,0 +1,41 @@ +syntax = "proto3"; + +package regen.data.v2; + +option go_package = "github.com/regen-network/regen-ledger/x/data"; + +// EventAnchor is an event emitted when data is anchored on chain. +message EventAnchor { + + // iri is the IRI of the data anchored on chain. + string iri = 1; +} + +// EventAttest is an event emitted when data is attested to on chain. +message EventAttest { + + // iri is the IRI of the data attested to. + string iri = 1; + + // attestor is the address of the account that has attested to the veracity of + // the data. + string attestor = 2; +} + +// EventDefineResolver is an event emitted when a resolved is defined on chain. +message EventDefineResolver { + + // id is the ID of the defined resolver. + uint64 id = 1; +} + +// EventRegisterResolver is an event emitted when data is registered to a +// resolver on chain. +message EventRegisterResolver { + + // id is the ID of the resolver that the data was registered to. + uint64 id = 1; + + // iri is the IRI of the data that was registered. + string iri = 2; +} diff --git a/proto/regen/data/v2/query.proto b/proto/regen/data/v2/query.proto new file mode 100644 index 0000000000..8c7e82abc5 --- /dev/null +++ b/proto/regen/data/v2/query.proto @@ -0,0 +1,357 @@ +syntax = "proto3"; + +package regen.data.v2; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/timestamp.proto"; +import "regen/data/v2/types.proto"; + +option go_package = "github.com/regen-network/regen-ledger/x/data"; + +// Query is the regen.data.v1 Query service +service Query { + + // AnchorByIRI queries a data anchor by the IRI of the data. + rpc AnchorByIRI(QueryAnchorByIRIRequest) returns (QueryAnchorByIRIResponse) { + option (google.api.http) = { + get : "/regen/data/v2/anchor-by-iri/{iri}" + additional_bindings : [ {get : "/regen/data/v2/anchors/iri/{iri}"} ] + }; + } + + // AnchorByHash queries a data anchor by the ContentHash of the data. + rpc AnchorByHash(QueryAnchorByHashRequest) + returns (QueryAnchorByHashResponse) { + option (google.api.http) = { + post : "/regen/data/v2/anchor-by-hash" + body : "*" + additional_bindings : [ + {post : "/regen/data/v2/anchors/hash" body : "*"} + ] + }; + } + + // AttestationsByAttestor queries data attestations by an attestor. + rpc AttestationsByAttestor(QueryAttestationsByAttestorRequest) + returns (QueryAttestationsByAttestorResponse) { + option (google.api.http) = { + get : "/regen/data/v2/attestations-by-attestor/{attestor}" + additional_bindings : [ + {get : "/regen/data/v2/attestations/attestor/{attestor}"} + ] + }; + } + + // AttestationsByIRI queries data attestations by the IRI of the data. + rpc AttestationsByIRI(QueryAttestationsByIRIRequest) + returns (QueryAttestationsByIRIResponse) { + option (google.api.http) = { + get : "/regen/data/v2/attestations-by-iri/{iri}" + additional_bindings : [ {get : "/regen/data/v2/attestations/iri/{iri}"} ] + }; + } + + // AttestationsByHash queries data attestations by the ContentHash of the + // data. + rpc AttestationsByHash(QueryAttestationsByHashRequest) + returns (QueryAttestationsByHashResponse) { + option (google.api.http) = { + post : "/regen/data/v2/attestations-by-hash" + body : "*" + additional_bindings : [ + {post : "/regen/data/v2/attestations/hash" body : "*"} + ] + }; + } + + // Resolver queries a resolver by its unique identifier. + rpc Resolver(QueryResolverRequest) returns (QueryResolverResponse) { + option (google.api.http) = { + get : "/regen/data/v2/resolver/{id}" + additional_bindings : [ {get : "/regen/data/v2/resolvers/{id}"} ] + }; + } + + // ResolversByIRI queries resolvers with registered data by the IRI of the + // data. + rpc ResolversByIRI(QueryResolversByIRIRequest) + returns (QueryResolversByIRIResponse) { + option (google.api.http) = { + get : "/regen/data/v2/resolvers-by-iri/{iri}" + additional_bindings : [ {get : "/regen/data/v2/resolvers/iri/{iri}"} ] + }; + } + + // ResolversByHash queries resolvers with registered data by the ContentHash + // of the data. + rpc ResolversByHash(QueryResolversByHashRequest) + returns (QueryResolversByHashResponse) { + option (google.api.http) = { + post : "/regen/data/v2/resolvers-by-hash" + body : "*" + additional_bindings : [ + {post : "/regen/data/v2/resolvers/hash" body : "*"} + ] + }; + } + + // ResolversByURL queries resolvers by URL. + rpc ResolversByURL(QueryResolversByURLRequest) + returns (QueryResolversByURLResponse) { + option (google.api.http) = { + post : "/regen/data/v2/resolvers-by-url" + body : "*" + additional_bindings : [ + {post : "/regen/data/v2/resolvers/url" body : "*"} + ] + }; + } + + // ConvertIRIToHash converts an IRI to a ContentHash. + rpc ConvertIRIToHash(ConvertIRIToHashRequest) + returns (ConvertIRIToHashResponse) { + option (google.api.http).get = "/regen/data/v2/convert-iri-to-hash/{iri}"; + } + + // ConvertHashToIRI converts a ContentHash to an IRI. + rpc ConvertHashToIRI(ConvertHashToIRIRequest) + returns (ConvertHashToIRIResponse) { + option (google.api.http) = { + post : "/regen/data/v2/convert-hash-to-iri" + body : "*" + }; + } +} + +// QueryAnchorByIRIRequest is the Query/AnchorByIRI request type. +message QueryAnchorByIRIRequest { + + // iri is the IRI of the anchored data. + string iri = 1; +} + +// QueryAnchorByIRIResponse is the Query/AnchorByIRI response type. +message QueryAnchorByIRIResponse { + + // anchor is information about the data anchor. + AnchorInfo anchor = 1; +} + +// QueryAnchorByHashRequest is the Query/AnchorByHash request type. +message QueryAnchorByHashRequest { + + // content_hash is the ContentHash of the anchored data. + ContentHash content_hash = 1; +} + +// QueryAnchorByHashResponse is the Query/AnchorByHash response type. +message QueryAnchorByHashResponse { + + // anchor is information about the data anchor. + AnchorInfo anchor = 1; +} + +// QueryAttestationsByAttestorRequest is the Query/AttestationsByAttestor +// request type. +message QueryAttestationsByAttestorRequest { + + // attestor is the address of the attestor. + string attestor = 1; + + // pagination is the PageRequest to use for pagination. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryAttestationsByAttestorResponse is the Query/AttestationsByAttestor +// response type. +message QueryAttestationsByAttestorResponse { + + // attestations are the attestations by the attestor. + repeated AttestationInfo attestations = 1; + + // pagination is the pagination PageResponse. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryAttestationsByIRIRequest is the Query/AttestationsByIRI request type. +message QueryAttestationsByIRIRequest { + + // iri is the IRI of the anchored data. + string iri = 1; + + // pagination is the PageRequest to use for pagination. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryAttestationsByIRIResponse is the Query/AttestationsByIRI response type. +message QueryAttestationsByIRIResponse { + + // attestations are the attestations that have been made to the anchored data. + repeated AttestationInfo attestations = 1; + + // pagination is the pagination PageResponse. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryAttestationsByHashRequest is the Query/AttestationsByHash request type. +message QueryAttestationsByHashRequest { + + // content_hash is the ContentHash of the anchored data. + ContentHash content_hash = 1; + + // pagination is the PageRequest to use for pagination. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryAttestationsByHashResponse is the Query/AttestationsByHash response +// type. +message QueryAttestationsByHashResponse { + + // attestations are the attestations that have been made to the anchored data. + repeated AttestationInfo attestations = 1; + + // pagination is the pagination PageResponse. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryResolverRequest is the Query/Resolver request type. +message QueryResolverRequest { + + // id is the ID of the resolver. + uint64 id = 1; +} + +// QueryResolverResponse is the Query/Resolver response type. +message QueryResolverResponse { + + // resolver is information about the resolver. + ResolverInfo resolver = 1; +} + +// QueryResolversByIRIRequest is the Query/ResolversByIRI request type. +message QueryResolversByIRIRequest { + + // iri is the IRI of the anchored data. + string iri = 1; + + // pagination is the PageRequest to use for pagination. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryResolversByIRIResponse is the Query/ResolversByIRI response type. +message QueryResolversByIRIResponse { + + // resolvers are the resolvers that have registered the anchored data. + repeated ResolverInfo resolvers = 1; + + // pagination is the PageResponse to use for pagination. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryResolversByHashRequest is the Query/ResolversByHash request type. +message QueryResolversByHashRequest { + + // content_hash is the ContentHash of the anchored data. + ContentHash content_hash = 1; + + // pagination is the PageRequest to use for pagination. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryResolversByHashResponse is the Query/ResolversByHash response type. +message QueryResolversByHashResponse { + + // resolvers are the resolvers that have registered the data. + repeated ResolverInfo resolvers = 1; + + // pagination is the PageResponse to use for pagination. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryResolversByURLRequest is the Query/ResolversByURL request type. +message QueryResolversByURLRequest { + + // url is the URL of the resolver. + string url = 1; + + // pagination is the PageRequest to use for pagination. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryResolversByURLResponse is the Query/ResolversByURL response type. +message QueryResolversByURLResponse { + + // resolvers are the resolvers that have a matching URL. + repeated ResolverInfo resolvers = 1; + + // pagination is the PageResponse to use for pagination. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// ConvertIRIToHashRequest is the Query/ConvertIRIToHash request type. +message ConvertIRIToHashRequest { + + // iri is the IRI to convert to a ContentHash. + string iri = 1; +} + +// ConvertIRIToHashResponse is the Query/ConvertIRIToHash response type. +message ConvertIRIToHashResponse { + + // content_hash is the ContentHash converted from the IRI. + ContentHash content_hash = 1; +} + +// ConvertHashToIRIRequest is the Query/ConvertHashToIRI request type. +message ConvertHashToIRIRequest { + + // content_hash is the ContentHash to convert to an IRI. + ContentHash content_hash = 1; +} + +// ConvertHashToIRIResponse is the Query/ConvertHashToIRI response type. +message ConvertHashToIRIResponse { + + // iri is the IRI converted from the ContentHash. + string iri = 1; +} + +// AnchorInfo is the information for a data anchor. +message AnchorInfo { + + // iri is the IRI of the anchored data. + string iri = 1; + + // content_hash is the ContentHash of the anchored data. + ContentHash content_hash = 2; + + // timestamp is the time at which the data was anchored. + google.protobuf.Timestamp timestamp = 3; +} + +// AttestationInfo is the information for an attestation. +message AttestationInfo { + + // iri is the IRI of the anchored data. + string iri = 1; + + // attestor is the address of the account that attested to the anchored data. + string attestor = 2; + + // timestamp is the time at which the data was attested to. + google.protobuf.Timestamp timestamp = 3; +} + +// ResolverInfo is the information for a resolver. +message ResolverInfo { + + // id is the ID of the resolver. + uint64 id = 1; + + // url is the URL of the resolver. + string url = 2; + + // manager is the address of the account that manages the resolver. + string manager = 3; +} diff --git a/proto/regen/data/v2/state.proto b/proto/regen/data/v2/state.proto new file mode 100644 index 0000000000..a3dc5894dd --- /dev/null +++ b/proto/regen/data/v2/state.proto @@ -0,0 +1,91 @@ +syntax = "proto3"; + +package regen.data.v2; + +import "cosmos/orm/v1/orm.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/regen-network/regen-ledger/x/data"; + +// DataID stores a compact data ID and its full IRI. +message DataID { + option (cosmos.orm.v1.table) = { + id : 1 + primary_key : {fields : "id"} + index : {id : 1, fields : "iri", unique : true} + }; + + // id is the compact automatically-generated data ID. + bytes id = 1; + + // iri is the IRI of the data which contains its full ContentHash. + string iri = 2; +} + +// DataAnchor stores the anchor timestamp for a data object. +message DataAnchor { + option (cosmos.orm.v1.table) = { + id : 2 + primary_key : {fields : "id"} + }; + + // id is the compact data ID. + bytes id = 1; + + // timestamp is the anchor timestamp for this object - the time at which + // it was first known to the blockchain. + google.protobuf.Timestamp timestamp = 2; +} + +// DataAttestor is a join table for associating data IDs and attestors. +message DataAttestor { + option (cosmos.orm.v1.table) = { + id : 3 + primary_key : {fields : "id,attestor"} + index : {id : 1, fields : "attestor"} + }; + + // id is the compact data ID. + bytes id = 1; + + // attestor is the account address of the attestor. + bytes attestor = 2; + + // timestamp is the time at which the attestor signed this data object. + google.protobuf.Timestamp timestamp = 3; +} + +// Resolver describes a data resolver. +message Resolver { + option (cosmos.orm.v1.table) = { + id : 4 + primary_key : {fields : "id", auto_increment : true} + index : {id : 1, fields : "url"} + index : {id : 2, fields : "url,manager", unique : true} + }; + + // id is the ID of the resolver. + uint64 id = 1; + + // url is the URL of the resolver. + string url = 2; + + // manager is the bytes address of the resolver manager who is allowed + // to make calls to Msg/RegisterResolver for this resolver. + bytes manager = 3; +} + +// DataResolver is a join table between data objects and resolvers and indicates +// that a resolver claims to be able to resolve this data object. +message DataResolver { + option (cosmos.orm.v1.table) = { + id : 5 + primary_key : {fields : "id,resolver_id"} + }; + + // id is the compact data ID. + bytes id = 1; + + // resolver_id is the ID of the resolver. + uint64 resolver_id = 2; +} diff --git a/proto/regen/data/v2/tx.proto b/proto/regen/data/v2/tx.proto new file mode 100644 index 0000000000..87a23b9348 --- /dev/null +++ b/proto/regen/data/v2/tx.proto @@ -0,0 +1,150 @@ +syntax = "proto3"; + +package regen.data.v2; + +import "cosmos/msg/v1/msg.proto"; +import "google/protobuf/timestamp.proto"; +import "regen/data/v2/types.proto"; + +option go_package = "github.com/regen-network/regen-ledger/x/data"; + +// Msg is the regen.data.v1 Msg service +service Msg { + + // Anchor "anchors" a piece of data to the blockchain based on its secure + // hash, effectively providing a tamper resistant timestamp. + // + // The sender in Anchor is not attesting to the veracity of the underlying + // data. They can simply be an intermediary providing timestamp services. + // Attest should be used to create a digital signature attesting to the + // veracity of some piece of data. + rpc Anchor(MsgAnchor) returns (MsgAnchorResponse); + + // Attest allows for digital signing of an arbitrary piece of data on the + // blockchain. By attesting to data, the attestor is making a statement about + // the veracity of the data itself. It is like signing a legal document, + // meaning that I agree to all conditions and to the best of my knowledge + // everything is true. When anchoring data, the sender is not attesting to the + // veracity of the data, they are simply communicating that it exists. + // + // On-chain signatures have the following benefits: + // - on-chain identities can be managed using different cryptographic keys + // that change over time through key rotation practices + // - an on-chain identity may represent an organization and through delegation + // individual members may sign on behalf of the group + // - the blockchain transaction envelope provides built-in replay protection + // and timestamping + // + // Attest implicitly calls Anchor if the data was not already anchored. + // + // Attest can be called multiple times for the same content hash with + // different attestors and those attestors will be appended to the list of + // attestors. If the same attestor attempts to attest to the same piece of + // data, the attestor will be ignored and a new attestation with a new + // timestamp will not be added. + rpc Attest(MsgAttest) returns (MsgAttestResponse); + + // DefineResolver defines a resolver URL and assigns it a new integer ID + // that can be used in calls to RegisterResolver. + rpc DefineResolver(MsgDefineResolver) returns (MsgDefineResolverResponse); + + // RegisterResolver registers data content hashes + rpc RegisterResolver(MsgRegisterResolver) + returns (MsgRegisterResolverResponse); +} + +// MsgAnchor is the Msg/Anchor request type. +message MsgAnchor { + option (cosmos.msg.v1.signer) = "sender"; + + // sender is the address of the sender of the transaction. The sender in + // Anchor is not attesting to the veracity of the underlying data. They + // can simply be an intermediary providing services. + string sender = 1; + + // content_hash is the content hash for the data to anchor. + ContentHash content_hash = 2; +} + +// MsgAnchor is the Msg/Anchor response type. +message MsgAnchorResponse { + + // iri is the IRI of the data that was anchored. + string iri = 1; + + // timestamp is the time at which the data was anchored. + google.protobuf.Timestamp timestamp = 2; +} + +// MsgAttest is the Msg/Attest request type. +message MsgAttest { + option (cosmos.msg.v1.signer) = "attestor"; + + // attestor is the addresses of the account attesting to the veracity of the + // data. By making an Attest request, the attestor is attesting to the + // veracity of the data referenced by the IRI. The precise meaning of this may + // vary depending on the underlying data. + string attestor = 1; + + // content_hashes are the content hashes for anchored data. Only RDF graph + // data can be signed as its data model is intended to specifically convey + // semantic meaning. + repeated ContentHash.Graph content_hashes = 2; +} + +// MsgAttestResponse is the Msg/Attest response type. +message MsgAttestResponse { + + // iris are the IRIs of the data that was attested to. If the attestor attests + // to the same piece of data, the previous attestation will not be updated and + // the IRI will not be included in this list. + repeated string iris = 1; + + // timestamp is the time at which any new attestations were made. + google.protobuf.Timestamp timestamp = 2; +} + +// MsgDefineResolver is the Msg/DefineResolver request type. +message MsgDefineResolver { + option (cosmos.msg.v1.signer) = "manager"; + + // manager is the address of the resolver manager. The manager is able + // to make future calls using the ID returned by this operation with + // Msg/RegisterResolver. To authorize other accounts to register resolvers, + // the manager should make use of cosmos.authz. + string manager = 1; + + // resolver_url is a resolver URL which should refer to an HTTP service + // which will respond to a GET request with the IRI of a ContentHash + // and return the content if it exists or a 404. For graph data, resolvers + // should use the HTTP Accept header to negotiate the RDF serialization + // format. + string resolver_url = 2; +} + +// MsgDefineResolverResponse is the Msg/DefineResolver response type. +message MsgDefineResolverResponse { + + // resolver_id is the integer ID of the resolver to be used in + // MsgRegisterResolver. + uint64 resolver_id = 1; +} + +// MsgRegisterResolver is the Msg/RegisterResolver request type. +message MsgRegisterResolver { + option (cosmos.msg.v1.signer) = "manager"; + + // manager is the address of the resolver manager who registered this + // resolver with Msg/DefinedResolver. + string manager = 1; + + // resolver_id is the ID of a resolver defined with Msg/DefineResolver. + uint64 resolver_id = 2; + + // content_hashes is a list of content hashes which the resolver claims to + // serve. + repeated ContentHash content_hashes = 3; +} + +// MsgRegisterResolverResponse is the Msg/RegisterResolver response type. +message MsgRegisterResolverResponse {} diff --git a/proto/regen/data/v2/types.proto b/proto/regen/data/v2/types.proto new file mode 100644 index 0000000000..4163e924bd --- /dev/null +++ b/proto/regen/data/v2/types.proto @@ -0,0 +1,108 @@ +syntax = "proto3"; + +package regen.data.v2; + +option go_package = "github.com/regen-network/regen-ledger/x/data"; + +// ContentHash specifies a hash-based content identifier for a piece of data. +// Exactly one of its fields must be set so this message behaves like a oneof. +// A protobuf oneof was not used because this caused compatibility issues with +// amino signing. +message ContentHash { + // raw specifies "raw" data which does not specify a deterministic, canonical + // encoding. Users of these hashes MUST maintain a copy of the hashed data + // which is preserved bit by bit. All other content encodings specify a + // deterministic, canonical encoding allowing implementations to choose from a + // variety of alternative formats for transport and encoding while maintaining + // the guarantee that the canonical hash will not change. The media type for + // "raw" data is defined by the MediaType enum. + Raw raw = 1; + + // graph specifies graph data that conforms to the RDF data model. + // The canonicalization algorithm used for an RDF graph is specified by + // GraphCanonicalizationAlgorithm. + Graph graph = 2; + + // RawVis the content hash type used for raw data. + message Raw { + // hash represents the hash of the data based on the specified + // digest_algorithm. It must be at least 20 bytes long and at most 64 bytes long. + bytes hash = 1; + + // digest_algorithm represents the hash digest algorithm and should be a non-zero value from the DigestAlgorithm enum. + uint32 digest_algorithm = 2; + + // file_extension represents the file extension for raw data. It can be + // must be between 2-6 characters long, must be all lower-case and should represent + // the canonical extension for the media type. + // + // A list of canonical extensions which should be used is provided here + // and SHOULD be used by implementations: txt, json, csv, xml, pdf, tiff, + // jpg, png, svg, webp, avif, gif, apng, mpeg, mp4, webm, ogg, heic, raw. + // + // The above list should be updated as new media types come into common usage + // especially when there are two or more possible extensions (i.e. jpg vs jpeg or tif vs tiff). + string file_extension = 3; + } + + // Graph is the content hash type used for RDF graph data. + message Graph { + // hash represents the hash of the data based on the specified + // digest_algorithm. It must be at least 20 bytes long and at most 64 bytes long. + bytes hash = 1; + + // digest_algorithm represents the hash digest algorithm and should be a non-zero value from the DigestAlgorithm enum. + uint32 digest_algorithm = 2; + + // graph_canonicalization_algorithm represents the RDF graph + // canonicalization algorithm and should be a non-zero value from the GraphCanonicalizationAlgorithm enum. + uint32 canonicalization_algorithm = 3; + + // merkle_tree is the merkle tree type used for the graph hash, if any and should be a value from the GraphMerkleTree enum + // or left unspecified. + uint32 merkle_tree = 4; + } +} + +// DigestAlgorithm is the hash digest algorithm +// +// With v2, this enum is no longer validated on-chain. +// However, this enum SHOULD still be used and updated as a registry of known digest +// algorithms and all implementations should coordinate on these values. +enum DigestAlgorithm { + // unspecified and invalid + DIGEST_ALGORITHM_UNSPECIFIED = 0; + + // BLAKE2b-256 + DIGEST_ALGORITHM_BLAKE2B_256 = 1; +} + +// GraphCanonicalizationAlgorithm is the graph canonicalization algorithm +// +// With v2, this enum is no longer validated on-chain. +// However, this enum SHOULD still be used and updated as a registry of known canonicalization +// algorithms and all implementations should coordinate on these values. +enum GraphCanonicalizationAlgorithm { + // unspecified and invalid + GRAPH_CANONICALIZATION_ALGORITHM_UNSPECIFIED = 0; + + // RDFC 1.0 graph canonicalization algorithm. Essentially the same as URDNA2015 with some + // small clarifications around escaping of escape characters. + GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0 = 1; +} + +// GraphMerkleTree is the graph merkle tree type used for hashing, if any. +// +// With v2, this enum is no longer validated on-chain. +// However, this enum SHOULD still be used and updated as a registry of known merkle tree +// types and all implementations should coordinate on these values. +enum GraphMerkleTree { + // unspecified and valid + GRAPH_MERKLE_TREE_NONE_UNSPECIFIED = 0; +} + +// ContentHashes contains list of content ContentHash. +message ContentHashes { + // data is a list of content hashes which the resolver claims to serve. + repeated ContentHash content_hashes = 1; +} \ No newline at end of file diff --git a/x/data/client/query.go b/x/data/client/query.go index caea78ce4a..b52ad86b5f 100644 --- a/x/data/client/query.go +++ b/x/data/client/query.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) // QueryCmd returns the parent command for all x/data query commands. diff --git a/x/data/client/testsuite/grpc.go b/x/data/client/testsuite/grpc.go index 997a7c872e..a82ac9298a 100644 --- a/x/data/client/testsuite/grpc.go +++ b/x/data/client/testsuite/grpc.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/rest" "github.com/cosmos/cosmos-sdk/types/query" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) const ( diff --git a/x/data/client/testsuite/query.go b/x/data/client/testsuite/query.go index f2bfe804ac..2609495fc4 100644 --- a/x/data/client/testsuite/query.go +++ b/x/data/client/testsuite/query.go @@ -8,8 +8,8 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" "github.com/regen-network/regen-ledger/types/v2/testutil/cli" - "github.com/regen-network/regen-ledger/x/data/v2" - "github.com/regen-network/regen-ledger/x/data/v2/client" + "github.com/regen-network/regen-ledger/x/data/v3" + "github.com/regen-network/regen-ledger/x/data/v3/client" ) const outputFormat = "JSON" diff --git a/x/data/client/testsuite/tx.go b/x/data/client/testsuite/tx.go index da40f306bd..9a81018d21 100644 --- a/x/data/client/testsuite/tx.go +++ b/x/data/client/testsuite/tx.go @@ -16,8 +16,8 @@ import ( "github.com/regen-network/regen-ledger/types/v2/testutil/cli" "github.com/regen-network/regen-ledger/types/v2/testutil/network" - "github.com/regen-network/regen-ledger/x/data/v2" - "github.com/regen-network/regen-ledger/x/data/v2/client" + "github.com/regen-network/regen-ledger/x/data/v3" + "github.com/regen-network/regen-ledger/x/data/v3/client" ) type IntegrationTestSuite struct { diff --git a/x/data/client/testsuite/util.go b/x/data/client/testsuite/util.go index 0770c59249..d56c9be002 100644 --- a/x/data/client/testsuite/util.go +++ b/x/data/client/testsuite/util.go @@ -3,7 +3,7 @@ package testsuite import ( "crypto" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) func (s *IntegrationTestSuite) createIRIAndGraphHash(content []byte) (string, *data.ContentHash) { diff --git a/x/data/client/tx.go b/x/data/client/tx.go index bb35303761..2f62167de5 100644 --- a/x/data/client/tx.go +++ b/x/data/client/tx.go @@ -14,7 +14,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/tx" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) // TxCmd returns a root CLI command handler for all x/data transaction commands. diff --git a/x/data/client/util.go b/x/data/client/util.go index d27080fce1..6df03087ad 100644 --- a/x/data/client/util.go +++ b/x/data/client/util.go @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) func formatExample(str string) string { diff --git a/x/data/doc.pb.go b/x/data/doc.pb.go index 41dde19049..4ccfacf0b3 100644 --- a/x/data/doc.pb.go +++ b/x/data/doc.pb.go @@ -1,13 +1,14 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: regen/data/v1/doc.proto +// source: regen/data/v2/doc.proto -// regen.data.v1 describes the API for the data module. +// regen.data.v2 describes the API for the data module. // // The following outlines revisions and tagged versions of the compiled code in // relation to tagged releases in regen-network/regen-ledger: // // - Revision 0: v4.0.0 (api/v1.0.0, x/data/v1.0.0) -// - Revision 1: (in progress) +// - Revision 1: v5.0.0 (api/v2.0.0, x/data/v2.0.0) +// - Revision 2: in progress // package data @@ -29,16 +30,16 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -func init() { proto.RegisterFile("regen/data/v1/doc.proto", fileDescriptor_768d389c494ba353) } +func init() { proto.RegisterFile("regen/data/v2/doc.proto", fileDescriptor_d0fea252fc05bf60) } -var fileDescriptor_768d389c494ba353 = []byte{ +var fileDescriptor_d0fea252fc05bf60 = []byte{ // 126 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2f, 0x4a, 0x4d, 0x4f, - 0xcd, 0xd3, 0x4f, 0x49, 0x2c, 0x49, 0xd4, 0x2f, 0x33, 0xd4, 0x4f, 0xc9, 0x4f, 0xd6, 0x2b, 0x28, - 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x05, 0x4b, 0xe8, 0x81, 0x24, 0xf4, 0xca, 0x0c, 0x9d, 0xdc, 0x4e, + 0xcd, 0xd3, 0x4f, 0x49, 0x2c, 0x49, 0xd4, 0x2f, 0x33, 0xd2, 0x4f, 0xc9, 0x4f, 0xd6, 0x2b, 0x28, + 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x05, 0x4b, 0xe8, 0x81, 0x24, 0xf4, 0xca, 0x8c, 0x9c, 0xdc, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x27, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0xac, 0x47, 0x37, 0x2f, 0xb5, 0xa4, 0x3c, 0xbf, 0x28, 0x1b, 0xca, 0xcb, 0x49, 0x4d, 0x49, 0x4f, 0x2d, 0xd2, 0xaf, 0x00, 0xdb, 0x91, 0xc4, 0x06, 0x36, 0xdd, - 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xd6, 0x81, 0x55, 0x72, 0x78, 0x00, 0x00, 0x00, + 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xb2, 0x00, 0xcb, 0x55, 0x78, 0x00, 0x00, 0x00, } diff --git a/x/data/events.pb.go b/x/data/events.pb.go index 46f0f476c1..b3184495fe 100644 --- a/x/data/events.pb.go +++ b/x/data/events.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: regen/data/v1/events.proto +// source: regen/data/v2/events.proto package data @@ -32,7 +32,7 @@ func (m *EventAnchor) Reset() { *m = EventAnchor{} } func (m *EventAnchor) String() string { return proto.CompactTextString(m) } func (*EventAnchor) ProtoMessage() {} func (*EventAnchor) Descriptor() ([]byte, []int) { - return fileDescriptor_3e110e0930a307df, []int{0} + return fileDescriptor_8e9ad9fec6f36aed, []int{0} } func (m *EventAnchor) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -81,7 +81,7 @@ func (m *EventAttest) Reset() { *m = EventAttest{} } func (m *EventAttest) String() string { return proto.CompactTextString(m) } func (*EventAttest) ProtoMessage() {} func (*EventAttest) Descriptor() ([]byte, []int) { - return fileDescriptor_3e110e0930a307df, []int{1} + return fileDescriptor_8e9ad9fec6f36aed, []int{1} } func (m *EventAttest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -134,7 +134,7 @@ func (m *EventDefineResolver) Reset() { *m = EventDefineResolver{} } func (m *EventDefineResolver) String() string { return proto.CompactTextString(m) } func (*EventDefineResolver) ProtoMessage() {} func (*EventDefineResolver) Descriptor() ([]byte, []int) { - return fileDescriptor_3e110e0930a307df, []int{2} + return fileDescriptor_8e9ad9fec6f36aed, []int{2} } func (m *EventDefineResolver) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -183,7 +183,7 @@ func (m *EventRegisterResolver) Reset() { *m = EventRegisterResolver{} } func (m *EventRegisterResolver) String() string { return proto.CompactTextString(m) } func (*EventRegisterResolver) ProtoMessage() {} func (*EventRegisterResolver) Descriptor() ([]byte, []int) { - return fileDescriptor_3e110e0930a307df, []int{3} + return fileDescriptor_8e9ad9fec6f36aed, []int{3} } func (m *EventRegisterResolver) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -227,20 +227,20 @@ func (m *EventRegisterResolver) GetIri() string { } func init() { - proto.RegisterType((*EventAnchor)(nil), "regen.data.v1.EventAnchor") - proto.RegisterType((*EventAttest)(nil), "regen.data.v1.EventAttest") - proto.RegisterType((*EventDefineResolver)(nil), "regen.data.v1.EventDefineResolver") - proto.RegisterType((*EventRegisterResolver)(nil), "regen.data.v1.EventRegisterResolver") + proto.RegisterType((*EventAnchor)(nil), "regen.data.v2.EventAnchor") + proto.RegisterType((*EventAttest)(nil), "regen.data.v2.EventAttest") + proto.RegisterType((*EventDefineResolver)(nil), "regen.data.v2.EventDefineResolver") + proto.RegisterType((*EventRegisterResolver)(nil), "regen.data.v2.EventRegisterResolver") } -func init() { proto.RegisterFile("regen/data/v1/events.proto", fileDescriptor_3e110e0930a307df) } +func init() { proto.RegisterFile("regen/data/v2/events.proto", fileDescriptor_8e9ad9fec6f36aed) } -var fileDescriptor_3e110e0930a307df = []byte{ +var fileDescriptor_8e9ad9fec6f36aed = []byte{ // 239 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2a, 0x4a, 0x4d, 0x4f, - 0xcd, 0xd3, 0x4f, 0x49, 0x2c, 0x49, 0xd4, 0x2f, 0x33, 0xd4, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0x29, - 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x05, 0xcb, 0xe9, 0x81, 0xe4, 0xf4, 0xca, 0x0c, - 0x95, 0xe4, 0xb9, 0xb8, 0x5d, 0x41, 0xd2, 0x8e, 0x79, 0xc9, 0x19, 0xf9, 0x45, 0x42, 0x02, 0x5c, + 0xcd, 0xd3, 0x4f, 0x49, 0x2c, 0x49, 0xd4, 0x2f, 0x33, 0xd2, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0x29, + 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x05, 0xcb, 0xe9, 0x81, 0xe4, 0xf4, 0xca, 0x8c, + 0x94, 0xe4, 0xb9, 0xb8, 0x5d, 0x41, 0xd2, 0x8e, 0x79, 0xc9, 0x19, 0xf9, 0x45, 0x42, 0x02, 0x5c, 0xcc, 0x99, 0x45, 0x99, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x20, 0xa6, 0x92, 0x35, 0x4c, 0x41, 0x49, 0x49, 0x6a, 0x71, 0x09, 0xa6, 0x02, 0x21, 0x29, 0x2e, 0x8e, 0x44, 0xb0, 0x5c, 0x7e, 0x91, 0x04, 0x13, 0x58, 0x18, 0xce, 0x57, 0x52, 0xe5, 0x12, 0x06, 0x6b, 0x76, 0x49, 0x4d, 0xcb, @@ -251,7 +251,7 @@ var fileDescriptor_3e110e0930a307df = []byte{ 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xa5, 0x93, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0xf6, 0xb3, 0x6e, 0x5e, 0x6a, 0x49, 0x79, 0x7e, 0x51, 0x36, 0x94, 0x97, 0x93, 0x9a, 0x92, 0x9e, 0x5a, 0xa4, 0x5f, 0x01, 0x0e, 0xa6, 0x24, 0x36, 0x70, 0xe8, - 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xbd, 0x69, 0x64, 0x71, 0x3b, 0x01, 0x00, 0x00, + 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xa6, 0xd4, 0x56, 0xa4, 0x3b, 0x01, 0x00, 0x00, } func (m *EventAnchor) Marshal() (dAtA []byte, err error) { diff --git a/x/data/features/msg_anchor.feature b/x/data/features/msg_anchor.feature index b24137f822..5c7c0886ec 100644 --- a/x/data/features/msg_anchor.feature +++ b/x/data/features/msg_anchor.feature @@ -8,7 +8,8 @@ Feature: MsgAnchor "content_hash": { "raw": { "hash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", - "digest_algorithm": 1 + "digest_algorithm": 1, + "file_extension": "bin" } } } diff --git a/x/data/features/msg_register_resolver.feature b/x/data/features/msg_register_resolver.feature index 83b4404aaf..b25058e93d 100644 --- a/x/data/features/msg_register_resolver.feature +++ b/x/data/features/msg_register_resolver.feature @@ -10,7 +10,8 @@ Feature: MsgRegisterResolver { "raw": { "hash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", - "digest_algorithm": 1 + "digest_algorithm": 1, + "file_extension": "txt" } } ] diff --git a/x/data/features/types_content_hash.feature b/x/data/features/types_content_hash.feature index 430dc8ebcb..f5453a4729 100644 --- a/x/data/features/types_content_hash.feature +++ b/x/data/features/types_content_hash.feature @@ -7,7 +7,7 @@ Feature: Types "raw": { "hash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", "digest_algorithm": 1, - "media_type": 1 + "file_extension": "bin" } } """ @@ -35,7 +35,7 @@ Feature: Types {} """ When the content hash is validated - Then expect the error "exactly one of ContentHash's fields should be set: invalid request" + Then expect the error "content hash must be one of raw type or graph type: invalid request" Scenario: an error is returned if content hash includes both raw type and graph type Given the content hash @@ -46,7 +46,7 @@ Feature: Types } """ When the content hash is validated - Then expect the error "exactly one of ContentHash's fields should be set: invalid request" + Then expect the error "content hash must be one of raw type or graph type: invalid request" Scenario: an error is returned if raw content hash is empty Given the content hash @@ -56,7 +56,7 @@ Feature: Types } """ When the content hash is validated - Then expect the error "hash cannot be empty: invalid request" + Then expect an error Scenario: an error is returned if raw content hash digest algorithm is unspecified Given the content hash @@ -68,35 +68,9 @@ Feature: Types } """ When the content hash is validated - Then expect the error "invalid data.DigestAlgorithm DIGEST_ALGORITHM_UNSPECIFIED: invalid request" + Then expect an error - Scenario: an error is returned if raw content hash digest algorithm is unknown - Given the content hash - """ - { - "raw": { - "hash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", - "digest_algorithm": 2 - } - } - """ - When the content hash is validated - Then expect the error "unknown data.DigestAlgorithm 2: invalid request" - - Scenario: an error is returned if raw content hash length does not match blake2b digest algorithm - Given the content hash - """ - { - "raw": { - "hash": "AA==", - "digest_algorithm": 1 - } - } - """ - When the content hash is validated - Then expect the error "expected 32 bytes for DIGEST_ALGORITHM_BLAKE2B_256, got 1: invalid request" - - Scenario: no error is returned if raw content hash media type is unspecified + Scenario: an error is returned if raw content file extension is empty Given the content hash """ { @@ -107,7 +81,7 @@ Feature: Types } """ When the content hash is validated - Then expect no error + Then expect an error Scenario: an error is returned if graph content hash is empty Given the content hash @@ -117,7 +91,7 @@ Feature: Types } """ When the content hash is validated - Then expect the error "hash cannot be empty: invalid request" + Then expect an error Scenario: an error is returned if graph content hash digest algorithm is unspecified Given the content hash @@ -129,33 +103,7 @@ Feature: Types } """ When the content hash is validated - Then expect the error "invalid data.DigestAlgorithm DIGEST_ALGORITHM_UNSPECIFIED: invalid request" - - Scenario: an error is returned if graph content hash digest algorithm is unknown - Given the content hash - """ - { - "graph": { - "hash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", - "digest_algorithm": 2 - } - } - """ - When the content hash is validated - Then expect the error "unknown data.DigestAlgorithm 2: invalid request" - - Scenario: an error is returned if graph content hash length does not match blake2b digest algorithm - Given the content hash - """ - { - "graph": { - "hash": "AA==", - "digest_algorithm": 1 - } - } - """ - When the content hash is validated - Then expect the error "expected 32 bytes for DIGEST_ALGORITHM_BLAKE2B_256, got 1: invalid request" + Then expect an error Scenario: an error is returned if graph content hash canonicalization algorithm is unspecified Given the content hash @@ -168,47 +116,4 @@ Feature: Types } """ When the content hash is validated - Then expect the error "invalid data.GraphCanonicalizationAlgorithm GRAPH_CANONICALIZATION_ALGORITHM_UNSPECIFIED: invalid request" - - Scenario: an error is returned if graph content hash canonicalization algorithm is unknown - Given the content hash - """ - { - "graph": { - "hash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", - "digest_algorithm": 1, - "canonicalization_algorithm": 2 - } - } - """ - When the content hash is validated - Then expect the error "unknown data.GraphCanonicalizationAlgorithm 2: invalid request" - - Scenario: no error is returned if graph content hash merkle tree is unspecified - Given the content hash - """ - { - "graph": { - "hash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", - "digest_algorithm": 1, - "canonicalization_algorithm": 1 - } - } - """ - When the content hash is validated - Then expect no error - - Scenario: an error is returned if graph content hash merkle tree is unknown - Given the content hash - """ - { - "graph": { - "hash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", - "digest_algorithm": 1, - "canonicalization_algorithm": 1, - "merkle_tree": 1 - } - } - """ - When the content hash is validated - Then expect the error "unknown data.GraphMerkleTree 1: invalid request" + Then expect an error diff --git a/x/data/genesis/genesis.go b/x/data/genesis/genesis.go index 87ff438de7..7519f9bda0 100644 --- a/x/data/genesis/genesis.go +++ b/x/data/genesis/genesis.go @@ -12,7 +12,7 @@ import ( api "github.com/regen-network/regen-ledger/api/v2/regen/data/v1" "github.com/regen-network/regen-ledger/types/v2/ormutil" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) // ValidateGenesis performs basic validation of genesis state. diff --git a/x/data/genesis/genesis_test.go b/x/data/genesis/genesis_test.go index 2d342b62aa..d12cb0f162 100644 --- a/x/data/genesis/genesis_test.go +++ b/x/data/genesis/genesis_test.go @@ -14,7 +14,7 @@ import ( api "github.com/regen-network/regen-ledger/api/v2/regen/data/v1" "github.com/regen-network/regen-ledger/types/v2" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) func TestValidateGenesis(t *testing.T) { diff --git a/x/data/go.mod b/x/data/go.mod index f396e3e5d8..00a1d5cda3 100644 --- a/x/data/go.mod +++ b/x/data/go.mod @@ -1,4 +1,4 @@ -module github.com/regen-network/regen-ledger/x/data/v2 +module github.com/regen-network/regen-ledger/x/data/v3 go 1.19 diff --git a/x/data/iri.go b/x/data/iri.go index 922e3550d2..e02220c566 100644 --- a/x/data/iri.go +++ b/x/data/iri.go @@ -25,59 +25,16 @@ func (ch ContentHash) ToIRI() (string, error) { const ( iriVersion0 byte = 0 - iriVersion1 byte = 1 IriPrefixRaw byte = 0 IriPrefixGraph byte = 1 ) -// ToIRI converts the ContentHash_Raw to an IRI (internationalized URI) based on the following -// pattern: regen:{base58check(concat( byte(0x0), byte(digest_algorithm), hash), 0)}.{media_type extension} -func (chr ContentHash_Raw) ToIRI() (string, error) { - err := chr.Validate() - if err != nil { - return "", err - } - - bz := make([]byte, len(chr.Hash)+2) - bz[0] = IriPrefixRaw - bz[1] = byte(chr.DigestAlgorithm) - copy(bz[2:], chr.Hash) - hashStr := base58.CheckEncode(bz, iriVersion0) - - ext, err := chr.MediaType.ToExtension() - if err != nil { - return "", err - } - - return fmt.Sprintf("regen:%s.%s", hashStr, ext), nil -} - -// ToIRI converts the ContentHash_Graph to an IRI (internationalized URI) based on the following -// pattern: regen:{base58check(concat(byte(0x1), byte(canonicalization_algorithm), -// byte(merkle_tree), byte(digest_algorithm), hash), 0)}.rdf -func (chg ContentHash_Graph) ToIRI() (string, error) { - err := chg.Validate() - if err != nil { - return "", err - } - - bz := make([]byte, len(chg.Hash)+4) - bz[0] = IriPrefixGraph - bz[1] = byte(chg.CanonicalizationAlgorithm) - bz[2] = byte(chg.MerkleTree) - bz[3] = byte(chg.DigestAlgorithm) - copy(bz[4:], chg.Hash) - hashStr := base58.CheckEncode(bz, iriVersion0) - - return fmt.Sprintf("regen:%s.rdf", hashStr), nil -} - // ToIRI converts the ContentHash_RawV2 to an IRI (internationalized URI) based on the following // pattern: regen:{base58check(concat( byte(0x0), byte(digest_algorithm), hash), 1)}.{file_extension} // This is the same as ContentHash_Raw.ToIRI except that the media type is replaced with a file extension // and the base58check version byte is 1 instead of 0. -func (chr ContentHash_RawV2) ToIRI() (string, error) { +func (chr ContentHash_Raw) ToIRI() (string, error) { err := chr.Validate() if err != nil { return "", err @@ -87,7 +44,7 @@ func (chr ContentHash_RawV2) ToIRI() (string, error) { bz[0] = IriPrefixRaw bz[1] = byte(chr.DigestAlgorithm) copy(bz[2:], chr.Hash) - hashStr := base58.CheckEncode(bz, iriVersion1) + hashStr := base58.CheckEncode(bz, iriVersion0) ext := chr.FileExtension return fmt.Sprintf("regen:%s.%s", hashStr, ext), nil @@ -97,7 +54,7 @@ func (chr ContentHash_RawV2) ToIRI() (string, error) { // pattern: regen:{base58check(concat(byte(0x1), byte(canonicalization_algorithm), // byte(merkle_tree), byte(digest_algorithm), hash), 1)}.rdf // This is the same as ContentHash_Graph.ToIRI except that the base58check version byte is 1 instead of 0. -func (chg ContentHash_GraphV2) ToIRI() (string, error) { +func (chg ContentHash_Graph) ToIRI() (string, error) { err := chg.Validate() if err != nil { return "", err @@ -109,50 +66,11 @@ func (chg ContentHash_GraphV2) ToIRI() (string, error) { bz[2] = byte(chg.MerkleTree) bz[3] = byte(chg.DigestAlgorithm) copy(bz[4:], chg.Hash) - hashStr := base58.CheckEncode(bz, iriVersion1) + hashStr := base58.CheckEncode(bz, iriVersion0) return fmt.Sprintf("regen:%s.rdf", hashStr), nil } -// ToExtension converts the media type to a file extension based on the mediaTypeExtensions map. -func (rmt RawMediaType) ToExtension() (string, error) { - ext, ok := mediaExtensionTypeToString[rmt] - if !ok { - return "", sdkerrors.ErrInvalidRequest.Wrapf("missing extension for %T %s", rmt, rmt) - } - - return ext, nil -} - -var mediaExtensionTypeToString = map[RawMediaType]string{ - RawMediaType_RAW_MEDIA_TYPE_UNSPECIFIED: "bin", - RawMediaType_RAW_MEDIA_TYPE_TEXT_PLAIN: "txt", - RawMediaType_RAW_MEDIA_TYPE_CSV: "csv", - RawMediaType_RAW_MEDIA_TYPE_JSON: "json", - RawMediaType_RAW_MEDIA_TYPE_XML: "xml", - RawMediaType_RAW_MEDIA_TYPE_PDF: "pdf", - RawMediaType_RAW_MEDIA_TYPE_TIFF: "tiff", - RawMediaType_RAW_MEDIA_TYPE_JPG: "jpg", - RawMediaType_RAW_MEDIA_TYPE_PNG: "png", - RawMediaType_RAW_MEDIA_TYPE_SVG: "svg", - RawMediaType_RAW_MEDIA_TYPE_WEBP: "webp", - RawMediaType_RAW_MEDIA_TYPE_AVIF: "avif", - RawMediaType_RAW_MEDIA_TYPE_GIF: "gif", - RawMediaType_RAW_MEDIA_TYPE_APNG: "apng", - RawMediaType_RAW_MEDIA_TYPE_MPEG: "mpeg", - RawMediaType_RAW_MEDIA_TYPE_MP4: "mp4", - RawMediaType_RAW_MEDIA_TYPE_WEBM: "webm", - RawMediaType_RAW_MEDIA_TYPE_OGG: "ogg", -} - -var stringToMediaExtensionType = map[string]RawMediaType{} - -func init() { - for mt, ext := range mediaExtensionTypeToString { - stringToMediaExtensionType[ext] = mt - } -} - // ParseIRI parses an IRI string representation of a ContentHash into a ContentHash struct // Currently IRIs must have a "regen:" prefix, and only ContentHash_Graph and ContentHash_Raw // are supported. @@ -200,26 +118,7 @@ func ParseIRI(iri string) (*ContentHash, error) { hash := rdr.Bytes() if version == iriVersion0 { - // look up extension as media type - mediaType, ok := stringToMediaExtensionType[ext] - if !ok { - return nil, ErrInvalidMediaExtension.Wrapf("failed to resolve media type for extension %s, expected %s", ext, mediaExtensionTypeToString[mediaType]) - } - - // interpret next byte as digest algorithm - digestAlg := DigestAlgorithm(b0) - err = digestAlg.Validate(hash) - if err != nil { - return nil, err - } - return &ContentHash{Raw: &ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: digestAlg, - MediaType: mediaType, - }}, nil - } else if version == iriVersion1 { - return &ContentHash{RawV2: &ContentHash_RawV2{ Hash: hash, DigestAlgorithm: uint32(b0), FileExtension: ext, @@ -256,37 +155,14 @@ func ParseIRI(iri string) (*ContentHash, error) { hash := rdr.Bytes() if version == iriVersion0 { - c14Alg := GraphCanonicalizationAlgorithm(bC14NAlg) - err = c14Alg.Validate() - if err != nil { - return nil, err - } - - mtAlg := GraphMerkleTree(bMtAlg) - err = mtAlg.Validate() - if err != nil { - return nil, err - } - - digestAlg := DigestAlgorithm(bDigestAlg) - err = digestAlg.Validate(hash) - if err != nil { - return nil, err - } - return &ContentHash{Graph: &ContentHash_Graph{ Hash: hash, - DigestAlgorithm: digestAlg, - CanonicalizationAlgorithm: c14Alg, - MerkleTree: mtAlg, - }}, nil - } else if version == iriVersion1 { - return &ContentHash{GraphV2: &ContentHash_GraphV2{ - Hash: hash, - DigestAlgorithm: uint32(bC14NAlg), - CanonicalizationAlgorithm: uint32(bMtAlg), - MerkleTree: uint32(bDigestAlg), + DigestAlgorithm: uint32(bDigestAlg), + CanonicalizationAlgorithm: uint32(bC14NAlg), + MerkleTree: uint32(bMtAlg), }}, nil + } else { + return nil, ErrInvalidIRI.Wrapf("failed to parse IRI %s: invalid version %d", iri, version) } } diff --git a/x/data/iri_test.go b/x/data/iri_test.go index 029fdf2683..4b33ca8cf5 100644 --- a/x/data/iri_test.go +++ b/x/data/iri_test.go @@ -11,65 +11,15 @@ import ( func TestContentHash_Graph_ToIRI(t *testing.T) { hash := []byte("abcdefghijklmnopqrstuvwxyz123456") - tests := []struct { - name string - chg ContentHash_Graph - want string - }{ - { - "valid graph", - ContentHash_Graph{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - CanonicalizationAlgorithm: GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015, - MerkleTree: GraphMerkleTree_GRAPH_MERKLE_TREE_NONE_UNSPECIFIED, - }, - "regen:13toVgf5aZqSVSeJQv562xkkeoe3rr3bJWa29PHVKVf77VAkVMcDvVd.rdf", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - iri, err := tt.chg.ToIRI() - require.NoError(t, err) - assert.Equal(t, iri, tt.want) - }) - } -} - -func TestContentHash_GraphV2_ToIRI(t *testing.T) { - hash := []byte("abcdefghijklmnopqrstuvwxyz123456") - tests := []struct { name string - chg ContentHash_GraphV2 + chg ContentHash_Graph wantErr bool want string }{ - { - "valid graph", - ContentHash_GraphV2{ - Hash: hash, - DigestAlgorithm: 2, - CanonicalizationAlgorithm: 2, - MerkleTree: 1, - }, - false, - "regen:DmfXHjEnP3uLFNcmtf9bpLSrFEycVCcVUnWeGAkf4nm8DUcSFmZVu1G.rdf", - }, - { - "hash too short", - ContentHash_GraphV2{ - Hash: []byte("abc"), - DigestAlgorithm: 2, - CanonicalizationAlgorithm: 2, - MerkleTree: 1, - }, - true, - "", - }, { "hash too long", - ContentHash_GraphV2{ + ContentHash_Graph{ Hash: []byte("abcdefghijklmnopqrstuvwxyz1234567abcdefghijklmnopqrstuvwxyz1234567"), DigestAlgorithm: 2, CanonicalizationAlgorithm: 2, @@ -80,7 +30,7 @@ func TestContentHash_GraphV2_ToIRI(t *testing.T) { }, { "missing digest algorithm", - ContentHash_GraphV2{ + ContentHash_Graph{ Hash: hash, DigestAlgorithm: 0, CanonicalizationAlgorithm: 1, @@ -91,7 +41,7 @@ func TestContentHash_GraphV2_ToIRI(t *testing.T) { }, { "missing canonicalization algorithm", - ContentHash_GraphV2{ + ContentHash_Graph{ Hash: hash, DigestAlgorithm: 1, CanonicalizationAlgorithm: 0, @@ -100,17 +50,27 @@ func TestContentHash_GraphV2_ToIRI(t *testing.T) { true, "", }, - { "no merkle tree", - ContentHash_GraphV2{ + ContentHash_Graph{ Hash: hash, DigestAlgorithm: 1, CanonicalizationAlgorithm: 1, MerkleTree: 0, }, false, - "regen:DmesGgF6jDGJtVc7mS9mSKKFZcCsuTMEHPqvwSBk5bk3F8ggh46e2kr.rdf", + "regen:13toVgf5aZqSVSeJQv562xkkeoe3rr3bJWa29PHVKVf77VAkVMcDvVd.rdf", + }, + { + "have merkle tree", + ContentHash_Graph{ + Hash: hash, + DigestAlgorithm: 2, + CanonicalizationAlgorithm: 2, + MerkleTree: 1, + }, + false, + "regen:13uTWjemEQUTrKexY94vQytMLSQnSbJrVuEjU7rQJggC5q6W41qPueS.rdf", }, } for _, tt := range tests { @@ -129,205 +89,25 @@ func TestContentHash_GraphV2_ToIRI(t *testing.T) { func TestContentHash_Raw_ToIRI(t *testing.T) { hash := []byte("abcdefghijklmnopqrstuvwxyz123456") - tests := []struct { - name string - chr ContentHash_Raw - want string - }{ - { - "valid media bin", - ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_UNSPECIFIED, - }, - "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.bin", - }, - { - "valid media txt", - ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_TEXT_PLAIN, - }, - "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.txt", - }, - { - "valid media csv", - ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_CSV, - }, - "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.csv", - }, - { - "valid media json", - ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_JSON, - }, - "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.json", - }, - { - "valid media xml", - ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_XML, - }, - "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.xml", - }, - { - "valid media pdf", - ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_PDF, - }, - "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.pdf", - }, - { - "valid media tiff", - ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_TIFF, - }, - "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.tiff", - }, - { - "valid media jpg", - ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_JPG, - }, - "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.jpg", - }, - { - "valid media png", - ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_PNG, - }, - "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.png", - }, - { - "valid media svg", - ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_SVG, - }, - "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.svg", - }, - { - "valid media webp", - ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_WEBP, - }, - "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.webp", - }, - { - "valid media avif", - ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_AVIF, - }, - "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.avif", - }, - { - "valid media gif", - ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_GIF, - }, - "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.gif", - }, - { - "valid media apng", - ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_APNG, - }, - "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.apng", - }, - { - "valid media mpeg", - ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_MPEG, - }, - "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.mpeg", - }, - { - "valid media mp4", - ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_MP4, - }, - "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.mp4", - }, - { - "valid media webm", - ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_WEBM, - }, - "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.webm", - }, - { - "valid media ogg", - ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_OGG, - }, - "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.ogg", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - iri, err := tt.chr.ToIRI() - require.NoError(t, err) - assert.Equal(t, iri, tt.want) - }) - } -} - -func TestContentHash_RawV2_ToIRI(t *testing.T) { - hash := []byte("abcdefghijklmnopqrstuvwxyz123456") - tests := []struct { name string - chr ContentHash_RawV2 + chr ContentHash_Raw wantErr bool want string }{ { "valid raw data", - ContentHash_RawV2{ + ContentHash_Raw{ Hash: hash, DigestAlgorithm: 2, FileExtension: "jpg", }, false, - "regen:esX3kDj4ThAkgemoPDzMGQ8xqVdwnDrNLnEaXt3tFPsrDXdY5tKz.jpg", + "regen:115dNuUmeLdZEBP9opwjTqvH8GCx56SGfgmDHbMeYtwe8neW4iXb.jpg", }, { "hash too short", - ContentHash_RawV2{ + ContentHash_Raw{ Hash: []byte("abc"), DigestAlgorithm: 2, FileExtension: "jpg", @@ -337,7 +117,7 @@ func TestContentHash_RawV2_ToIRI(t *testing.T) { }, { "hash too long", - ContentHash_RawV2{ + ContentHash_Raw{ Hash: []byte("abcdefghijklmnopqrstuvwxyz1234567abcdefghijklmnopqrstuvwxyz1234567"), DigestAlgorithm: 2, FileExtension: "jpg", @@ -347,7 +127,7 @@ func TestContentHash_RawV2_ToIRI(t *testing.T) { }, { "missing digest algorithm", - ContentHash_RawV2{ + ContentHash_Raw{ Hash: hash, DigestAlgorithm: 0, FileExtension: "jpg", @@ -357,7 +137,7 @@ func TestContentHash_RawV2_ToIRI(t *testing.T) { }, { "ext too short", - ContentHash_RawV2{ + ContentHash_Raw{ Hash: hash, DigestAlgorithm: 2, FileExtension: "j", @@ -367,7 +147,7 @@ func TestContentHash_RawV2_ToIRI(t *testing.T) { }, { "ext too long", - ContentHash_RawV2{ + ContentHash_Raw{ Hash: hash, DigestAlgorithm: 2, FileExtension: "abcdefg", @@ -389,17 +169,6 @@ func TestContentHash_RawV2_ToIRI(t *testing.T) { } } -func TestMediaType_ToExtension(t *testing.T) { - // ensure every valid media type has an extension - for mt := range RawMediaType_name { - _, err := RawMediaType(mt).ToExtension() - require.NoError(t, err) - } - - _, err := RawMediaType(-1).ToExtension() - require.Error(t, err) -} - func TestParseIRI(t *testing.T) { hash := []byte("abcdefghijklmnopqrstuvwxyz123456") @@ -425,23 +194,17 @@ func TestParseIRI(t *testing.T) { wantErr: "failed to parse IRI regen:23toVgf5aZqSVSeJQv562xkkeoe3rr3bJWa29PHVKVf77VAkVMcDvVd.rdf: checksum error: invalid IRI", }, { - name: "invalid version 2", - iri: "regen:2JjvXNMjuFCHGuzLsFiTM5133moxKmhZd964sfvbS3uA3umsR8XFa.rdf", - wantErr: "failed to parse IRI regen:2JjvXNMjuFCHGuzLsFiTM5133moxKmhZd964sfvbS3uA3umsR8XFa.rdf: invalid version 2: invalid IRI", - }, - { - name: "invalid media extension", - iri: "regen:114DDL1RtVwKpfqgaPfAG153ckiKfuPEgTT7tEGs1Hic5sC9dCta.abc", - wantErr: "failed to resolve media type for extension abc, expected bin: invalid media extension", + name: "invalid version", + iri: "regen:esV713VcRqk5TWxDgKQjGSpN4aXL4a9XTzbWRduCMQDqq2zo3TtX.rdf", + wantErr: "failed to parse IRI regen:esV713VcRqk5TWxDgKQjGSpN4aXL4a9XTzbWRduCMQDqq2zo3TtX.rdf: invalid version 1: invalid IRI", }, - { name: "valid media bin", iri: "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.bin", wantHash: &ContentHash{Raw: &ContentHash_Raw{ Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_UNSPECIFIED, + DigestAlgorithm: uint32(DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + FileExtension: "bin", }}, }, { @@ -449,8 +212,8 @@ func TestParseIRI(t *testing.T) { iri: "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.txt", wantHash: &ContentHash{Raw: &ContentHash_Raw{ Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_TEXT_PLAIN, + DigestAlgorithm: uint32(DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + FileExtension: "txt", }}, }, { @@ -458,143 +221,8 @@ func TestParseIRI(t *testing.T) { iri: "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.csv", wantHash: &ContentHash{Raw: &ContentHash_Raw{ Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_CSV, - }}, - }, - { - name: "valid media json", - iri: "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.json", - wantHash: &ContentHash{Raw: &ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_JSON, - }}, - }, - { - name: "valid media xml", - iri: "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.xml", - wantHash: &ContentHash{Raw: &ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_XML, - }}, - }, - { - name: "valid raw media pdf", - iri: "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.pdf", - wantHash: &ContentHash{Raw: &ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_PDF, - }}, - }, - { - name: "valid media tiff", - iri: "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.tiff", - wantHash: &ContentHash{Raw: &ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_TIFF, - }}, - }, - { - name: "valid media jpg", - iri: "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.jpg", - wantHash: &ContentHash{Raw: &ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_JPG, - }}, - }, - { - name: "valid media png", - iri: "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.png", - wantHash: &ContentHash{Raw: &ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_PNG, - }}, - }, - { - name: "valid media svg", - iri: "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.svg", - wantHash: &ContentHash{Raw: &ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_SVG, - }}, - }, - { - name: "valid media webp", - iri: "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.webp", - wantHash: &ContentHash{Raw: &ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_WEBP, - }}, - }, - { - name: "valid media avif", - iri: "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.avif", - wantHash: &ContentHash{Raw: &ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_AVIF, - }}, - }, - { - name: "valid media gif", - iri: "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.gif", - wantHash: &ContentHash{Raw: &ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_GIF, - }}, - }, - { - name: "valid media apng", - iri: "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.apng", - wantHash: &ContentHash{Raw: &ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_APNG, - }}, - }, - { - name: "valid media mpeg", - iri: "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.mpeg", - wantHash: &ContentHash{Raw: &ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_MPEG, - }}, - }, - { - name: "valid media mp4", - iri: "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.mp4", - wantHash: &ContentHash{Raw: &ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_MP4, - }}, - }, - { - name: "valid media webm", - iri: "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.webm", - wantHash: &ContentHash{Raw: &ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_WEBM, - }}, - }, - { - name: "valid media ogg", - iri: "regen:113gdjFKcVCt13Za6vN7TtbgMM6LMSjRnu89BMCxeuHdkJ1hWUmy.ogg", - wantHash: &ContentHash{Raw: &ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: RawMediaType_RAW_MEDIA_TYPE_OGG, + DigestAlgorithm: uint32(DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + FileExtension: "csv", }}, }, { @@ -602,27 +230,18 @@ func TestParseIRI(t *testing.T) { iri: "regen:13toVgf5aZqSVSeJQv562xkkeoe3rr3bJWa29PHVKVf77VAkVMcDvVd.rdf", wantHash: &ContentHash{Graph: &ContentHash_Graph{ Hash: hash, - DigestAlgorithm: DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - CanonicalizationAlgorithm: GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015, + DigestAlgorithm: uint32(DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + CanonicalizationAlgorithm: uint32(GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015), }}, }, { - name: "valid graph v2", - iri: "regen:DmfXHjEnP3uLFNcmtf9bpLSrFEycVCcVUnWeGAkf4nm8DUcSFmZVu1G.rdf", - wantHash: &ContentHash{GraphV2: &ContentHash_GraphV2{ + name: "valid graph with merkle tree", + iri: "regen:13uTWjemEQUTrKexY94vQytMLSQnSbJrVuEjU7rQJggC5q6W41qPueS.rdf", + wantHash: &ContentHash{Graph: &ContentHash_Graph{ Hash: hash, DigestAlgorithm: 2, - CanonicalizationAlgorithm: 1, - MerkleTree: 2, - }}, - }, - { - name: "valid raw v2", - iri: "regen:esX3kDj4ThAkgemoPDzMGQ8xqVdwnDrNLnEaXt3tFPsrDXdY5tKz.jpg", - wantHash: &ContentHash{RawV2: &ContentHash_RawV2{ - Hash: hash, - DigestAlgorithm: 2, - FileExtension: "jpg", + CanonicalizationAlgorithm: 2, + MerkleTree: 1, }}, }, } diff --git a/x/data/module/module.go b/x/data/module/module.go index 5286f4027f..f539a728d1 100644 --- a/x/data/module/module.go +++ b/x/data/module/module.go @@ -21,11 +21,11 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/regen-network/regen-ledger/x/data/v2" - "github.com/regen-network/regen-ledger/x/data/v2/client" - "github.com/regen-network/regen-ledger/x/data/v2/genesis" - "github.com/regen-network/regen-ledger/x/data/v2/server" - "github.com/regen-network/regen-ledger/x/data/v2/simulation" + "github.com/regen-network/regen-ledger/x/data/v3" + "github.com/regen-network/regen-ledger/x/data/v3/client" + "github.com/regen-network/regen-ledger/x/data/v3/genesis" + "github.com/regen-network/regen-ledger/x/data/v3/server" + "github.com/regen-network/regen-ledger/x/data/v3/simulation" ) var ( diff --git a/x/data/query.pb.go b/x/data/query.pb.go index ec38cc3e9e..c5a7d381ab 100644 --- a/x/data/query.pb.go +++ b/x/data/query.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: regen/data/v1/query.proto +// source: regen/data/v2/query.proto package data @@ -40,7 +40,7 @@ func (m *QueryAnchorByIRIRequest) Reset() { *m = QueryAnchorByIRIRequest func (m *QueryAnchorByIRIRequest) String() string { return proto.CompactTextString(m) } func (*QueryAnchorByIRIRequest) ProtoMessage() {} func (*QueryAnchorByIRIRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{0} + return fileDescriptor_c7cbd0abf98c79ab, []int{0} } func (m *QueryAnchorByIRIRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -86,7 +86,7 @@ func (m *QueryAnchorByIRIResponse) Reset() { *m = QueryAnchorByIRIRespon func (m *QueryAnchorByIRIResponse) String() string { return proto.CompactTextString(m) } func (*QueryAnchorByIRIResponse) ProtoMessage() {} func (*QueryAnchorByIRIResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{1} + return fileDescriptor_c7cbd0abf98c79ab, []int{1} } func (m *QueryAnchorByIRIResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -132,7 +132,7 @@ func (m *QueryAnchorByHashRequest) Reset() { *m = QueryAnchorByHashReque func (m *QueryAnchorByHashRequest) String() string { return proto.CompactTextString(m) } func (*QueryAnchorByHashRequest) ProtoMessage() {} func (*QueryAnchorByHashRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{2} + return fileDescriptor_c7cbd0abf98c79ab, []int{2} } func (m *QueryAnchorByHashRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -178,7 +178,7 @@ func (m *QueryAnchorByHashResponse) Reset() { *m = QueryAnchorByHashResp func (m *QueryAnchorByHashResponse) String() string { return proto.CompactTextString(m) } func (*QueryAnchorByHashResponse) ProtoMessage() {} func (*QueryAnchorByHashResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{3} + return fileDescriptor_c7cbd0abf98c79ab, []int{3} } func (m *QueryAnchorByHashResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -227,7 +227,7 @@ func (m *QueryAttestationsByAttestorRequest) Reset() { *m = QueryAttesta func (m *QueryAttestationsByAttestorRequest) String() string { return proto.CompactTextString(m) } func (*QueryAttestationsByAttestorRequest) ProtoMessage() {} func (*QueryAttestationsByAttestorRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{4} + return fileDescriptor_c7cbd0abf98c79ab, []int{4} } func (m *QueryAttestationsByAttestorRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -283,7 +283,7 @@ func (m *QueryAttestationsByAttestorResponse) Reset() { *m = QueryAttest func (m *QueryAttestationsByAttestorResponse) String() string { return proto.CompactTextString(m) } func (*QueryAttestationsByAttestorResponse) ProtoMessage() {} func (*QueryAttestationsByAttestorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{5} + return fileDescriptor_c7cbd0abf98c79ab, []int{5} } func (m *QueryAttestationsByAttestorResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -338,7 +338,7 @@ func (m *QueryAttestationsByIRIRequest) Reset() { *m = QueryAttestations func (m *QueryAttestationsByIRIRequest) String() string { return proto.CompactTextString(m) } func (*QueryAttestationsByIRIRequest) ProtoMessage() {} func (*QueryAttestationsByIRIRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{6} + return fileDescriptor_c7cbd0abf98c79ab, []int{6} } func (m *QueryAttestationsByIRIRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -393,7 +393,7 @@ func (m *QueryAttestationsByIRIResponse) Reset() { *m = QueryAttestation func (m *QueryAttestationsByIRIResponse) String() string { return proto.CompactTextString(m) } func (*QueryAttestationsByIRIResponse) ProtoMessage() {} func (*QueryAttestationsByIRIResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{7} + return fileDescriptor_c7cbd0abf98c79ab, []int{7} } func (m *QueryAttestationsByIRIResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -448,7 +448,7 @@ func (m *QueryAttestationsByHashRequest) Reset() { *m = QueryAttestation func (m *QueryAttestationsByHashRequest) String() string { return proto.CompactTextString(m) } func (*QueryAttestationsByHashRequest) ProtoMessage() {} func (*QueryAttestationsByHashRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{8} + return fileDescriptor_c7cbd0abf98c79ab, []int{8} } func (m *QueryAttestationsByHashRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -504,7 +504,7 @@ func (m *QueryAttestationsByHashResponse) Reset() { *m = QueryAttestatio func (m *QueryAttestationsByHashResponse) String() string { return proto.CompactTextString(m) } func (*QueryAttestationsByHashResponse) ProtoMessage() {} func (*QueryAttestationsByHashResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{9} + return fileDescriptor_c7cbd0abf98c79ab, []int{9} } func (m *QueryAttestationsByHashResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -557,7 +557,7 @@ func (m *QueryResolverRequest) Reset() { *m = QueryResolverRequest{} } func (m *QueryResolverRequest) String() string { return proto.CompactTextString(m) } func (*QueryResolverRequest) ProtoMessage() {} func (*QueryResolverRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{10} + return fileDescriptor_c7cbd0abf98c79ab, []int{10} } func (m *QueryResolverRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -603,7 +603,7 @@ func (m *QueryResolverResponse) Reset() { *m = QueryResolverResponse{} } func (m *QueryResolverResponse) String() string { return proto.CompactTextString(m) } func (*QueryResolverResponse) ProtoMessage() {} func (*QueryResolverResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{11} + return fileDescriptor_c7cbd0abf98c79ab, []int{11} } func (m *QueryResolverResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -651,7 +651,7 @@ func (m *QueryResolversByIRIRequest) Reset() { *m = QueryResolversByIRIR func (m *QueryResolversByIRIRequest) String() string { return proto.CompactTextString(m) } func (*QueryResolversByIRIRequest) ProtoMessage() {} func (*QueryResolversByIRIRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{12} + return fileDescriptor_c7cbd0abf98c79ab, []int{12} } func (m *QueryResolversByIRIRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -706,7 +706,7 @@ func (m *QueryResolversByIRIResponse) Reset() { *m = QueryResolversByIRI func (m *QueryResolversByIRIResponse) String() string { return proto.CompactTextString(m) } func (*QueryResolversByIRIResponse) ProtoMessage() {} func (*QueryResolversByIRIResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{13} + return fileDescriptor_c7cbd0abf98c79ab, []int{13} } func (m *QueryResolversByIRIResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -761,7 +761,7 @@ func (m *QueryResolversByHashRequest) Reset() { *m = QueryResolversByHas func (m *QueryResolversByHashRequest) String() string { return proto.CompactTextString(m) } func (*QueryResolversByHashRequest) ProtoMessage() {} func (*QueryResolversByHashRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{14} + return fileDescriptor_c7cbd0abf98c79ab, []int{14} } func (m *QueryResolversByHashRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -816,7 +816,7 @@ func (m *QueryResolversByHashResponse) Reset() { *m = QueryResolversByHa func (m *QueryResolversByHashResponse) String() string { return proto.CompactTextString(m) } func (*QueryResolversByHashResponse) ProtoMessage() {} func (*QueryResolversByHashResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{15} + return fileDescriptor_c7cbd0abf98c79ab, []int{15} } func (m *QueryResolversByHashResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -871,7 +871,7 @@ func (m *QueryResolversByURLRequest) Reset() { *m = QueryResolversByURLR func (m *QueryResolversByURLRequest) String() string { return proto.CompactTextString(m) } func (*QueryResolversByURLRequest) ProtoMessage() {} func (*QueryResolversByURLRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{16} + return fileDescriptor_c7cbd0abf98c79ab, []int{16} } func (m *QueryResolversByURLRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -926,7 +926,7 @@ func (m *QueryResolversByURLResponse) Reset() { *m = QueryResolversByURL func (m *QueryResolversByURLResponse) String() string { return proto.CompactTextString(m) } func (*QueryResolversByURLResponse) ProtoMessage() {} func (*QueryResolversByURLResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{17} + return fileDescriptor_c7cbd0abf98c79ab, []int{17} } func (m *QueryResolversByURLResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -979,7 +979,7 @@ func (m *ConvertIRIToHashRequest) Reset() { *m = ConvertIRIToHashRequest func (m *ConvertIRIToHashRequest) String() string { return proto.CompactTextString(m) } func (*ConvertIRIToHashRequest) ProtoMessage() {} func (*ConvertIRIToHashRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{18} + return fileDescriptor_c7cbd0abf98c79ab, []int{18} } func (m *ConvertIRIToHashRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1025,7 +1025,7 @@ func (m *ConvertIRIToHashResponse) Reset() { *m = ConvertIRIToHashRespon func (m *ConvertIRIToHashResponse) String() string { return proto.CompactTextString(m) } func (*ConvertIRIToHashResponse) ProtoMessage() {} func (*ConvertIRIToHashResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{19} + return fileDescriptor_c7cbd0abf98c79ab, []int{19} } func (m *ConvertIRIToHashResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1071,7 +1071,7 @@ func (m *ConvertHashToIRIRequest) Reset() { *m = ConvertHashToIRIRequest func (m *ConvertHashToIRIRequest) String() string { return proto.CompactTextString(m) } func (*ConvertHashToIRIRequest) ProtoMessage() {} func (*ConvertHashToIRIRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{20} + return fileDescriptor_c7cbd0abf98c79ab, []int{20} } func (m *ConvertHashToIRIRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1117,7 +1117,7 @@ func (m *ConvertHashToIRIResponse) Reset() { *m = ConvertHashToIRIRespon func (m *ConvertHashToIRIResponse) String() string { return proto.CompactTextString(m) } func (*ConvertHashToIRIResponse) ProtoMessage() {} func (*ConvertHashToIRIResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{21} + return fileDescriptor_c7cbd0abf98c79ab, []int{21} } func (m *ConvertHashToIRIResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1167,7 +1167,7 @@ func (m *AnchorInfo) Reset() { *m = AnchorInfo{} } func (m *AnchorInfo) String() string { return proto.CompactTextString(m) } func (*AnchorInfo) ProtoMessage() {} func (*AnchorInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{22} + return fileDescriptor_c7cbd0abf98c79ab, []int{22} } func (m *AnchorInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1231,7 +1231,7 @@ func (m *AttestationInfo) Reset() { *m = AttestationInfo{} } func (m *AttestationInfo) String() string { return proto.CompactTextString(m) } func (*AttestationInfo) ProtoMessage() {} func (*AttestationInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{23} + return fileDescriptor_c7cbd0abf98c79ab, []int{23} } func (m *AttestationInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1295,7 +1295,7 @@ func (m *ResolverInfo) Reset() { *m = ResolverInfo{} } func (m *ResolverInfo) String() string { return proto.CompactTextString(m) } func (*ResolverInfo) ProtoMessage() {} func (*ResolverInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_38d540b97ef3e368, []int{24} + return fileDescriptor_c7cbd0abf98c79ab, []int{24} } func (m *ResolverInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1346,36 +1346,36 @@ func (m *ResolverInfo) GetManager() string { } func init() { - proto.RegisterType((*QueryAnchorByIRIRequest)(nil), "regen.data.v1.QueryAnchorByIRIRequest") - proto.RegisterType((*QueryAnchorByIRIResponse)(nil), "regen.data.v1.QueryAnchorByIRIResponse") - proto.RegisterType((*QueryAnchorByHashRequest)(nil), "regen.data.v1.QueryAnchorByHashRequest") - proto.RegisterType((*QueryAnchorByHashResponse)(nil), "regen.data.v1.QueryAnchorByHashResponse") - proto.RegisterType((*QueryAttestationsByAttestorRequest)(nil), "regen.data.v1.QueryAttestationsByAttestorRequest") - proto.RegisterType((*QueryAttestationsByAttestorResponse)(nil), "regen.data.v1.QueryAttestationsByAttestorResponse") - proto.RegisterType((*QueryAttestationsByIRIRequest)(nil), "regen.data.v1.QueryAttestationsByIRIRequest") - proto.RegisterType((*QueryAttestationsByIRIResponse)(nil), "regen.data.v1.QueryAttestationsByIRIResponse") - proto.RegisterType((*QueryAttestationsByHashRequest)(nil), "regen.data.v1.QueryAttestationsByHashRequest") - proto.RegisterType((*QueryAttestationsByHashResponse)(nil), "regen.data.v1.QueryAttestationsByHashResponse") - proto.RegisterType((*QueryResolverRequest)(nil), "regen.data.v1.QueryResolverRequest") - proto.RegisterType((*QueryResolverResponse)(nil), "regen.data.v1.QueryResolverResponse") - proto.RegisterType((*QueryResolversByIRIRequest)(nil), "regen.data.v1.QueryResolversByIRIRequest") - proto.RegisterType((*QueryResolversByIRIResponse)(nil), "regen.data.v1.QueryResolversByIRIResponse") - proto.RegisterType((*QueryResolversByHashRequest)(nil), "regen.data.v1.QueryResolversByHashRequest") - proto.RegisterType((*QueryResolversByHashResponse)(nil), "regen.data.v1.QueryResolversByHashResponse") - proto.RegisterType((*QueryResolversByURLRequest)(nil), "regen.data.v1.QueryResolversByURLRequest") - proto.RegisterType((*QueryResolversByURLResponse)(nil), "regen.data.v1.QueryResolversByURLResponse") - proto.RegisterType((*ConvertIRIToHashRequest)(nil), "regen.data.v1.ConvertIRIToHashRequest") - proto.RegisterType((*ConvertIRIToHashResponse)(nil), "regen.data.v1.ConvertIRIToHashResponse") - proto.RegisterType((*ConvertHashToIRIRequest)(nil), "regen.data.v1.ConvertHashToIRIRequest") - proto.RegisterType((*ConvertHashToIRIResponse)(nil), "regen.data.v1.ConvertHashToIRIResponse") - proto.RegisterType((*AnchorInfo)(nil), "regen.data.v1.AnchorInfo") - proto.RegisterType((*AttestationInfo)(nil), "regen.data.v1.AttestationInfo") - proto.RegisterType((*ResolverInfo)(nil), "regen.data.v1.ResolverInfo") -} - -func init() { proto.RegisterFile("regen/data/v1/query.proto", fileDescriptor_38d540b97ef3e368) } - -var fileDescriptor_38d540b97ef3e368 = []byte{ + proto.RegisterType((*QueryAnchorByIRIRequest)(nil), "regen.data.v2.QueryAnchorByIRIRequest") + proto.RegisterType((*QueryAnchorByIRIResponse)(nil), "regen.data.v2.QueryAnchorByIRIResponse") + proto.RegisterType((*QueryAnchorByHashRequest)(nil), "regen.data.v2.QueryAnchorByHashRequest") + proto.RegisterType((*QueryAnchorByHashResponse)(nil), "regen.data.v2.QueryAnchorByHashResponse") + proto.RegisterType((*QueryAttestationsByAttestorRequest)(nil), "regen.data.v2.QueryAttestationsByAttestorRequest") + proto.RegisterType((*QueryAttestationsByAttestorResponse)(nil), "regen.data.v2.QueryAttestationsByAttestorResponse") + proto.RegisterType((*QueryAttestationsByIRIRequest)(nil), "regen.data.v2.QueryAttestationsByIRIRequest") + proto.RegisterType((*QueryAttestationsByIRIResponse)(nil), "regen.data.v2.QueryAttestationsByIRIResponse") + proto.RegisterType((*QueryAttestationsByHashRequest)(nil), "regen.data.v2.QueryAttestationsByHashRequest") + proto.RegisterType((*QueryAttestationsByHashResponse)(nil), "regen.data.v2.QueryAttestationsByHashResponse") + proto.RegisterType((*QueryResolverRequest)(nil), "regen.data.v2.QueryResolverRequest") + proto.RegisterType((*QueryResolverResponse)(nil), "regen.data.v2.QueryResolverResponse") + proto.RegisterType((*QueryResolversByIRIRequest)(nil), "regen.data.v2.QueryResolversByIRIRequest") + proto.RegisterType((*QueryResolversByIRIResponse)(nil), "regen.data.v2.QueryResolversByIRIResponse") + proto.RegisterType((*QueryResolversByHashRequest)(nil), "regen.data.v2.QueryResolversByHashRequest") + proto.RegisterType((*QueryResolversByHashResponse)(nil), "regen.data.v2.QueryResolversByHashResponse") + proto.RegisterType((*QueryResolversByURLRequest)(nil), "regen.data.v2.QueryResolversByURLRequest") + proto.RegisterType((*QueryResolversByURLResponse)(nil), "regen.data.v2.QueryResolversByURLResponse") + proto.RegisterType((*ConvertIRIToHashRequest)(nil), "regen.data.v2.ConvertIRIToHashRequest") + proto.RegisterType((*ConvertIRIToHashResponse)(nil), "regen.data.v2.ConvertIRIToHashResponse") + proto.RegisterType((*ConvertHashToIRIRequest)(nil), "regen.data.v2.ConvertHashToIRIRequest") + proto.RegisterType((*ConvertHashToIRIResponse)(nil), "regen.data.v2.ConvertHashToIRIResponse") + proto.RegisterType((*AnchorInfo)(nil), "regen.data.v2.AnchorInfo") + proto.RegisterType((*AttestationInfo)(nil), "regen.data.v2.AttestationInfo") + proto.RegisterType((*ResolverInfo)(nil), "regen.data.v2.ResolverInfo") +} + +func init() { proto.RegisterFile("regen/data/v2/query.proto", fileDescriptor_c7cbd0abf98c79ab) } + +var fileDescriptor_c7cbd0abf98c79ab = []byte{ // 1173 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x96, 0xcf, 0x6f, 0x1b, 0x45, 0x14, 0xc7, 0x33, 0x0e, 0x94, 0xe4, 0x25, 0x34, 0x65, 0x04, 0xd4, 0x71, 0x12, 0x27, 0x4c, 0xda, @@ -1384,8 +1384,8 @@ var fileDescriptor_38d540b97ef3e368 = []byte{ 0x38, 0x71, 0x44, 0x20, 0xc4, 0x85, 0x0b, 0x08, 0x89, 0x53, 0x7b, 0xe0, 0xc0, 0x05, 0xfe, 0x00, 0x04, 0x97, 0x4a, 0x5c, 0x38, 0xa2, 0x84, 0x33, 0x47, 0xce, 0x68, 0x67, 0x67, 0xbd, 0xbf, 0xd7, 0x6e, 0x1b, 0x90, 0x6f, 0x5e, 0xef, 0x7b, 0x33, 0x9f, 0xef, 0xdb, 0xef, 0xec, 0x7e, 0x61, 0xde, - 0xa0, 0x0d, 0xaa, 0xcb, 0x75, 0xd5, 0x52, 0xe5, 0x5e, 0x51, 0xbe, 0xd7, 0xa5, 0x46, 0x5f, 0xea, - 0x18, 0xcc, 0x62, 0xf8, 0x59, 0x7e, 0x4b, 0xb2, 0x6f, 0x49, 0xbd, 0x62, 0x6e, 0xb3, 0xc6, 0xcc, + 0xa0, 0x0d, 0xaa, 0xcb, 0x75, 0xd5, 0x52, 0xe5, 0x5e, 0x49, 0xbe, 0xd7, 0xa5, 0x46, 0x5f, 0xea, + 0x18, 0xcc, 0x62, 0xf8, 0x59, 0x7e, 0x4b, 0xb2, 0x6f, 0x49, 0xbd, 0x52, 0x6e, 0xb3, 0xc6, 0xcc, 0x36, 0x33, 0xe5, 0xaa, 0x6a, 0x52, 0xa7, 0x4e, 0xee, 0x15, 0xab, 0xd4, 0x52, 0x8b, 0x72, 0x47, 0x6d, 0x68, 0xba, 0x6a, 0x69, 0x4c, 0x77, 0x5a, 0x73, 0x8b, 0x0d, 0xc6, 0x1a, 0x2d, 0x2a, 0xab, 0x1d, 0x4d, 0x56, 0x75, 0x9d, 0x59, 0xfc, 0xa6, 0x29, 0xee, 0x2e, 0x8b, 0xbb, 0xfc, 0xaa, 0xda, @@ -1449,8 +1449,8 @@ var fileDescriptor_38d540b97ef3e368 = []byte{ 0xd1, 0xc3, 0xe3, 0x3c, 0xfa, 0xf3, 0x38, 0x8f, 0x3e, 0x3b, 0xc9, 0x4f, 0x3c, 0x3c, 0xc9, 0x4f, 0xfc, 0x71, 0x92, 0x9f, 0xa8, 0x6c, 0x37, 0x34, 0xab, 0xd9, 0xad, 0x4a, 0x35, 0xd6, 0x76, 0x96, 0x2a, 0xe8, 0xd4, 0xfa, 0x88, 0x19, 0x1f, 0x8a, 0xab, 0x16, 0xad, 0x37, 0xa8, 0x21, 0x7f, 0xcc, - 0x77, 0xa8, 0x9e, 0xe1, 0x59, 0xe5, 0xd5, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x0b, 0x3f, - 0x37, 0x55, 0x14, 0x00, 0x00, + 0x77, 0xa8, 0x9e, 0xe1, 0x59, 0xe5, 0xd5, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xb8, 0x55, 0xe9, + 0x39, 0x55, 0x14, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1502,7 +1502,7 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { func (c *queryClient) AnchorByIRI(ctx context.Context, in *QueryAnchorByIRIRequest, opts ...grpc.CallOption) (*QueryAnchorByIRIResponse, error) { out := new(QueryAnchorByIRIResponse) - err := c.cc.Invoke(ctx, "/regen.data.v1.Query/AnchorByIRI", in, out, opts...) + err := c.cc.Invoke(ctx, "/regen.data.v2.Query/AnchorByIRI", in, out, opts...) if err != nil { return nil, err } @@ -1511,7 +1511,7 @@ func (c *queryClient) AnchorByIRI(ctx context.Context, in *QueryAnchorByIRIReque func (c *queryClient) AnchorByHash(ctx context.Context, in *QueryAnchorByHashRequest, opts ...grpc.CallOption) (*QueryAnchorByHashResponse, error) { out := new(QueryAnchorByHashResponse) - err := c.cc.Invoke(ctx, "/regen.data.v1.Query/AnchorByHash", in, out, opts...) + err := c.cc.Invoke(ctx, "/regen.data.v2.Query/AnchorByHash", in, out, opts...) if err != nil { return nil, err } @@ -1520,7 +1520,7 @@ func (c *queryClient) AnchorByHash(ctx context.Context, in *QueryAnchorByHashReq func (c *queryClient) AttestationsByAttestor(ctx context.Context, in *QueryAttestationsByAttestorRequest, opts ...grpc.CallOption) (*QueryAttestationsByAttestorResponse, error) { out := new(QueryAttestationsByAttestorResponse) - err := c.cc.Invoke(ctx, "/regen.data.v1.Query/AttestationsByAttestor", in, out, opts...) + err := c.cc.Invoke(ctx, "/regen.data.v2.Query/AttestationsByAttestor", in, out, opts...) if err != nil { return nil, err } @@ -1529,7 +1529,7 @@ func (c *queryClient) AttestationsByAttestor(ctx context.Context, in *QueryAttes func (c *queryClient) AttestationsByIRI(ctx context.Context, in *QueryAttestationsByIRIRequest, opts ...grpc.CallOption) (*QueryAttestationsByIRIResponse, error) { out := new(QueryAttestationsByIRIResponse) - err := c.cc.Invoke(ctx, "/regen.data.v1.Query/AttestationsByIRI", in, out, opts...) + err := c.cc.Invoke(ctx, "/regen.data.v2.Query/AttestationsByIRI", in, out, opts...) if err != nil { return nil, err } @@ -1538,7 +1538,7 @@ func (c *queryClient) AttestationsByIRI(ctx context.Context, in *QueryAttestatio func (c *queryClient) AttestationsByHash(ctx context.Context, in *QueryAttestationsByHashRequest, opts ...grpc.CallOption) (*QueryAttestationsByHashResponse, error) { out := new(QueryAttestationsByHashResponse) - err := c.cc.Invoke(ctx, "/regen.data.v1.Query/AttestationsByHash", in, out, opts...) + err := c.cc.Invoke(ctx, "/regen.data.v2.Query/AttestationsByHash", in, out, opts...) if err != nil { return nil, err } @@ -1547,7 +1547,7 @@ func (c *queryClient) AttestationsByHash(ctx context.Context, in *QueryAttestati func (c *queryClient) Resolver(ctx context.Context, in *QueryResolverRequest, opts ...grpc.CallOption) (*QueryResolverResponse, error) { out := new(QueryResolverResponse) - err := c.cc.Invoke(ctx, "/regen.data.v1.Query/Resolver", in, out, opts...) + err := c.cc.Invoke(ctx, "/regen.data.v2.Query/Resolver", in, out, opts...) if err != nil { return nil, err } @@ -1556,7 +1556,7 @@ func (c *queryClient) Resolver(ctx context.Context, in *QueryResolverRequest, op func (c *queryClient) ResolversByIRI(ctx context.Context, in *QueryResolversByIRIRequest, opts ...grpc.CallOption) (*QueryResolversByIRIResponse, error) { out := new(QueryResolversByIRIResponse) - err := c.cc.Invoke(ctx, "/regen.data.v1.Query/ResolversByIRI", in, out, opts...) + err := c.cc.Invoke(ctx, "/regen.data.v2.Query/ResolversByIRI", in, out, opts...) if err != nil { return nil, err } @@ -1565,7 +1565,7 @@ func (c *queryClient) ResolversByIRI(ctx context.Context, in *QueryResolversByIR func (c *queryClient) ResolversByHash(ctx context.Context, in *QueryResolversByHashRequest, opts ...grpc.CallOption) (*QueryResolversByHashResponse, error) { out := new(QueryResolversByHashResponse) - err := c.cc.Invoke(ctx, "/regen.data.v1.Query/ResolversByHash", in, out, opts...) + err := c.cc.Invoke(ctx, "/regen.data.v2.Query/ResolversByHash", in, out, opts...) if err != nil { return nil, err } @@ -1574,7 +1574,7 @@ func (c *queryClient) ResolversByHash(ctx context.Context, in *QueryResolversByH func (c *queryClient) ResolversByURL(ctx context.Context, in *QueryResolversByURLRequest, opts ...grpc.CallOption) (*QueryResolversByURLResponse, error) { out := new(QueryResolversByURLResponse) - err := c.cc.Invoke(ctx, "/regen.data.v1.Query/ResolversByURL", in, out, opts...) + err := c.cc.Invoke(ctx, "/regen.data.v2.Query/ResolversByURL", in, out, opts...) if err != nil { return nil, err } @@ -1583,7 +1583,7 @@ func (c *queryClient) ResolversByURL(ctx context.Context, in *QueryResolversByUR func (c *queryClient) ConvertIRIToHash(ctx context.Context, in *ConvertIRIToHashRequest, opts ...grpc.CallOption) (*ConvertIRIToHashResponse, error) { out := new(ConvertIRIToHashResponse) - err := c.cc.Invoke(ctx, "/regen.data.v1.Query/ConvertIRIToHash", in, out, opts...) + err := c.cc.Invoke(ctx, "/regen.data.v2.Query/ConvertIRIToHash", in, out, opts...) if err != nil { return nil, err } @@ -1592,7 +1592,7 @@ func (c *queryClient) ConvertIRIToHash(ctx context.Context, in *ConvertIRIToHash func (c *queryClient) ConvertHashToIRI(ctx context.Context, in *ConvertHashToIRIRequest, opts ...grpc.CallOption) (*ConvertHashToIRIResponse, error) { out := new(ConvertHashToIRIResponse) - err := c.cc.Invoke(ctx, "/regen.data.v1.Query/ConvertHashToIRI", in, out, opts...) + err := c.cc.Invoke(ctx, "/regen.data.v2.Query/ConvertHashToIRI", in, out, opts...) if err != nil { return nil, err } @@ -1680,7 +1680,7 @@ func _Query_AnchorByIRI_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/regen.data.v1.Query/AnchorByIRI", + FullMethod: "/regen.data.v2.Query/AnchorByIRI", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).AnchorByIRI(ctx, req.(*QueryAnchorByIRIRequest)) @@ -1698,7 +1698,7 @@ func _Query_AnchorByHash_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/regen.data.v1.Query/AnchorByHash", + FullMethod: "/regen.data.v2.Query/AnchorByHash", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).AnchorByHash(ctx, req.(*QueryAnchorByHashRequest)) @@ -1716,7 +1716,7 @@ func _Query_AttestationsByAttestor_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/regen.data.v1.Query/AttestationsByAttestor", + FullMethod: "/regen.data.v2.Query/AttestationsByAttestor", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).AttestationsByAttestor(ctx, req.(*QueryAttestationsByAttestorRequest)) @@ -1734,7 +1734,7 @@ func _Query_AttestationsByIRI_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/regen.data.v1.Query/AttestationsByIRI", + FullMethod: "/regen.data.v2.Query/AttestationsByIRI", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).AttestationsByIRI(ctx, req.(*QueryAttestationsByIRIRequest)) @@ -1752,7 +1752,7 @@ func _Query_AttestationsByHash_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/regen.data.v1.Query/AttestationsByHash", + FullMethod: "/regen.data.v2.Query/AttestationsByHash", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).AttestationsByHash(ctx, req.(*QueryAttestationsByHashRequest)) @@ -1770,7 +1770,7 @@ func _Query_Resolver_Handler(srv interface{}, ctx context.Context, dec func(inte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/regen.data.v1.Query/Resolver", + FullMethod: "/regen.data.v2.Query/Resolver", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Resolver(ctx, req.(*QueryResolverRequest)) @@ -1788,7 +1788,7 @@ func _Query_ResolversByIRI_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/regen.data.v1.Query/ResolversByIRI", + FullMethod: "/regen.data.v2.Query/ResolversByIRI", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).ResolversByIRI(ctx, req.(*QueryResolversByIRIRequest)) @@ -1806,7 +1806,7 @@ func _Query_ResolversByHash_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/regen.data.v1.Query/ResolversByHash", + FullMethod: "/regen.data.v2.Query/ResolversByHash", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).ResolversByHash(ctx, req.(*QueryResolversByHashRequest)) @@ -1824,7 +1824,7 @@ func _Query_ResolversByURL_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/regen.data.v1.Query/ResolversByURL", + FullMethod: "/regen.data.v2.Query/ResolversByURL", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).ResolversByURL(ctx, req.(*QueryResolversByURLRequest)) @@ -1842,7 +1842,7 @@ func _Query_ConvertIRIToHash_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/regen.data.v1.Query/ConvertIRIToHash", + FullMethod: "/regen.data.v2.Query/ConvertIRIToHash", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).ConvertIRIToHash(ctx, req.(*ConvertIRIToHashRequest)) @@ -1860,7 +1860,7 @@ func _Query_ConvertHashToIRI_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/regen.data.v1.Query/ConvertHashToIRI", + FullMethod: "/regen.data.v2.Query/ConvertHashToIRI", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).ConvertHashToIRI(ctx, req.(*ConvertHashToIRIRequest)) @@ -1869,7 +1869,7 @@ func _Query_ConvertHashToIRI_Handler(srv interface{}, ctx context.Context, dec f } var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "regen.data.v1.Query", + ServiceName: "regen.data.v2.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { @@ -1918,7 +1918,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "regen/data/v1/query.proto", + Metadata: "regen/data/v2/query.proto", } func (m *QueryAnchorByIRIRequest) Marshal() (dAtA []byte, err error) { diff --git a/x/data/query.pb.gw.go b/x/data/query.pb.gw.go index e85f33d0fb..a1e8148ee1 100644 --- a/x/data/query.pb.gw.go +++ b/x/data/query.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: regen/data/v1/query.proto +// source: regen/data/v2/query.proto /* Package data is a reverse proxy. @@ -1952,45 +1952,45 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_AnchorByIRI_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"regen", "data", "v1", "anchor-by-iri", "iri"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_AnchorByIRI_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"regen", "data", "v2", "anchor-by-iri", "iri"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_AnchorByIRI_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 4}, []string{"regen", "data", "v1", "anchors", "iri"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_AnchorByIRI_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 4}, []string{"regen", "data", "v2", "anchors", "iri"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_AnchorByHash_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"regen", "data", "v1", "anchor-by-hash"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_AnchorByHash_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"regen", "data", "v2", "anchor-by-hash"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_AnchorByHash_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"regen", "data", "v1", "anchors", "hash"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_AnchorByHash_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"regen", "data", "v2", "anchors", "hash"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_AttestationsByAttestor_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"regen", "data", "v1", "attestations-by-attestor", "attestor"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_AttestationsByAttestor_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"regen", "data", "v2", "attestations-by-attestor", "attestor"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_AttestationsByAttestor_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 4}, []string{"regen", "data", "v1", "attestations", "attestor"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_AttestationsByAttestor_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 4}, []string{"regen", "data", "v2", "attestations", "attestor"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_AttestationsByIRI_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"regen", "data", "v1", "attestations-by-iri", "iri"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_AttestationsByIRI_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"regen", "data", "v2", "attestations-by-iri", "iri"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_AttestationsByIRI_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 4}, []string{"regen", "data", "v1", "attestations", "iri"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_AttestationsByIRI_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 4}, []string{"regen", "data", "v2", "attestations", "iri"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_AttestationsByHash_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"regen", "data", "v1", "attestations-by-hash"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_AttestationsByHash_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"regen", "data", "v2", "attestations-by-hash"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_AttestationsByHash_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"regen", "data", "v1", "attestations", "hash"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_AttestationsByHash_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"regen", "data", "v2", "attestations", "hash"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Resolver_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"regen", "data", "v1", "resolver", "id"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Resolver_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"regen", "data", "v2", "resolver", "id"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Resolver_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"regen", "data", "v1", "resolvers", "id"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Resolver_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"regen", "data", "v2", "resolvers", "id"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_ResolversByIRI_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"regen", "data", "v1", "resolvers-by-iri", "iri"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_ResolversByIRI_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"regen", "data", "v2", "resolvers-by-iri", "iri"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_ResolversByIRI_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 4}, []string{"regen", "data", "v1", "resolvers", "iri"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_ResolversByIRI_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 4}, []string{"regen", "data", "v2", "resolvers", "iri"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_ResolversByHash_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"regen", "data", "v1", "resolvers-by-hash"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_ResolversByHash_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"regen", "data", "v2", "resolvers-by-hash"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_ResolversByHash_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"regen", "data", "v1", "resolvers", "hash"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_ResolversByHash_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"regen", "data", "v2", "resolvers", "hash"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_ResolversByURL_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"regen", "data", "v1", "resolvers-by-url"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_ResolversByURL_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"regen", "data", "v2", "resolvers-by-url"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_ResolversByURL_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"regen", "data", "v1", "resolvers", "url"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_ResolversByURL_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"regen", "data", "v2", "resolvers", "url"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_ConvertIRIToHash_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"regen", "data", "v1", "convert-iri-to-hash", "iri"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_ConvertIRIToHash_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"regen", "data", "v2", "convert-iri-to-hash", "iri"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_ConvertHashToIRI_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"regen", "data", "v1", "convert-hash-to-iri"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_ConvertHashToIRI_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"regen", "data", "v2", "convert-hash-to-iri"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/x/data/server/msg_anchor.go b/x/data/server/msg_anchor.go index 6a0af53436..a18eb43b30 100644 --- a/x/data/server/msg_anchor.go +++ b/x/data/server/msg_anchor.go @@ -12,7 +12,7 @@ import ( api "github.com/regen-network/regen-ledger/api/v2/regen/data/v1" "github.com/regen-network/regen-ledger/types/v2" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) type ToIRI interface { diff --git a/x/data/server/msg_anchor_test.go b/x/data/server/msg_anchor_test.go index 36fabbe40a..97e46c719e 100644 --- a/x/data/server/msg_anchor_test.go +++ b/x/data/server/msg_anchor_test.go @@ -12,7 +12,7 @@ import ( "github.com/regen-network/regen-ledger/types/v2" "github.com/regen-network/regen-ledger/types/v2/testutil" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) type anchorSuite struct { diff --git a/x/data/server/msg_attest.go b/x/data/server/msg_attest.go index 38c5e48218..490fd52050 100644 --- a/x/data/server/msg_attest.go +++ b/x/data/server/msg_attest.go @@ -9,7 +9,7 @@ import ( api "github.com/regen-network/regen-ledger/api/v2/regen/data/v1" "github.com/regen-network/regen-ledger/types/v2" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) // Attest allows for digital signing of an arbitrary piece of data on the blockchain. diff --git a/x/data/server/msg_attest_test.go b/x/data/server/msg_attest_test.go index eb5237744d..83d452e271 100644 --- a/x/data/server/msg_attest_test.go +++ b/x/data/server/msg_attest_test.go @@ -12,7 +12,7 @@ import ( "github.com/regen-network/regen-ledger/types/v2" "github.com/regen-network/regen-ledger/types/v2/testutil" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) type attestSuite struct { diff --git a/x/data/server/msg_define_resolver.go b/x/data/server/msg_define_resolver.go index 88c3080a1a..34cba9161b 100644 --- a/x/data/server/msg_define_resolver.go +++ b/x/data/server/msg_define_resolver.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" sdk "github.com/cosmos/cosmos-sdk/types" api "github.com/regen-network/regen-ledger/api/v2/regen/data/v1" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) // DefineResolver defines a resolver URL and assigns it a new integer ID that can be used in calls to RegisterResolver. diff --git a/x/data/server/msg_define_resolver_test.go b/x/data/server/msg_define_resolver_test.go index 7f73c2acb9..aef585d801 100644 --- a/x/data/server/msg_define_resolver_test.go +++ b/x/data/server/msg_define_resolver_test.go @@ -13,7 +13,7 @@ import ( api "github.com/regen-network/regen-ledger/api/v2/regen/data/v1" "github.com/regen-network/regen-ledger/types/v2/testutil" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) type defineResolverSuite struct { diff --git a/x/data/server/msg_register_resolver.go b/x/data/server/msg_register_resolver.go index 08a00c5179..a80c0ba9a3 100644 --- a/x/data/server/msg_register_resolver.go +++ b/x/data/server/msg_register_resolver.go @@ -8,7 +8,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" api "github.com/regen-network/regen-ledger/api/v2/regen/data/v1" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) // RegisterResolver registers data content hashes to the provided resolver. diff --git a/x/data/server/msg_register_resolver_test.go b/x/data/server/msg_register_resolver_test.go index 5eff8d2cd5..a2aaec6eb0 100644 --- a/x/data/server/msg_register_resolver_test.go +++ b/x/data/server/msg_register_resolver_test.go @@ -14,7 +14,7 @@ import ( "github.com/regen-network/regen-ledger/types/v2" "github.com/regen-network/regen-ledger/types/v2/testutil" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) type registerResolverSuite struct { diff --git a/x/data/server/query_anchor_by_hash.go b/x/data/server/query_anchor_by_hash.go index 8bd6eaf8a6..c3447d8bab 100644 --- a/x/data/server/query_anchor_by_hash.go +++ b/x/data/server/query_anchor_by_hash.go @@ -6,7 +6,7 @@ import ( "github.com/regen-network/regen-ledger/types/v2" regenerrors "github.com/regen-network/regen-ledger/types/v2/errors" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) // AnchorByHash queries a data anchor by the ContentHash of the data. diff --git a/x/data/server/query_anchor_by_hash_test.go b/x/data/server/query_anchor_by_hash_test.go index 482d44cc09..854c837850 100644 --- a/x/data/server/query_anchor_by_hash_test.go +++ b/x/data/server/query_anchor_by_hash_test.go @@ -9,7 +9,7 @@ import ( "google.golang.org/protobuf/types/known/timestamppb" api "github.com/regen-network/regen-ledger/api/v2/regen/data/v1" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) func TestQuery_AnchorByHash(t *testing.T) { diff --git a/x/data/server/query_anchor_by_iri.go b/x/data/server/query_anchor_by_iri.go index 1dd028e653..c20f2ea359 100644 --- a/x/data/server/query_anchor_by_iri.go +++ b/x/data/server/query_anchor_by_iri.go @@ -5,7 +5,7 @@ import ( "github.com/regen-network/regen-ledger/types/v2" regenerrors "github.com/regen-network/regen-ledger/types/v2/errors" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) // AnchorByIRI queries a data anchor by the IRI of the data. diff --git a/x/data/server/query_anchor_by_iri_test.go b/x/data/server/query_anchor_by_iri_test.go index 984181ed42..4124759bd0 100644 --- a/x/data/server/query_anchor_by_iri_test.go +++ b/x/data/server/query_anchor_by_iri_test.go @@ -9,7 +9,7 @@ import ( "google.golang.org/protobuf/types/known/timestamppb" api "github.com/regen-network/regen-ledger/api/v2/regen/data/v1" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) func TestQuery_AnchorByIRI(t *testing.T) { diff --git a/x/data/server/query_attestations_by_attestor.go b/x/data/server/query_attestations_by_attestor.go index ad1c6189d9..5e758a28ea 100644 --- a/x/data/server/query_attestations_by_attestor.go +++ b/x/data/server/query_attestations_by_attestor.go @@ -10,7 +10,7 @@ import ( "github.com/regen-network/regen-ledger/types/v2" regenerrors "github.com/regen-network/regen-ledger/types/v2/errors" "github.com/regen-network/regen-ledger/types/v2/ormutil" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) // AttestationsByAttestor queries data attestations by an attestor. diff --git a/x/data/server/query_attestations_by_attestor_test.go b/x/data/server/query_attestations_by_attestor_test.go index ec15af4daf..07dda1090c 100644 --- a/x/data/server/query_attestations_by_attestor_test.go +++ b/x/data/server/query_attestations_by_attestor_test.go @@ -11,7 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/query" api "github.com/regen-network/regen-ledger/api/v2/regen/data/v1" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) func TestQuery_AttestationsByAttestor(t *testing.T) { diff --git a/x/data/server/query_attestations_by_hash.go b/x/data/server/query_attestations_by_hash.go index dd6376b85d..dc84a7723c 100644 --- a/x/data/server/query_attestations_by_hash.go +++ b/x/data/server/query_attestations_by_hash.go @@ -10,7 +10,7 @@ import ( "github.com/regen-network/regen-ledger/types/v2" regenerrors "github.com/regen-network/regen-ledger/types/v2/errors" "github.com/regen-network/regen-ledger/types/v2/ormutil" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) // AttestationsByHash queries data attestations by the ContentHash of the data. diff --git a/x/data/server/query_attestations_by_hash_test.go b/x/data/server/query_attestations_by_hash_test.go index bcba51117b..75554130f1 100644 --- a/x/data/server/query_attestations_by_hash_test.go +++ b/x/data/server/query_attestations_by_hash_test.go @@ -11,7 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/query" api "github.com/regen-network/regen-ledger/api/v2/regen/data/v1" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) func TestQuery_AttestationsByHash(t *testing.T) { diff --git a/x/data/server/query_attestations_by_iri.go b/x/data/server/query_attestations_by_iri.go index 8c4f9272f8..52a956c88d 100644 --- a/x/data/server/query_attestations_by_iri.go +++ b/x/data/server/query_attestations_by_iri.go @@ -10,7 +10,7 @@ import ( "github.com/regen-network/regen-ledger/types/v2" regenerrors "github.com/regen-network/regen-ledger/types/v2/errors" "github.com/regen-network/regen-ledger/types/v2/ormutil" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) // AttestationsByIRI queries data attestations by the IRI of the data. diff --git a/x/data/server/query_attestations_by_iri_test.go b/x/data/server/query_attestations_by_iri_test.go index 7ed70c85d9..51c1af285b 100644 --- a/x/data/server/query_attestations_by_iri_test.go +++ b/x/data/server/query_attestations_by_iri_test.go @@ -11,7 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/query" api "github.com/regen-network/regen-ledger/api/v2/regen/data/v1" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) func TestQuery_AttestationsByIRI(t *testing.T) { diff --git a/x/data/server/query_convert_hash_to_iri.go b/x/data/server/query_convert_hash_to_iri.go index 6d9b3bdafc..1cb02d059f 100644 --- a/x/data/server/query_convert_hash_to_iri.go +++ b/x/data/server/query_convert_hash_to_iri.go @@ -4,7 +4,7 @@ import ( "context" regenerrors "github.com/regen-network/regen-ledger/types/v2/errors" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) // ConvertHashToIRI converts a ContentHash to an IRI. diff --git a/x/data/server/query_convert_hash_to_iri_test.go b/x/data/server/query_convert_hash_to_iri_test.go index 276cfe95c4..a486ee6713 100644 --- a/x/data/server/query_convert_hash_to_iri_test.go +++ b/x/data/server/query_convert_hash_to_iri_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) func TestQuery_ConvertHashToIRI(t *testing.T) { diff --git a/x/data/server/query_convert_iri_to_hash.go b/x/data/server/query_convert_iri_to_hash.go index bcfc4db776..a9352c09be 100644 --- a/x/data/server/query_convert_iri_to_hash.go +++ b/x/data/server/query_convert_iri_to_hash.go @@ -4,7 +4,7 @@ import ( "context" regenerrors "github.com/regen-network/regen-ledger/types/v2/errors" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) // ConvertIRIToHash converts an IRI to a ContentHash. diff --git a/x/data/server/query_convert_iri_to_hash_test.go b/x/data/server/query_convert_iri_to_hash_test.go index 1a5374b3bb..b3e8b16d95 100644 --- a/x/data/server/query_convert_iri_to_hash_test.go +++ b/x/data/server/query_convert_iri_to_hash_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) func TestQuery_ConvertIRIToHash(t *testing.T) { diff --git a/x/data/server/query_resolver.go b/x/data/server/query_resolver.go index c070e1bcad..d5f8f17c54 100644 --- a/x/data/server/query_resolver.go +++ b/x/data/server/query_resolver.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" regenerrors "github.com/regen-network/regen-ledger/types/v2/errors" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) // Resolver queries a resolver by its unique identifier. diff --git a/x/data/server/query_resolver_test.go b/x/data/server/query_resolver_test.go index 87a50673b6..282470f336 100644 --- a/x/data/server/query_resolver_test.go +++ b/x/data/server/query_resolver_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" api "github.com/regen-network/regen-ledger/api/v2/regen/data/v1" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) func TestQuery_Resolver(t *testing.T) { diff --git a/x/data/server/query_resolvers_by_hash.go b/x/data/server/query_resolvers_by_hash.go index 5d26bc844f..09575a4647 100644 --- a/x/data/server/query_resolvers_by_hash.go +++ b/x/data/server/query_resolvers_by_hash.go @@ -9,7 +9,7 @@ import ( api "github.com/regen-network/regen-ledger/api/v2/regen/data/v1" regenerrors "github.com/regen-network/regen-ledger/types/v2/errors" "github.com/regen-network/regen-ledger/types/v2/ormutil" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) // ResolversByHash queries resolvers with registered data by the ContentHash of the data. diff --git a/x/data/server/query_resolvers_by_hash_test.go b/x/data/server/query_resolvers_by_hash_test.go index 4f7817ddc2..31878c3841 100644 --- a/x/data/server/query_resolvers_by_hash_test.go +++ b/x/data/server/query_resolvers_by_hash_test.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/query" api "github.com/regen-network/regen-ledger/api/v2/regen/data/v1" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) func TestQuery_ResolversByHash(t *testing.T) { diff --git a/x/data/server/query_resolvers_by_iri.go b/x/data/server/query_resolvers_by_iri.go index 173f6a6537..b69058dc40 100644 --- a/x/data/server/query_resolvers_by_iri.go +++ b/x/data/server/query_resolvers_by_iri.go @@ -9,7 +9,7 @@ import ( api "github.com/regen-network/regen-ledger/api/v2/regen/data/v1" regenerrors "github.com/regen-network/regen-ledger/types/v2/errors" "github.com/regen-network/regen-ledger/types/v2/ormutil" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) // ResolversByIRI queries resolvers with registered data by the IRI of the data. diff --git a/x/data/server/query_resolvers_by_iri_test.go b/x/data/server/query_resolvers_by_iri_test.go index b229a95ff9..7116fa07ac 100644 --- a/x/data/server/query_resolvers_by_iri_test.go +++ b/x/data/server/query_resolvers_by_iri_test.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/query" api "github.com/regen-network/regen-ledger/api/v2/regen/data/v1" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) func TestQuery_ResolversByIRI(t *testing.T) { diff --git a/x/data/server/query_resolvers_by_url.go b/x/data/server/query_resolvers_by_url.go index c720603d45..abc4e34b65 100644 --- a/x/data/server/query_resolvers_by_url.go +++ b/x/data/server/query_resolvers_by_url.go @@ -9,7 +9,7 @@ import ( api "github.com/regen-network/regen-ledger/api/v2/regen/data/v1" regenerrors "github.com/regen-network/regen-ledger/types/v2/errors" "github.com/regen-network/regen-ledger/types/v2/ormutil" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) // ResolversByURL queries resolvers by URL. diff --git a/x/data/server/query_resolvers_by_url_test.go b/x/data/server/query_resolvers_by_url_test.go index 1607c1afd7..6c496b95de 100644 --- a/x/data/server/query_resolvers_by_url_test.go +++ b/x/data/server/query_resolvers_by_url_test.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/query" api "github.com/regen-network/regen-ledger/api/v2/regen/data/v1" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) func TestQuery_ResolversByURL(t *testing.T) { diff --git a/x/data/server/server.go b/x/data/server/server.go index 997d56a466..9e9a68320f 100644 --- a/x/data/server/server.go +++ b/x/data/server/server.go @@ -11,8 +11,8 @@ import ( api "github.com/regen-network/regen-ledger/api/v2/regen/data/v1" "github.com/regen-network/regen-ledger/types/v2/ormstore" - "github.com/regen-network/regen-ledger/x/data/v2" - "github.com/regen-network/regen-ledger/x/data/v2/server/hasher" + "github.com/regen-network/regen-ledger/x/data/v3" + "github.com/regen-network/regen-ledger/x/data/v3/server/hasher" ) var _ data.MsgServer = serverImpl{} diff --git a/x/data/server/server_test.go b/x/data/server/server_test.go index 32db6873e6..fa9d7677c3 100644 --- a/x/data/server/server_test.go +++ b/x/data/server/server_test.go @@ -18,7 +18,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/regen-network/regen-ledger/x/data/v2/mocks" + "github.com/regen-network/regen-ledger/x/data/v3/mocks" ) const ( diff --git a/x/data/server/testsuite/genesis.go b/x/data/server/testsuite/genesis.go index df99a330bc..7431320394 100644 --- a/x/data/server/testsuite/genesis.go +++ b/x/data/server/testsuite/genesis.go @@ -11,7 +11,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/regen-network/regen-ledger/types/v2/testutil/fixture" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) type GenesisTestSuite struct { diff --git a/x/data/server/testsuite/suite.go b/x/data/server/testsuite/suite.go index 4226a26c70..1c03ea307a 100644 --- a/x/data/server/testsuite/suite.go +++ b/x/data/server/testsuite/suite.go @@ -11,7 +11,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/regen-network/regen-ledger/types/v2/testutil/fixture" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) type IntegrationTestSuite struct { diff --git a/x/data/server/testsuite/suite_test.go b/x/data/server/testsuite/suite_test.go index 52dd479aa8..a18b17c0fe 100644 --- a/x/data/server/testsuite/suite_test.go +++ b/x/data/server/testsuite/suite_test.go @@ -19,8 +19,8 @@ import ( params "github.com/cosmos/cosmos-sdk/x/params/types/proposal" "github.com/regen-network/regen-ledger/types/v2/testutil/fixture" - "github.com/regen-network/regen-ledger/x/data/v2" - datamodule "github.com/regen-network/regen-ledger/x/data/v2/module" + "github.com/regen-network/regen-ledger/x/data/v3" + datamodule "github.com/regen-network/regen-ledger/x/data/v3/module" ) func TestServer(t *testing.T) { diff --git a/x/data/simulation/genesis.go b/x/data/simulation/genesis.go index 61c2324409..1a1e6c2330 100644 --- a/x/data/simulation/genesis.go +++ b/x/data/simulation/genesis.go @@ -16,8 +16,8 @@ import ( simtypes "github.com/cosmos/cosmos-sdk/types/simulation" api "github.com/regen-network/regen-ledger/api/v2/regen/data/v1" - "github.com/regen-network/regen-ledger/x/data/v2" - "github.com/regen-network/regen-ledger/x/data/v2/server/hasher" + "github.com/regen-network/regen-ledger/x/data/v3" + "github.com/regen-network/regen-ledger/x/data/v3/server/hasher" ) // RandomizedGenState generates a random GenesisState for the data module. diff --git a/x/data/simulation/operations.go b/x/data/simulation/operations.go index 554897408e..de6f3c82af 100644 --- a/x/data/simulation/operations.go +++ b/x/data/simulation/operations.go @@ -14,7 +14,7 @@ import ( simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" - "github.com/regen-network/regen-ledger/x/data/v2" + "github.com/regen-network/regen-ledger/x/data/v3" ) // Simulation operation weights constants diff --git a/x/data/state.pb.go b/x/data/state.pb.go index e4d7286ac2..fdcbaba832 100644 --- a/x/data/state.pb.go +++ b/x/data/state.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: regen/data/v1/state.proto +// source: regen/data/v2/state.proto package data @@ -36,7 +36,7 @@ func (m *DataID) Reset() { *m = DataID{} } func (m *DataID) String() string { return proto.CompactTextString(m) } func (*DataID) ProtoMessage() {} func (*DataID) Descriptor() ([]byte, []int) { - return fileDescriptor_29cc90d94a9e9542, []int{0} + return fileDescriptor_fd916028e0fe6d62, []int{0} } func (m *DataID) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -92,7 +92,7 @@ func (m *DataAnchor) Reset() { *m = DataAnchor{} } func (m *DataAnchor) String() string { return proto.CompactTextString(m) } func (*DataAnchor) ProtoMessage() {} func (*DataAnchor) Descriptor() ([]byte, []int) { - return fileDescriptor_29cc90d94a9e9542, []int{1} + return fileDescriptor_fd916028e0fe6d62, []int{1} } func (m *DataAnchor) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -149,7 +149,7 @@ func (m *DataAttestor) Reset() { *m = DataAttestor{} } func (m *DataAttestor) String() string { return proto.CompactTextString(m) } func (*DataAttestor) ProtoMessage() {} func (*DataAttestor) Descriptor() ([]byte, []int) { - return fileDescriptor_29cc90d94a9e9542, []int{2} + return fileDescriptor_fd916028e0fe6d62, []int{2} } func (m *DataAttestor) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -214,7 +214,7 @@ func (m *Resolver) Reset() { *m = Resolver{} } func (m *Resolver) String() string { return proto.CompactTextString(m) } func (*Resolver) ProtoMessage() {} func (*Resolver) Descriptor() ([]byte, []int) { - return fileDescriptor_29cc90d94a9e9542, []int{3} + return fileDescriptor_fd916028e0fe6d62, []int{3} } func (m *Resolver) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -277,7 +277,7 @@ func (m *DataResolver) Reset() { *m = DataResolver{} } func (m *DataResolver) String() string { return proto.CompactTextString(m) } func (*DataResolver) ProtoMessage() {} func (*DataResolver) Descriptor() ([]byte, []int) { - return fileDescriptor_29cc90d94a9e9542, []int{4} + return fileDescriptor_fd916028e0fe6d62, []int{4} } func (m *DataResolver) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -321,45 +321,45 @@ func (m *DataResolver) GetResolverId() uint64 { } func init() { - proto.RegisterType((*DataID)(nil), "regen.data.v1.DataID") - proto.RegisterType((*DataAnchor)(nil), "regen.data.v1.DataAnchor") - proto.RegisterType((*DataAttestor)(nil), "regen.data.v1.DataAttestor") - proto.RegisterType((*Resolver)(nil), "regen.data.v1.Resolver") - proto.RegisterType((*DataResolver)(nil), "regen.data.v1.DataResolver") + proto.RegisterType((*DataID)(nil), "regen.data.v2.DataID") + proto.RegisterType((*DataAnchor)(nil), "regen.data.v2.DataAnchor") + proto.RegisterType((*DataAttestor)(nil), "regen.data.v2.DataAttestor") + proto.RegisterType((*Resolver)(nil), "regen.data.v2.Resolver") + proto.RegisterType((*DataResolver)(nil), "regen.data.v2.DataResolver") } -func init() { proto.RegisterFile("regen/data/v1/state.proto", fileDescriptor_29cc90d94a9e9542) } +func init() { proto.RegisterFile("regen/data/v2/state.proto", fileDescriptor_fd916028e0fe6d62) } -var fileDescriptor_29cc90d94a9e9542 = []byte{ - // 434 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x31, 0x6f, 0xd3, 0x40, - 0x1c, 0xc5, 0x73, 0x4e, 0x48, 0x93, 0x7f, 0xdc, 0xc8, 0x18, 0x24, 0xae, 0x1e, 0x9c, 0xca, 0x12, - 0xa8, 0x83, 0xf1, 0xa9, 0xb0, 0x20, 0x6f, 0xa0, 0x82, 0xd4, 0xd5, 0x62, 0x82, 0x01, 0x5d, 0xe2, - 0xab, 0x7b, 0xc2, 0xf6, 0x55, 0xe7, 0x73, 0xe0, 0x53, 0x20, 0x76, 0x24, 0x3e, 0x0f, 0x63, 0x25, - 0x16, 0x46, 0x94, 0x7c, 0x03, 0x3e, 0x01, 0xf2, 0xdf, 0x76, 0x5a, 0x44, 0x96, 0x6e, 0xf9, 0xe7, - 0x3d, 0xbf, 0xdf, 0xd3, 0xd3, 0xc1, 0x91, 0x16, 0x99, 0x28, 0x59, 0xca, 0x0d, 0x67, 0xeb, 0x53, - 0x56, 0x19, 0x6e, 0x44, 0x74, 0xa5, 0x95, 0x51, 0xee, 0x21, 0x4a, 0x51, 0x23, 0x45, 0xeb, 0x53, - 0xef, 0xd1, 0x4a, 0x55, 0x85, 0xaa, 0x98, 0xd2, 0x45, 0xe3, 0x54, 0xba, 0x68, 0x7d, 0xde, 0x22, - 0x53, 0x2a, 0xcb, 0x05, 0xc3, 0x6b, 0x59, 0x5f, 0x30, 0x23, 0x0b, 0x51, 0x19, 0x5e, 0x5c, 0xb5, - 0x86, 0xe0, 0x35, 0x8c, 0xcf, 0xb8, 0xe1, 0xe7, 0x67, 0xee, 0x1c, 0x2c, 0x99, 0x52, 0x72, 0x4c, - 0x4e, 0xec, 0xc4, 0x92, 0xa9, 0xeb, 0xc0, 0x50, 0x6a, 0x49, 0xad, 0x63, 0x72, 0x32, 0x4d, 0x9a, - 0x9f, 0xf1, 0xd1, 0x9f, 0xef, 0x3f, 0xbf, 0x0c, 0x1f, 0xc0, 0xa8, 0x71, 0xba, 0x53, 0xd4, 0x1d, - 0x42, 0x09, 0x25, 0xc1, 0x05, 0x40, 0x13, 0xf3, 0xb2, 0x5c, 0x5d, 0x2a, 0xfd, 0x5f, 0xd4, 0x0b, - 0x98, 0xee, 0xb8, 0x18, 0x38, 0x7b, 0xe6, 0x45, 0x6d, 0xb3, 0xa8, 0x6f, 0x16, 0xbd, 0xed, 0x1d, - 0xc9, 0x8d, 0x39, 0x9e, 0x23, 0x72, 0xd2, 0x22, 0xa9, 0x15, 0x7c, 0x23, 0x60, 0x23, 0xc8, 0x18, - 0x51, 0x99, 0x3d, 0x28, 0x0f, 0x26, 0xbc, 0xd3, 0x90, 0x64, 0x27, 0xbb, 0xfb, 0xdf, 0x1a, 0xc3, - 0xbb, 0xd4, 0x78, 0x8c, 0x35, 0x16, 0x70, 0x08, 0x33, 0x99, 0x86, 0xbb, 0x40, 0xfb, 0x06, 0xe6, - 0x10, 0x3a, 0x0c, 0x0c, 0x4c, 0x12, 0x51, 0xa9, 0x7c, 0x2d, 0x6e, 0x17, 0x1b, 0xf5, 0x73, 0xd6, - 0x3a, 0xef, 0xe7, 0xac, 0x75, 0xee, 0x52, 0x38, 0x28, 0x78, 0xc9, 0x33, 0xa1, 0xb1, 0x8c, 0x9d, - 0xf4, 0x67, 0x1c, 0x22, 0xee, 0x09, 0x8c, 0x9b, 0x0c, 0x87, 0xb8, 0x07, 0xf8, 0xad, 0x43, 0xdc, - 0xfb, 0x30, 0xab, 0x75, 0x1e, 0x76, 0x3e, 0xc7, 0xa2, 0x84, 0x8e, 0x82, 0xf7, 0xed, 0x24, 0x7b, - 0xc8, 0xed, 0x24, 0x0b, 0x98, 0xe9, 0x4e, 0xfb, 0xd0, 0x8c, 0x88, 0x95, 0xa0, 0xff, 0xeb, 0x3c, - 0x8d, 0x3d, 0xc4, 0x3d, 0x04, 0x07, 0xe6, 0x32, 0x0d, 0x6f, 0x7b, 0xef, 0xbd, 0x7a, 0xf3, 0x63, - 0xe3, 0x93, 0xeb, 0x8d, 0x4f, 0x7e, 0x6f, 0x7c, 0xf2, 0x75, 0xeb, 0x0f, 0xae, 0xb7, 0xfe, 0xe0, - 0xd7, 0xd6, 0x1f, 0xbc, 0x0b, 0x33, 0x69, 0x2e, 0xeb, 0x65, 0xb4, 0x52, 0x05, 0xc3, 0xd7, 0xf8, - 0xb4, 0x14, 0xe6, 0x93, 0xd2, 0x1f, 0xbb, 0x2b, 0x17, 0x69, 0x26, 0x34, 0xfb, 0x8c, 0xef, 0x77, - 0x39, 0xc6, 0x81, 0x9f, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x54, 0x60, 0xff, 0xb0, 0xd4, 0x02, - 0x00, 0x00, +var fileDescriptor_fd916028e0fe6d62 = []byte{ + // 435 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0x86, 0xb3, 0x4e, 0x48, 0x93, 0x89, 0x1b, 0x19, 0x83, 0xc4, 0xd6, 0x07, 0xa7, 0xb2, 0x04, + 0xea, 0xc1, 0x78, 0x45, 0xb8, 0xa0, 0xdc, 0x40, 0x05, 0xa9, 0x57, 0x8b, 0x13, 0x1c, 0xd0, 0x26, + 0xde, 0xba, 0x2b, 0x6c, 0x6f, 0xb5, 0x5e, 0x1b, 0x9e, 0x02, 0x71, 0x47, 0xe2, 0x79, 0x38, 0x56, + 0xe2, 0xc2, 0x11, 0x25, 0x6f, 0xc0, 0x13, 0x20, 0x8f, 0xed, 0xb4, 0x88, 0x5e, 0x7a, 0xb2, 0xc7, + 0xf3, 0xfb, 0xff, 0x7e, 0xfd, 0x1a, 0x38, 0xd2, 0x22, 0x15, 0x05, 0x4b, 0xb8, 0xe1, 0xac, 0x5e, + 0xb2, 0xd2, 0x70, 0x23, 0xa2, 0x4b, 0xad, 0x8c, 0x72, 0x0f, 0x71, 0x15, 0x35, 0xab, 0xa8, 0x5e, + 0x7a, 0x8f, 0x36, 0xaa, 0xcc, 0x55, 0xc9, 0x94, 0xce, 0x59, 0xfd, 0xac, 0x79, 0xb4, 0x3a, 0x6f, + 0x91, 0x2a, 0x95, 0x66, 0x82, 0xe1, 0xb4, 0xae, 0xce, 0x99, 0x91, 0xb9, 0x28, 0x0d, 0xcf, 0x2f, + 0x5b, 0x41, 0xf0, 0x1a, 0xc6, 0xa7, 0xdc, 0xf0, 0xb3, 0x53, 0x77, 0x0e, 0x96, 0x4c, 0x28, 0x39, + 0x26, 0x27, 0x76, 0x6c, 0xc9, 0xc4, 0x75, 0x60, 0x28, 0xb5, 0xa4, 0xd6, 0x31, 0x39, 0x99, 0xc6, + 0xcd, 0xeb, 0xea, 0xe8, 0xcf, 0xf7, 0x9f, 0x5f, 0x86, 0x0f, 0x60, 0xd4, 0x28, 0xdd, 0x29, 0xee, + 0x1d, 0x42, 0x09, 0x25, 0xc1, 0x39, 0x40, 0x63, 0xf3, 0xb2, 0xd8, 0x5c, 0x28, 0xfd, 0x9f, 0xd5, + 0x0b, 0x98, 0xee, 0xb9, 0x68, 0x38, 0x5b, 0x7a, 0x51, 0x9b, 0x2c, 0xea, 0x93, 0x45, 0x6f, 0x7b, + 0x45, 0x7c, 0x2d, 0x5e, 0xcd, 0x11, 0x39, 0x69, 0x91, 0xd4, 0x0a, 0xbe, 0x11, 0xb0, 0x11, 0x64, + 0x8c, 0x28, 0xcd, 0x2d, 0x28, 0x0f, 0x26, 0xbc, 0xdb, 0x21, 0xc9, 0x8e, 0xf7, 0xf3, 0xbf, 0x31, + 0x86, 0x77, 0x89, 0xf1, 0x18, 0x63, 0x2c, 0xe0, 0x10, 0x66, 0x32, 0x09, 0xf7, 0x86, 0xf6, 0x35, + 0xcc, 0x21, 0x74, 0x18, 0x18, 0x98, 0xc4, 0xa2, 0x54, 0x59, 0x2d, 0x6e, 0x06, 0x1b, 0xf5, 0x75, + 0x56, 0x3a, 0xeb, 0xeb, 0xac, 0x74, 0xe6, 0x52, 0x38, 0xc8, 0x79, 0xc1, 0x53, 0xa1, 0x31, 0x8c, + 0x1d, 0xf7, 0xe3, 0x2a, 0x44, 0xdc, 0x13, 0x18, 0x37, 0x1e, 0x0e, 0x71, 0x0f, 0xf0, 0x5f, 0x87, + 0xb8, 0xf7, 0x61, 0x56, 0xe9, 0x2c, 0xec, 0x74, 0x8e, 0x45, 0x09, 0x1d, 0x05, 0xef, 0xdb, 0x4a, + 0x6e, 0x21, 0xb7, 0x95, 0x2c, 0x60, 0xa6, 0xbb, 0xdd, 0x87, 0xa6, 0x44, 0x8c, 0x04, 0xfd, 0xa7, + 0xb3, 0x64, 0xe5, 0x21, 0xee, 0x21, 0x38, 0x30, 0x97, 0x49, 0x78, 0x53, 0x7b, 0xef, 0xd5, 0x9b, + 0x1f, 0x5b, 0x9f, 0x5c, 0x6d, 0x7d, 0xf2, 0x7b, 0xeb, 0x93, 0xaf, 0x3b, 0x7f, 0x70, 0xb5, 0xf3, + 0x07, 0xbf, 0x76, 0xfe, 0xe0, 0x5d, 0x98, 0x4a, 0x73, 0x51, 0xad, 0xa3, 0x8d, 0xca, 0x19, 0x5e, + 0xe3, 0xd3, 0x42, 0x98, 0x4f, 0x4a, 0x7f, 0xec, 0xa6, 0x4c, 0x24, 0xa9, 0xd0, 0xec, 0x33, 0xde, + 0xef, 0x7a, 0x8c, 0x05, 0x3f, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x02, 0xe5, 0xfa, 0xd5, 0xd4, + 0x02, 0x00, 0x00, } func (m *DataID) Marshal() (dAtA []byte, err error) { diff --git a/x/data/tx.pb.go b/x/data/tx.pb.go index f47718a733..7433cbf84e 100644 --- a/x/data/tx.pb.go +++ b/x/data/tx.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: regen/data/v1/tx.proto +// source: regen/data/v2/tx.proto package data @@ -43,7 +43,7 @@ func (m *MsgAnchor) Reset() { *m = MsgAnchor{} } func (m *MsgAnchor) String() string { return proto.CompactTextString(m) } func (*MsgAnchor) ProtoMessage() {} func (*MsgAnchor) Descriptor() ([]byte, []int) { - return fileDescriptor_c87f072557099c45, []int{0} + return fileDescriptor_322407e7af703c0f, []int{0} } func (m *MsgAnchor) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -98,7 +98,7 @@ func (m *MsgAnchorResponse) Reset() { *m = MsgAnchorResponse{} } func (m *MsgAnchorResponse) String() string { return proto.CompactTextString(m) } func (*MsgAnchorResponse) ProtoMessage() {} func (*MsgAnchorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c87f072557099c45, []int{1} + return fileDescriptor_322407e7af703c0f, []int{1} } func (m *MsgAnchorResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -158,7 +158,7 @@ func (m *MsgAttest) Reset() { *m = MsgAttest{} } func (m *MsgAttest) String() string { return proto.CompactTextString(m) } func (*MsgAttest) ProtoMessage() {} func (*MsgAttest) Descriptor() ([]byte, []int) { - return fileDescriptor_c87f072557099c45, []int{2} + return fileDescriptor_322407e7af703c0f, []int{2} } func (m *MsgAttest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -215,7 +215,7 @@ func (m *MsgAttestResponse) Reset() { *m = MsgAttestResponse{} } func (m *MsgAttestResponse) String() string { return proto.CompactTextString(m) } func (*MsgAttestResponse) ProtoMessage() {} func (*MsgAttestResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c87f072557099c45, []int{3} + return fileDescriptor_322407e7af703c0f, []int{3} } func (m *MsgAttestResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -277,7 +277,7 @@ func (m *MsgDefineResolver) Reset() { *m = MsgDefineResolver{} } func (m *MsgDefineResolver) String() string { return proto.CompactTextString(m) } func (*MsgDefineResolver) ProtoMessage() {} func (*MsgDefineResolver) Descriptor() ([]byte, []int) { - return fileDescriptor_c87f072557099c45, []int{4} + return fileDescriptor_322407e7af703c0f, []int{4} } func (m *MsgDefineResolver) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -331,7 +331,7 @@ func (m *MsgDefineResolverResponse) Reset() { *m = MsgDefineResolverResp func (m *MsgDefineResolverResponse) String() string { return proto.CompactTextString(m) } func (*MsgDefineResolverResponse) ProtoMessage() {} func (*MsgDefineResolverResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c87f072557099c45, []int{5} + return fileDescriptor_322407e7af703c0f, []int{5} } func (m *MsgDefineResolverResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -383,7 +383,7 @@ func (m *MsgRegisterResolver) Reset() { *m = MsgRegisterResolver{} } func (m *MsgRegisterResolver) String() string { return proto.CompactTextString(m) } func (*MsgRegisterResolver) ProtoMessage() {} func (*MsgRegisterResolver) Descriptor() ([]byte, []int) { - return fileDescriptor_c87f072557099c45, []int{6} + return fileDescriptor_322407e7af703c0f, []int{6} } func (m *MsgRegisterResolver) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -441,7 +441,7 @@ func (m *MsgRegisterResolverResponse) Reset() { *m = MsgRegisterResolver func (m *MsgRegisterResolverResponse) String() string { return proto.CompactTextString(m) } func (*MsgRegisterResolverResponse) ProtoMessage() {} func (*MsgRegisterResolverResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c87f072557099c45, []int{7} + return fileDescriptor_322407e7af703c0f, []int{7} } func (m *MsgRegisterResolverResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -471,56 +471,56 @@ func (m *MsgRegisterResolverResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRegisterResolverResponse proto.InternalMessageInfo func init() { - proto.RegisterType((*MsgAnchor)(nil), "regen.data.v1.MsgAnchor") - proto.RegisterType((*MsgAnchorResponse)(nil), "regen.data.v1.MsgAnchorResponse") - proto.RegisterType((*MsgAttest)(nil), "regen.data.v1.MsgAttest") - proto.RegisterType((*MsgAttestResponse)(nil), "regen.data.v1.MsgAttestResponse") - proto.RegisterType((*MsgDefineResolver)(nil), "regen.data.v1.MsgDefineResolver") - proto.RegisterType((*MsgDefineResolverResponse)(nil), "regen.data.v1.MsgDefineResolverResponse") - proto.RegisterType((*MsgRegisterResolver)(nil), "regen.data.v1.MsgRegisterResolver") - proto.RegisterType((*MsgRegisterResolverResponse)(nil), "regen.data.v1.MsgRegisterResolverResponse") -} - -func init() { proto.RegisterFile("regen/data/v1/tx.proto", fileDescriptor_c87f072557099c45) } - -var fileDescriptor_c87f072557099c45 = []byte{ - // 566 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xc1, 0x6e, 0xd3, 0x30, - 0x18, 0xc7, 0x97, 0x76, 0x2a, 0xd4, 0x6d, 0xa7, 0x61, 0xa4, 0x91, 0x05, 0x91, 0x85, 0x9c, 0xaa, - 0x09, 0x12, 0xad, 0x5c, 0x50, 0x05, 0x87, 0xc1, 0xc4, 0xe0, 0xd0, 0x4b, 0x04, 0x17, 0x84, 0xa8, - 0xdc, 0xf6, 0x9b, 0x13, 0xd1, 0xc4, 0x95, 0xed, 0x96, 0x71, 0x42, 0xe2, 0x09, 0x78, 0x05, 0xde, - 0x80, 0xc7, 0xe0, 0x38, 0x89, 0x0b, 0x47, 0xd4, 0x1e, 0x78, 0x0d, 0x14, 0x27, 0xf1, 0xd6, 0xb4, - 0xa3, 0x07, 0x6e, 0xfe, 0xec, 0xff, 0xf7, 0xff, 0xfb, 0xd7, 0xcf, 0x29, 0xda, 0xe3, 0x40, 0x21, - 0xf1, 0x47, 0x44, 0x12, 0x7f, 0x76, 0xe4, 0xcb, 0x73, 0x6f, 0xc2, 0x99, 0x64, 0xb8, 0xa5, 0xf6, - 0xbd, 0x74, 0xdf, 0x9b, 0x1d, 0x59, 0x77, 0x86, 0x4c, 0xc4, 0x4c, 0xf8, 0xb1, 0xa0, 0xa9, 0x2c, - 0x16, 0x34, 0xd3, 0x59, 0x07, 0x94, 0x31, 0x3a, 0x06, 0x5f, 0x55, 0x83, 0xe9, 0x99, 0x2f, 0xa3, - 0x18, 0x84, 0x24, 0xf1, 0x24, 0x17, 0xec, 0x97, 0x02, 0x3e, 0x4d, 0x40, 0x64, 0x47, 0x2e, 0x43, - 0xf5, 0x9e, 0xa0, 0xc7, 0xc9, 0x30, 0x64, 0x1c, 0xef, 0xa1, 0x9a, 0x80, 0x64, 0x04, 0xdc, 0x34, - 0x1c, 0xa3, 0x5d, 0x0f, 0xf2, 0x0a, 0x3f, 0x45, 0xcd, 0x21, 0x4b, 0x24, 0x24, 0xb2, 0x1f, 0x12, - 0x11, 0x9a, 0x15, 0xc7, 0x68, 0x37, 0x3a, 0x96, 0xb7, 0x74, 0x3f, 0xef, 0x79, 0x26, 0x79, 0x49, - 0x44, 0x18, 0x34, 0x86, 0x97, 0x45, 0xb7, 0xf1, 0xe5, 0xcf, 0xf7, 0xc3, 0xdc, 0xcb, 0xed, 0xa3, - 0x5b, 0x3a, 0x30, 0x00, 0x31, 0x61, 0x89, 0x00, 0xbc, 0x8b, 0xaa, 0x11, 0x8f, 0xf2, 0xd4, 0x74, - 0x89, 0x1f, 0xa3, 0xba, 0xa6, 0xd0, 0x79, 0x19, 0xa7, 0x57, 0x70, 0x7a, 0xaf, 0x0b, 0x45, 0x70, - 0x29, 0x76, 0x3f, 0x67, 0x44, 0x52, 0x82, 0x90, 0xd8, 0x42, 0x37, 0x89, 0x5a, 0xb1, 0x82, 0x49, - 0xd7, 0xf8, 0x14, 0xed, 0x5c, 0xa5, 0x02, 0x61, 0x56, 0x9c, 0x6a, 0xbb, 0xd1, 0x71, 0xae, 0xe7, - 0xf2, 0x4e, 0x39, 0x99, 0x84, 0x41, 0xeb, 0x0a, 0x1d, 0x88, 0x6e, 0x2b, 0xe5, 0xd3, 0xbe, 0x2e, - 0xc9, 0x08, 0x55, 0xa9, 0x09, 0x31, 0xda, 0x8e, 0x78, 0x24, 0x4c, 0xc3, 0xa9, 0xb6, 0xeb, 0x81, - 0x5a, 0xff, 0x07, 0xe3, 0x7b, 0x15, 0x71, 0x02, 0x67, 0x51, 0x02, 0x01, 0x08, 0x36, 0x9e, 0x01, - 0xc7, 0x26, 0xba, 0x11, 0x93, 0x84, 0x50, 0x3d, 0xbe, 0xa2, 0xc4, 0xf7, 0x51, 0x93, 0xe7, 0xaa, - 0xfe, 0x94, 0x8f, 0x55, 0x56, 0x3d, 0x68, 0x14, 0x7b, 0x6f, 0xf8, 0xb8, 0xdb, 0x4c, 0x19, 0x8a, - 0x06, 0xf7, 0x09, 0xda, 0x5f, 0xf1, 0xd7, 0x28, 0x07, 0x48, 0x77, 0xf6, 0xa3, 0x91, 0xca, 0xda, - 0x0e, 0x50, 0xb1, 0xf5, 0x6a, 0xe4, 0x7e, 0x33, 0xd0, 0xed, 0x9e, 0xa0, 0x01, 0xd0, 0x48, 0x48, - 0xd5, 0xb8, 0xe9, 0x82, 0x25, 0xcb, 0x4a, 0xd9, 0x12, 0x1f, 0xaf, 0xcc, 0xaa, 0xaa, 0x66, 0xf5, - 0xaf, 0x37, 0x58, 0x9a, 0xd2, 0x32, 0xe1, 0x3d, 0x74, 0x77, 0xcd, 0x15, 0x0b, 0xc6, 0xce, 0xcf, - 0x0a, 0xaa, 0xf6, 0x04, 0xc5, 0x27, 0xa8, 0x96, 0x7f, 0x1b, 0x66, 0x29, 0x49, 0x3f, 0x62, 0xcb, - 0xb9, 0xee, 0x44, 0xff, 0x62, 0xa9, 0x4b, 0xf6, 0x1e, 0xd7, 0xb9, 0xa8, 0x93, 0xb5, 0x2e, 0xcb, - 0x4f, 0xe8, 0x1d, 0xda, 0x29, 0x4d, 0x7c, 0x4d, 0xcf, 0xb2, 0xc2, 0x6a, 0x6f, 0x52, 0x68, 0xf7, - 0x01, 0xda, 0x5d, 0x19, 0x98, 0xbb, 0xda, 0x5d, 0xd6, 0x58, 0x87, 0x9b, 0x35, 0x45, 0xc6, 0xb3, - 0x17, 0x3f, 0xe6, 0xb6, 0x71, 0x31, 0xb7, 0x8d, 0xdf, 0x73, 0xdb, 0xf8, 0xba, 0xb0, 0xb7, 0x2e, - 0x16, 0xf6, 0xd6, 0xaf, 0x85, 0xbd, 0xf5, 0xf6, 0x01, 0x8d, 0x64, 0x38, 0x1d, 0x78, 0x43, 0x16, - 0xfb, 0xca, 0xef, 0x61, 0x02, 0xf2, 0x23, 0xe3, 0x1f, 0xf2, 0x6a, 0x0c, 0x23, 0x0a, 0xdc, 0x3f, - 0x57, 0xff, 0x61, 0x83, 0x9a, 0xfa, 0x3a, 0x1e, 0xfd, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x42, 0x0b, - 0x01, 0x31, 0x39, 0x05, 0x00, 0x00, + proto.RegisterType((*MsgAnchor)(nil), "regen.data.v2.MsgAnchor") + proto.RegisterType((*MsgAnchorResponse)(nil), "regen.data.v2.MsgAnchorResponse") + proto.RegisterType((*MsgAttest)(nil), "regen.data.v2.MsgAttest") + proto.RegisterType((*MsgAttestResponse)(nil), "regen.data.v2.MsgAttestResponse") + proto.RegisterType((*MsgDefineResolver)(nil), "regen.data.v2.MsgDefineResolver") + proto.RegisterType((*MsgDefineResolverResponse)(nil), "regen.data.v2.MsgDefineResolverResponse") + proto.RegisterType((*MsgRegisterResolver)(nil), "regen.data.v2.MsgRegisterResolver") + proto.RegisterType((*MsgRegisterResolverResponse)(nil), "regen.data.v2.MsgRegisterResolverResponse") +} + +func init() { proto.RegisterFile("regen/data/v2/tx.proto", fileDescriptor_322407e7af703c0f) } + +var fileDescriptor_322407e7af703c0f = []byte{ + // 569 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xc1, 0x6e, 0xd3, 0x4c, + 0x14, 0x85, 0xe3, 0xa4, 0xca, 0xff, 0xe7, 0x26, 0xa9, 0xca, 0x20, 0x15, 0xd7, 0x08, 0xd7, 0x78, + 0x15, 0x55, 0x60, 0x8b, 0xb0, 0x41, 0x11, 0x2c, 0x0a, 0x15, 0x85, 0x45, 0x36, 0x16, 0x6c, 0x10, + 0x22, 0x72, 0x92, 0x5b, 0xdb, 0x22, 0xf6, 0x44, 0x33, 0x93, 0x50, 0x56, 0x48, 0x3c, 0x01, 0xaf, + 0xc0, 0x1b, 0xf0, 0x18, 0x2c, 0x2b, 0xb1, 0x61, 0x89, 0x92, 0x05, 0xaf, 0x81, 0x3c, 0xb6, 0xa7, + 0x8d, 0x93, 0x92, 0x05, 0xab, 0xce, 0x9d, 0x39, 0xf7, 0x9c, 0xf9, 0x7a, 0xc7, 0x81, 0x7d, 0x86, + 0x01, 0x26, 0xee, 0xd8, 0x17, 0xbe, 0x3b, 0xef, 0xba, 0xe2, 0xdc, 0x99, 0x32, 0x2a, 0x28, 0x69, + 0xcb, 0x7d, 0x27, 0xdd, 0x77, 0xe6, 0x5d, 0xe3, 0xd6, 0x88, 0xf2, 0x98, 0x72, 0x37, 0xe6, 0x81, + 0x3b, 0x7f, 0x90, 0xfe, 0xc9, 0x74, 0xc6, 0x61, 0x40, 0x69, 0x30, 0x41, 0x57, 0x56, 0xc3, 0xd9, + 0x99, 0x2b, 0xa2, 0x18, 0xb9, 0xf0, 0xe3, 0x69, 0x2e, 0x38, 0x28, 0x05, 0x7c, 0x9c, 0x22, 0xcf, + 0x8e, 0x6c, 0x0a, 0x8d, 0x3e, 0x0f, 0x8e, 0x93, 0x51, 0x48, 0x19, 0xd9, 0x87, 0x3a, 0xc7, 0x64, + 0x8c, 0x4c, 0xd7, 0x2c, 0xad, 0xd3, 0xf0, 0xf2, 0x8a, 0x3c, 0x81, 0xd6, 0x88, 0x26, 0x02, 0x13, + 0x31, 0x08, 0x7d, 0x1e, 0xea, 0x55, 0x4b, 0xeb, 0x34, 0xbb, 0x86, 0xb3, 0x72, 0x3f, 0xe7, 0x59, + 0x26, 0x79, 0xe1, 0xf3, 0xd0, 0x6b, 0x8e, 0x2e, 0x8b, 0x5e, 0xf3, 0xf3, 0xef, 0x6f, 0x47, 0xb9, + 0x97, 0x3d, 0x80, 0x1b, 0x2a, 0xd0, 0x43, 0x3e, 0xa5, 0x09, 0x47, 0xb2, 0x07, 0xb5, 0x88, 0x45, + 0x79, 0x6a, 0xba, 0x24, 0x8f, 0xa0, 0xa1, 0x28, 0x54, 0x5e, 0xc6, 0xe9, 0x14, 0x9c, 0xce, 0xab, + 0x42, 0xe1, 0x5d, 0x8a, 0xed, 0x4f, 0x19, 0x91, 0x10, 0xc8, 0x05, 0x31, 0xe0, 0x7f, 0x5f, 0xae, + 0x68, 0xc1, 0xa4, 0x6a, 0x72, 0x0a, 0xbb, 0x57, 0xa9, 0x90, 0xeb, 0x55, 0xab, 0xd6, 0x69, 0x76, + 0xad, 0xeb, 0xb9, 0x9c, 0x53, 0xe6, 0x4f, 0x43, 0xaf, 0x7d, 0x85, 0x0e, 0x79, 0xaf, 0x9d, 0xf2, + 0x29, 0x5f, 0xdb, 0xcf, 0x08, 0x65, 0xa9, 0x08, 0x09, 0xec, 0x44, 0x2c, 0xe2, 0xba, 0x66, 0xd5, + 0x3a, 0x0d, 0x4f, 0xae, 0xff, 0x81, 0xf1, 0x9d, 0x8c, 0x38, 0xc1, 0xb3, 0x28, 0x41, 0x0f, 0x39, + 0x9d, 0xcc, 0x91, 0x11, 0x1d, 0xfe, 0x8b, 0xfd, 0xc4, 0x0f, 0xd4, 0xf8, 0x8a, 0x92, 0xdc, 0x85, + 0x16, 0xcb, 0x55, 0x83, 0x19, 0x9b, 0xc8, 0xac, 0x86, 0xd7, 0x2c, 0xf6, 0x5e, 0xb3, 0x49, 0xaf, + 0x95, 0x32, 0x14, 0x0d, 0xf6, 0x63, 0x38, 0x58, 0xf3, 0x57, 0x28, 0x87, 0xa0, 0x3a, 0x07, 0xd1, + 0x58, 0x66, 0xed, 0x78, 0x50, 0x6c, 0xbd, 0x1c, 0xdb, 0x5f, 0x35, 0xb8, 0xd9, 0xe7, 0x81, 0x87, + 0x41, 0xc4, 0x85, 0x6c, 0xdc, 0x76, 0xc1, 0x92, 0x65, 0xb5, 0x6c, 0x49, 0x8e, 0xd7, 0x66, 0x55, + 0x93, 0xb3, 0xfa, 0xdb, 0x1b, 0x2c, 0x4d, 0x69, 0x95, 0xf0, 0x0e, 0xdc, 0xde, 0x70, 0xc5, 0x82, + 0xb1, 0xfb, 0xa3, 0x0a, 0xb5, 0x3e, 0x0f, 0xc8, 0x09, 0xd4, 0xf3, 0x6f, 0x43, 0x2f, 0x25, 0xa9, + 0x47, 0x6c, 0x58, 0xd7, 0x9d, 0xa8, 0xff, 0x58, 0xea, 0x92, 0xbd, 0xc7, 0x4d, 0x2e, 0xf2, 0x64, + 0xa3, 0xcb, 0xea, 0x13, 0x7a, 0x0b, 0xbb, 0xa5, 0x89, 0x6f, 0xe8, 0x59, 0x55, 0x18, 0x9d, 0x6d, + 0x0a, 0xe5, 0x3e, 0x84, 0xbd, 0xb5, 0x81, 0xd9, 0xeb, 0xdd, 0x65, 0x8d, 0x71, 0xb4, 0x5d, 0x53, + 0x64, 0x3c, 0x7d, 0xfe, 0x7d, 0x61, 0x6a, 0x17, 0x0b, 0x53, 0xfb, 0xb5, 0x30, 0xb5, 0x2f, 0x4b, + 0xb3, 0x72, 0xb1, 0x34, 0x2b, 0x3f, 0x97, 0x66, 0xe5, 0xcd, 0xbd, 0x20, 0x12, 0xe1, 0x6c, 0xe8, + 0x8c, 0x68, 0xec, 0x4a, 0xbf, 0xfb, 0x09, 0x8a, 0x0f, 0x94, 0xbd, 0xcf, 0xab, 0x09, 0x8e, 0x03, + 0x64, 0xee, 0xb9, 0xfc, 0x0d, 0x1b, 0xd6, 0xe5, 0xd7, 0xf1, 0xf0, 0x4f, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x50, 0x95, 0x9c, 0x37, 0x39, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -583,7 +583,7 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { func (c *msgClient) Anchor(ctx context.Context, in *MsgAnchor, opts ...grpc.CallOption) (*MsgAnchorResponse, error) { out := new(MsgAnchorResponse) - err := c.cc.Invoke(ctx, "/regen.data.v1.Msg/Anchor", in, out, opts...) + err := c.cc.Invoke(ctx, "/regen.data.v2.Msg/Anchor", in, out, opts...) if err != nil { return nil, err } @@ -592,7 +592,7 @@ func (c *msgClient) Anchor(ctx context.Context, in *MsgAnchor, opts ...grpc.Call func (c *msgClient) Attest(ctx context.Context, in *MsgAttest, opts ...grpc.CallOption) (*MsgAttestResponse, error) { out := new(MsgAttestResponse) - err := c.cc.Invoke(ctx, "/regen.data.v1.Msg/Attest", in, out, opts...) + err := c.cc.Invoke(ctx, "/regen.data.v2.Msg/Attest", in, out, opts...) if err != nil { return nil, err } @@ -601,7 +601,7 @@ func (c *msgClient) Attest(ctx context.Context, in *MsgAttest, opts ...grpc.Call func (c *msgClient) DefineResolver(ctx context.Context, in *MsgDefineResolver, opts ...grpc.CallOption) (*MsgDefineResolverResponse, error) { out := new(MsgDefineResolverResponse) - err := c.cc.Invoke(ctx, "/regen.data.v1.Msg/DefineResolver", in, out, opts...) + err := c.cc.Invoke(ctx, "/regen.data.v2.Msg/DefineResolver", in, out, opts...) if err != nil { return nil, err } @@ -610,7 +610,7 @@ func (c *msgClient) DefineResolver(ctx context.Context, in *MsgDefineResolver, o func (c *msgClient) RegisterResolver(ctx context.Context, in *MsgRegisterResolver, opts ...grpc.CallOption) (*MsgRegisterResolverResponse, error) { out := new(MsgRegisterResolverResponse) - err := c.cc.Invoke(ctx, "/regen.data.v1.Msg/RegisterResolver", in, out, opts...) + err := c.cc.Invoke(ctx, "/regen.data.v2.Msg/RegisterResolver", in, out, opts...) if err != nil { return nil, err } @@ -688,7 +688,7 @@ func _Msg_Anchor_Handler(srv interface{}, ctx context.Context, dec func(interfac } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/regen.data.v1.Msg/Anchor", + FullMethod: "/regen.data.v2.Msg/Anchor", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).Anchor(ctx, req.(*MsgAnchor)) @@ -706,7 +706,7 @@ func _Msg_Attest_Handler(srv interface{}, ctx context.Context, dec func(interfac } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/regen.data.v1.Msg/Attest", + FullMethod: "/regen.data.v2.Msg/Attest", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).Attest(ctx, req.(*MsgAttest)) @@ -724,7 +724,7 @@ func _Msg_DefineResolver_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/regen.data.v1.Msg/DefineResolver", + FullMethod: "/regen.data.v2.Msg/DefineResolver", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).DefineResolver(ctx, req.(*MsgDefineResolver)) @@ -742,7 +742,7 @@ func _Msg_RegisterResolver_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/regen.data.v1.Msg/RegisterResolver", + FullMethod: "/regen.data.v2.Msg/RegisterResolver", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).RegisterResolver(ctx, req.(*MsgRegisterResolver)) @@ -751,7 +751,7 @@ func _Msg_RegisterResolver_Handler(srv interface{}, ctx context.Context, dec fun } var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "regen.data.v1.Msg", + ServiceName: "regen.data.v2.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { @@ -772,7 +772,7 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "regen/data/v1/tx.proto", + Metadata: "regen/data/v2/tx.proto", } func (m *MsgAnchor) Marshal() (dAtA []byte, err error) { diff --git a/x/data/types.go b/x/data/types.go index 0852804a76..0b3967ec1d 100644 --- a/x/data/types.go +++ b/x/data/types.go @@ -13,62 +13,56 @@ var DigestAlgorithmLength = map[DigestAlgorithm]int{ func (ch ContentHash) Validate() error { hashRaw := ch.GetRaw() hashGraph := ch.GetGraph() - hashRawV2 := ch.GetRawV2() - hashGraphV2 := ch.GetGraphV2() - - // check that only one of the fields is set - nonNilCount := 0 - if hashRaw != nil { - nonNilCount++ - } - if hashGraph != nil { - nonNilCount++ - } - if hashRawV2 != nil { - nonNilCount++ - } - if hashGraphV2 != nil { - nonNilCount++ - } - if nonNilCount != 1 { - return sdkerrors.ErrInvalidRequest.Wrapf("exactly one of ContentHash's fields should be set") - } switch { + case hashRaw != nil && hashGraph != nil: + return sdkerrors.ErrInvalidRequest.Wrapf("content hash must be one of raw type or graph type") case hashRaw != nil: return hashRaw.Validate() case hashGraph != nil: return hashGraph.Validate() - case hashRawV2 != nil: - return hashRawV2.Validate() - case hashGraphV2 != nil: - return hashGraphV2.Validate() } return sdkerrors.ErrInvalidRequest.Wrapf("content hash must be one of raw type or graph type") } -func (chr ContentHash_Raw) Validate() error { - err := chr.DigestAlgorithm.Validate(chr.Hash) +func (chr *ContentHash_Raw) Validate() error { + err := validateHash(chr.Hash, chr.DigestAlgorithm) if err != nil { return err } - return chr.MediaType.Validate() + ext := chr.FileExtension + extLen := len(ext) + if extLen < 2 { + return sdkerrors.ErrInvalidRequest.Wrapf("file extension cannot be shorter than 2 characters") + } + + if extLen > 6 { + return sdkerrors.ErrInvalidRequest.Wrapf("file extension cannot be longer than 6 characters") + } + + // check that ext is all lowercase or numeric + for _, c := range ext { + if c < '0' || c > '9' && c < 'a' || c > 'z' { + return sdkerrors.ErrInvalidRequest.Wrapf("file extension must be all lowercase or numeric") + } + } + + return nil } -func (chg ContentHash_Graph) Validate() error { - err := chg.DigestAlgorithm.Validate(chg.Hash) +func (chg *ContentHash_Graph) Validate() error { + err := validateHash(chg.Hash, chg.DigestAlgorithm) if err != nil { return err } - err = chg.CanonicalizationAlgorithm.Validate() - if err != nil { - return err + if chg.CanonicalizationAlgorithm == 0 { + return sdkerrors.ErrInvalidRequest.Wrapf("canonicalization algorithm cannot be empty") } - return chg.MerkleTree.Validate() + return nil } func (da DigestAlgorithm) Validate(hash []byte) error { @@ -93,14 +87,6 @@ func (da DigestAlgorithm) Validate(hash []byte) error { return nil } -func (rmt RawMediaType) Validate() error { - if _, ok := RawMediaType_name[int32(rmt)]; !ok { - return sdkerrors.ErrInvalidRequest.Wrapf("unknown %T %d", rmt, rmt) - } - - return nil -} - func (gca GraphCanonicalizationAlgorithm) Validate() error { if _, ok := GraphCanonicalizationAlgorithm_name[int32(gca)]; !ok { return sdkerrors.ErrInvalidRequest.Wrapf("unknown %T %d", gca, gca) @@ -121,45 +107,6 @@ func (gmt GraphMerkleTree) Validate() error { return nil } -func (chr *ContentHash_RawV2) Validate() error { - err := validateHash(chr.Hash, chr.DigestAlgorithm) - if err != nil { - return err - } - - ext := chr.FileExtension - extLen := len(ext) - if extLen < 2 { - return sdkerrors.ErrInvalidRequest.Wrapf("file extension cannot be shorter than 2 characters") - } - - if extLen > 6 { - return sdkerrors.ErrInvalidRequest.Wrapf("file extension cannot be longer than 6 characters") - } - - // check that ext is all lowercase or numeric - for _, c := range ext { - if c < '0' || c > '9' && c < 'a' || c > 'z' { - return sdkerrors.ErrInvalidRequest.Wrapf("file extension must be all lowercase or numeric") - } - } - - return nil -} - -func (chg *ContentHash_GraphV2) Validate() error { - err := validateHash(chg.Hash, chg.DigestAlgorithm) - if err != nil { - return err - } - - if chg.CanonicalizationAlgorithm == 0 { - return sdkerrors.ErrInvalidRequest.Wrapf("canonicalization algorithm cannot be empty") - } - - return nil -} - func validateHash(hash []byte, digestAlgorithm uint32) error { hashLen := len(hash) if hashLen < 20 { diff --git a/x/data/types.pb.go b/x/data/types.pb.go index faf85d47f7..0a48f7393a 100644 --- a/x/data/types.pb.go +++ b/x/data/types.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: regen/data/v1/types.proto +// source: regen/data/v2/types.proto package data @@ -24,7 +24,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // DigestAlgorithm is the hash digest algorithm // -// With V2 of raw and graph hash, this enum is no longer validated on-chain. +// With v2, this enum is no longer validated on-chain. // However, this enum SHOULD still be used and updated as a registry of known digest // algorithms and all implementations should coordinate on these values. type DigestAlgorithm int32 @@ -51,105 +51,12 @@ func (x DigestAlgorithm) String() string { } func (DigestAlgorithm) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_a49a7c2bdb2b2846, []int{0} -} - -// Deprecated: use RawV2 instead. -// RawMediaType defines MIME media types to be used with a ContentHash.Raw hash. -type RawMediaType int32 - -const ( - // RAW_MEDIA_TYPE_UNSPECIFIED can be used for raw binary data - RawMediaType_RAW_MEDIA_TYPE_UNSPECIFIED RawMediaType = 0 - // plain text - RawMediaType_RAW_MEDIA_TYPE_TEXT_PLAIN RawMediaType = 1 - // JSON - RawMediaType_RAW_MEDIA_TYPE_JSON RawMediaType = 2 - // CSV - RawMediaType_RAW_MEDIA_TYPE_CSV RawMediaType = 3 - // XML - RawMediaType_RAW_MEDIA_TYPE_XML RawMediaType = 4 - // PDF - RawMediaType_RAW_MEDIA_TYPE_PDF RawMediaType = 5 - // TIIF - RawMediaType_RAW_MEDIA_TYPE_TIFF RawMediaType = 16 - // JPG - RawMediaType_RAW_MEDIA_TYPE_JPG RawMediaType = 17 - // PNG - RawMediaType_RAW_MEDIA_TYPE_PNG RawMediaType = 18 - // SVG - RawMediaType_RAW_MEDIA_TYPE_SVG RawMediaType = 19 - // WEBP - RawMediaType_RAW_MEDIA_TYPE_WEBP RawMediaType = 20 - // AVIF - RawMediaType_RAW_MEDIA_TYPE_AVIF RawMediaType = 21 - // GIF - RawMediaType_RAW_MEDIA_TYPE_GIF RawMediaType = 22 - // APNG - RawMediaType_RAW_MEDIA_TYPE_APNG RawMediaType = 23 - // MPEG - RawMediaType_RAW_MEDIA_TYPE_MPEG RawMediaType = 32 - // MP4 - RawMediaType_RAW_MEDIA_TYPE_MP4 RawMediaType = 33 - // WEBM - RawMediaType_RAW_MEDIA_TYPE_WEBM RawMediaType = 34 - // OGG - RawMediaType_RAW_MEDIA_TYPE_OGG RawMediaType = 35 -) - -var RawMediaType_name = map[int32]string{ - 0: "RAW_MEDIA_TYPE_UNSPECIFIED", - 1: "RAW_MEDIA_TYPE_TEXT_PLAIN", - 2: "RAW_MEDIA_TYPE_JSON", - 3: "RAW_MEDIA_TYPE_CSV", - 4: "RAW_MEDIA_TYPE_XML", - 5: "RAW_MEDIA_TYPE_PDF", - 16: "RAW_MEDIA_TYPE_TIFF", - 17: "RAW_MEDIA_TYPE_JPG", - 18: "RAW_MEDIA_TYPE_PNG", - 19: "RAW_MEDIA_TYPE_SVG", - 20: "RAW_MEDIA_TYPE_WEBP", - 21: "RAW_MEDIA_TYPE_AVIF", - 22: "RAW_MEDIA_TYPE_GIF", - 23: "RAW_MEDIA_TYPE_APNG", - 32: "RAW_MEDIA_TYPE_MPEG", - 33: "RAW_MEDIA_TYPE_MP4", - 34: "RAW_MEDIA_TYPE_WEBM", - 35: "RAW_MEDIA_TYPE_OGG", -} - -var RawMediaType_value = map[string]int32{ - "RAW_MEDIA_TYPE_UNSPECIFIED": 0, - "RAW_MEDIA_TYPE_TEXT_PLAIN": 1, - "RAW_MEDIA_TYPE_JSON": 2, - "RAW_MEDIA_TYPE_CSV": 3, - "RAW_MEDIA_TYPE_XML": 4, - "RAW_MEDIA_TYPE_PDF": 5, - "RAW_MEDIA_TYPE_TIFF": 16, - "RAW_MEDIA_TYPE_JPG": 17, - "RAW_MEDIA_TYPE_PNG": 18, - "RAW_MEDIA_TYPE_SVG": 19, - "RAW_MEDIA_TYPE_WEBP": 20, - "RAW_MEDIA_TYPE_AVIF": 21, - "RAW_MEDIA_TYPE_GIF": 22, - "RAW_MEDIA_TYPE_APNG": 23, - "RAW_MEDIA_TYPE_MPEG": 32, - "RAW_MEDIA_TYPE_MP4": 33, - "RAW_MEDIA_TYPE_WEBM": 34, - "RAW_MEDIA_TYPE_OGG": 35, -} - -func (x RawMediaType) String() string { - return proto.EnumName(RawMediaType_name, int32(x)) -} - -func (RawMediaType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_a49a7c2bdb2b2846, []int{1} + return fileDescriptor_508db95308016166, []int{0} } // GraphCanonicalizationAlgorithm is the graph canonicalization algorithm // -// With V2 of the graph hash, this enum is no longer validated on-chain. +// With v2, this enum is no longer validated on-chain. // However, this enum SHOULD still be used and updated as a registry of known canonicalization // algorithms and all implementations should coordinate on these values. type GraphCanonicalizationAlgorithm int32 @@ -157,18 +64,19 @@ type GraphCanonicalizationAlgorithm int32 const ( // unspecified and invalid GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_UNSPECIFIED GraphCanonicalizationAlgorithm = 0 - // URDNA2015 graph hashing - GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015 GraphCanonicalizationAlgorithm = 1 + // RDFC 1.0 graph canonicalization algorithm. Essentially the same as URDNA2015 with some + // small clarifications around escaping of escape characters. + GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0 GraphCanonicalizationAlgorithm = 1 ) var GraphCanonicalizationAlgorithm_name = map[int32]string{ 0: "GRAPH_CANONICALIZATION_ALGORITHM_UNSPECIFIED", - 1: "GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015", + 1: "GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0", } var GraphCanonicalizationAlgorithm_value = map[string]int32{ "GRAPH_CANONICALIZATION_ALGORITHM_UNSPECIFIED": 0, - "GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015": 1, + "GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0": 1, } func (x GraphCanonicalizationAlgorithm) String() string { @@ -176,12 +84,12 @@ func (x GraphCanonicalizationAlgorithm) String() string { } func (GraphCanonicalizationAlgorithm) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_a49a7c2bdb2b2846, []int{2} + return fileDescriptor_508db95308016166, []int{1} } // GraphMerkleTree is the graph merkle tree type used for hashing, if any. // -// With V2 of the graph hash, this enum is no longer validated on-chain. +// With v2, this enum is no longer validated on-chain. // However, this enum SHOULD still be used and updated as a registry of known merkle tree // types and all implementations should coordinate on these values. type GraphMerkleTree int32 @@ -204,7 +112,7 @@ func (x GraphMerkleTree) String() string { } func (GraphMerkleTree) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_a49a7c2bdb2b2846, []int{3} + return fileDescriptor_508db95308016166, []int{2} } // ContentHash specifies a hash-based content identifier for a piece of data. @@ -212,39 +120,25 @@ func (GraphMerkleTree) EnumDescriptor() ([]byte, []int) { // A protobuf oneof was not used because this caused compatibility issues with // amino signing. type ContentHash struct { - // Deprecated: use RawV2 instead. - // Raw specifies "raw" data which does not specify a deterministic, canonical - // encoding. Users of these hashes MUST maintain a copy of the hashed data - // which is preserved bit by bit. All other content encodings specify a - // deterministic, canonical encoding allowing implementations to choose from a - // variety of alternative formats for transport and encoding while maintaining - // the guarantee that the canonical hash will not change. The media type for - // "raw" data is defined by the MediaType enum. - Raw *ContentHash_Raw `protobuf:"bytes,1,opt,name=raw,proto3" json:"raw,omitempty"` // Deprecated: Do not use. - // Deprecated: use GraphV2 instead. - // Graph specifies graph data that conforms to the RDF data model. - // The canonicalization algorithm used for an RDF graph is specified by - // GraphCanonicalizationAlgorithm. - Graph *ContentHash_Graph `protobuf:"bytes,2,opt,name=graph,proto3" json:"graph,omitempty"` // Deprecated: Do not use. - // raw_v2 specifies "raw" data which does not specify a deterministic, canonical + // raw specifies "raw" data which does not specify a deterministic, canonical // encoding. Users of these hashes MUST maintain a copy of the hashed data // which is preserved bit by bit. All other content encodings specify a // deterministic, canonical encoding allowing implementations to choose from a // variety of alternative formats for transport and encoding while maintaining // the guarantee that the canonical hash will not change. The media type for // "raw" data is defined by the MediaType enum. - RawV2 *ContentHash_RawV2 `protobuf:"bytes,3,opt,name=raw_v2,json=rawV2,proto3" json:"raw_v2,omitempty"` - // graph_v2 specifies graph data that conforms to the RDF data model. + Raw *ContentHash_Raw `protobuf:"bytes,1,opt,name=raw,proto3" json:"raw,omitempty"` + // graph specifies graph data that conforms to the RDF data model. // The canonicalization algorithm used for an RDF graph is specified by // GraphCanonicalizationAlgorithm. - GraphV2 *ContentHash_GraphV2 `protobuf:"bytes,4,opt,name=graph_v2,json=graphV2,proto3" json:"graph_v2,omitempty"` + Graph *ContentHash_Graph `protobuf:"bytes,2,opt,name=graph,proto3" json:"graph,omitempty"` } func (m *ContentHash) Reset() { *m = ContentHash{} } func (m *ContentHash) String() string { return proto.CompactTextString(m) } func (*ContentHash) ProtoMessage() {} func (*ContentHash) Descriptor() ([]byte, []int) { - return fileDescriptor_a49a7c2bdb2b2846, []int{0} + return fileDescriptor_508db95308016166, []int{0} } func (m *ContentHash) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -273,7 +167,6 @@ func (m *ContentHash) XXX_DiscardUnknown() { var xxx_messageInfo_ContentHash proto.InternalMessageInfo -// Deprecated: Do not use. func (m *ContentHash) GetRaw() *ContentHash_Raw { if m != nil { return m.Raw @@ -281,7 +174,6 @@ func (m *ContentHash) GetRaw() *ContentHash_Raw { return nil } -// Deprecated: Do not use. func (m *ContentHash) GetGraph() *ContentHash_Graph { if m != nil { return m.Graph @@ -289,36 +181,31 @@ func (m *ContentHash) GetGraph() *ContentHash_Graph { return nil } -func (m *ContentHash) GetRawV2() *ContentHash_RawV2 { - if m != nil { - return m.RawV2 - } - return nil -} - -func (m *ContentHash) GetGraphV2() *ContentHash_GraphV2 { - if m != nil { - return m.GraphV2 - } - return nil -} - -// Raw is the content hash type used for raw data. +// RawVis the content hash type used for raw data. type ContentHash_Raw struct { // hash represents the hash of the data based on the specified - // digest_algorithm. + // digest_algorithm. It must be at least 20 bytes long and at most 64 bytes long. Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - // digest_algorithm represents the hash digest algorithm. - DigestAlgorithm DigestAlgorithm `protobuf:"varint,2,opt,name=digest_algorithm,json=digestAlgorithm,proto3,enum=regen.data.v1.DigestAlgorithm" json:"digest_algorithm,omitempty"` - // media_type represents the media type for raw data. - MediaType RawMediaType `protobuf:"varint,3,opt,name=media_type,json=mediaType,proto3,enum=regen.data.v1.RawMediaType" json:"media_type,omitempty"` + // digest_algorithm represents the hash digest algorithm and should be a non-zero value from the DigestAlgorithm enum. + DigestAlgorithm uint32 `protobuf:"varint,2,opt,name=digest_algorithm,json=digestAlgorithm,proto3" json:"digest_algorithm,omitempty"` + // file_extension represents the file extension for raw data. It can be + // must be between 2-6 characters long, must be all lower-case and should represent + // the canonical extension for the media type. + // + // A list of canonical extensions which should be used is provided here + // and SHOULD be used by implementations: txt, json, csv, xml, pdf, tiff, + // jpg, png, svg, webp, avif, gif, apng, mpeg, mp4, webm, ogg, heic, raw. + // + // The above list should be updated as new media types come into common usage + // especially when there are two or more possible extensions (i.e. jpg vs jpeg or tif vs tiff). + FileExtension string `protobuf:"bytes,3,opt,name=file_extension,json=fileExtension,proto3" json:"file_extension,omitempty"` } func (m *ContentHash_Raw) Reset() { *m = ContentHash_Raw{} } func (m *ContentHash_Raw) String() string { return proto.CompactTextString(m) } func (*ContentHash_Raw) ProtoMessage() {} func (*ContentHash_Raw) Descriptor() ([]byte, []int) { - return fileDescriptor_a49a7c2bdb2b2846, []int{0, 0} + return fileDescriptor_508db95308016166, []int{0, 0} } func (m *ContentHash_Raw) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -354,39 +241,40 @@ func (m *ContentHash_Raw) GetHash() []byte { return nil } -func (m *ContentHash_Raw) GetDigestAlgorithm() DigestAlgorithm { +func (m *ContentHash_Raw) GetDigestAlgorithm() uint32 { if m != nil { return m.DigestAlgorithm } - return DigestAlgorithm_DIGEST_ALGORITHM_UNSPECIFIED + return 0 } -func (m *ContentHash_Raw) GetMediaType() RawMediaType { +func (m *ContentHash_Raw) GetFileExtension() string { if m != nil { - return m.MediaType + return m.FileExtension } - return RawMediaType_RAW_MEDIA_TYPE_UNSPECIFIED + return "" } // Graph is the content hash type used for RDF graph data. type ContentHash_Graph struct { // hash represents the hash of the data based on the specified - // digest_algorithm. + // digest_algorithm. It must be at least 20 bytes long and at most 64 bytes long. Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - // digest_algorithm represents the hash digest algorithm. - DigestAlgorithm DigestAlgorithm `protobuf:"varint,2,opt,name=digest_algorithm,json=digestAlgorithm,proto3,enum=regen.data.v1.DigestAlgorithm" json:"digest_algorithm,omitempty"` + // digest_algorithm represents the hash digest algorithm and should be a non-zero value from the DigestAlgorithm enum. + DigestAlgorithm uint32 `protobuf:"varint,2,opt,name=digest_algorithm,json=digestAlgorithm,proto3" json:"digest_algorithm,omitempty"` // graph_canonicalization_algorithm represents the RDF graph - // canonicalization algorithm. - CanonicalizationAlgorithm GraphCanonicalizationAlgorithm `protobuf:"varint,3,opt,name=canonicalization_algorithm,json=canonicalizationAlgorithm,proto3,enum=regen.data.v1.GraphCanonicalizationAlgorithm" json:"canonicalization_algorithm,omitempty"` - // merkle_tree is the merkle tree type used for the graph hash, if any. - MerkleTree GraphMerkleTree `protobuf:"varint,4,opt,name=merkle_tree,json=merkleTree,proto3,enum=regen.data.v1.GraphMerkleTree" json:"merkle_tree,omitempty"` + // canonicalization algorithm and should be a non-zero value from the GraphCanonicalizationAlgorithm enum. + CanonicalizationAlgorithm uint32 `protobuf:"varint,3,opt,name=canonicalization_algorithm,json=canonicalizationAlgorithm,proto3" json:"canonicalization_algorithm,omitempty"` + // merkle_tree is the merkle tree type used for the graph hash, if any and should be a value from the GraphMerkleTree enum + // or left unspecified. + MerkleTree uint32 `protobuf:"varint,4,opt,name=merkle_tree,json=merkleTree,proto3" json:"merkle_tree,omitempty"` } func (m *ContentHash_Graph) Reset() { *m = ContentHash_Graph{} } func (m *ContentHash_Graph) String() string { return proto.CompactTextString(m) } func (*ContentHash_Graph) ProtoMessage() {} func (*ContentHash_Graph) Descriptor() ([]byte, []int) { - return fileDescriptor_a49a7c2bdb2b2846, []int{0, 1} + return fileDescriptor_508db95308016166, []int{0, 1} } func (m *ContentHash_Graph) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -422,171 +310,21 @@ func (m *ContentHash_Graph) GetHash() []byte { return nil } -func (m *ContentHash_Graph) GetDigestAlgorithm() DigestAlgorithm { - if m != nil { - return m.DigestAlgorithm - } - return DigestAlgorithm_DIGEST_ALGORITHM_UNSPECIFIED -} - -func (m *ContentHash_Graph) GetCanonicalizationAlgorithm() GraphCanonicalizationAlgorithm { - if m != nil { - return m.CanonicalizationAlgorithm - } - return GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_UNSPECIFIED -} - -func (m *ContentHash_Graph) GetMerkleTree() GraphMerkleTree { - if m != nil { - return m.MerkleTree - } - return GraphMerkleTree_GRAPH_MERKLE_TREE_NONE_UNSPECIFIED -} - -// RawV2 is the content hash type used for raw data. -type ContentHash_RawV2 struct { - // hash represents the hash of the data based on the specified - // digest_algorithm. It must be at least 20 bytes long and at most 64 bytes long. - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - // digest_algorithm represents the hash digest algorithm and should be a non-zero value from the DigestAlgorithm enum. - DigestAlgorithm uint32 `protobuf:"varint,2,opt,name=digest_algorithm,json=digestAlgorithm,proto3" json:"digest_algorithm,omitempty"` - // file_extension represents the file extension for raw data. It can be - // must be between 2-6 characters long, must be all lower-case and should represent - // the canonical extension for the media type. - // - // A list of canonical extensions which should be used is provided here - // and SHOULD be used by implementations: txt, json, csv, xml, pdf, tiff, - // jpg, png, svg, webp, avif, gif, apng, mpeg, mp4, webm, ogg, heic, raw. - // - // The above list should be updated as new media types come into common usage - // especially when there are two or more possible extensions (i.e. jpg vs jpeg or tif vs tiff). - FileExtension string `protobuf:"bytes,3,opt,name=file_extension,json=fileExtension,proto3" json:"file_extension,omitempty"` -} - -func (m *ContentHash_RawV2) Reset() { *m = ContentHash_RawV2{} } -func (m *ContentHash_RawV2) String() string { return proto.CompactTextString(m) } -func (*ContentHash_RawV2) ProtoMessage() {} -func (*ContentHash_RawV2) Descriptor() ([]byte, []int) { - return fileDescriptor_a49a7c2bdb2b2846, []int{0, 2} -} -func (m *ContentHash_RawV2) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContentHash_RawV2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ContentHash_RawV2.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ContentHash_RawV2) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContentHash_RawV2.Merge(m, src) -} -func (m *ContentHash_RawV2) XXX_Size() int { - return m.Size() -} -func (m *ContentHash_RawV2) XXX_DiscardUnknown() { - xxx_messageInfo_ContentHash_RawV2.DiscardUnknown(m) -} - -var xxx_messageInfo_ContentHash_RawV2 proto.InternalMessageInfo - -func (m *ContentHash_RawV2) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -func (m *ContentHash_RawV2) GetDigestAlgorithm() uint32 { - if m != nil { - return m.DigestAlgorithm - } - return 0 -} - -func (m *ContentHash_RawV2) GetFileExtension() string { - if m != nil { - return m.FileExtension - } - return "" -} - -// GraphV2 is the content hash type used for RDF graph data. -type ContentHash_GraphV2 struct { - // hash represents the hash of the data based on the specified - // digest_algorithm. It must be at least 20 bytes long and at most 64 bytes long. - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - // digest_algorithm represents the hash digest algorithm and should be a non-zero value from the DigestAlgorithm enum. - DigestAlgorithm uint32 `protobuf:"varint,2,opt,name=digest_algorithm,json=digestAlgorithm,proto3" json:"digest_algorithm,omitempty"` - // graph_canonicalization_algorithm represents the RDF graph - // canonicalization algorithm and should be a non-zero value from the GraphCanonicalizationAlgorithm enum. - CanonicalizationAlgorithm uint32 `protobuf:"varint,3,opt,name=canonicalization_algorithm,json=canonicalizationAlgorithm,proto3" json:"canonicalization_algorithm,omitempty"` - // merkle_tree is the merkle tree type used for the graph hash, if any and should be a value from the GraphMerkleTree enum - // or left unspecified. - MerkleTree uint32 `protobuf:"varint,4,opt,name=merkle_tree,json=merkleTree,proto3" json:"merkle_tree,omitempty"` -} - -func (m *ContentHash_GraphV2) Reset() { *m = ContentHash_GraphV2{} } -func (m *ContentHash_GraphV2) String() string { return proto.CompactTextString(m) } -func (*ContentHash_GraphV2) ProtoMessage() {} -func (*ContentHash_GraphV2) Descriptor() ([]byte, []int) { - return fileDescriptor_a49a7c2bdb2b2846, []int{0, 3} -} -func (m *ContentHash_GraphV2) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ContentHash_GraphV2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ContentHash_GraphV2.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ContentHash_GraphV2) XXX_Merge(src proto.Message) { - xxx_messageInfo_ContentHash_GraphV2.Merge(m, src) -} -func (m *ContentHash_GraphV2) XXX_Size() int { - return m.Size() -} -func (m *ContentHash_GraphV2) XXX_DiscardUnknown() { - xxx_messageInfo_ContentHash_GraphV2.DiscardUnknown(m) -} - -var xxx_messageInfo_ContentHash_GraphV2 proto.InternalMessageInfo - -func (m *ContentHash_GraphV2) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -func (m *ContentHash_GraphV2) GetDigestAlgorithm() uint32 { +func (m *ContentHash_Graph) GetDigestAlgorithm() uint32 { if m != nil { return m.DigestAlgorithm } return 0 } -func (m *ContentHash_GraphV2) GetCanonicalizationAlgorithm() uint32 { +func (m *ContentHash_Graph) GetCanonicalizationAlgorithm() uint32 { if m != nil { return m.CanonicalizationAlgorithm } return 0 } -func (m *ContentHash_GraphV2) GetMerkleTree() uint32 { +func (m *ContentHash_Graph) GetMerkleTree() uint32 { if m != nil { return m.MerkleTree } @@ -603,7 +341,7 @@ func (m *ContentHashes) Reset() { *m = ContentHashes{} } func (m *ContentHashes) String() string { return proto.CompactTextString(m) } func (*ContentHashes) ProtoMessage() {} func (*ContentHashes) Descriptor() ([]byte, []int) { - return fileDescriptor_a49a7c2bdb2b2846, []int{1} + return fileDescriptor_508db95308016166, []int{1} } func (m *ContentHashes) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -640,72 +378,51 @@ func (m *ContentHashes) GetContentHashes() []*ContentHash { } func init() { - proto.RegisterEnum("regen.data.v1.DigestAlgorithm", DigestAlgorithm_name, DigestAlgorithm_value) - proto.RegisterEnum("regen.data.v1.RawMediaType", RawMediaType_name, RawMediaType_value) - proto.RegisterEnum("regen.data.v1.GraphCanonicalizationAlgorithm", GraphCanonicalizationAlgorithm_name, GraphCanonicalizationAlgorithm_value) - proto.RegisterEnum("regen.data.v1.GraphMerkleTree", GraphMerkleTree_name, GraphMerkleTree_value) - proto.RegisterType((*ContentHash)(nil), "regen.data.v1.ContentHash") - proto.RegisterType((*ContentHash_Raw)(nil), "regen.data.v1.ContentHash.Raw") - proto.RegisterType((*ContentHash_Graph)(nil), "regen.data.v1.ContentHash.Graph") - proto.RegisterType((*ContentHash_RawV2)(nil), "regen.data.v1.ContentHash.RawV2") - proto.RegisterType((*ContentHash_GraphV2)(nil), "regen.data.v1.ContentHash.GraphV2") - proto.RegisterType((*ContentHashes)(nil), "regen.data.v1.ContentHashes") -} - -func init() { proto.RegisterFile("regen/data/v1/types.proto", fileDescriptor_a49a7c2bdb2b2846) } - -var fileDescriptor_a49a7c2bdb2b2846 = []byte{ - // 787 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcf, 0x93, 0xda, 0x54, - 0x1c, 0x27, 0xb0, 0x74, 0xed, 0x97, 0xc2, 0x3e, 0x5f, 0xb5, 0x65, 0x51, 0x23, 0xe2, 0xe8, 0x54, - 0xa6, 0x0d, 0xdd, 0xd8, 0xea, 0xd8, 0x99, 0x8e, 0x13, 0x20, 0x64, 0xd3, 0x92, 0x90, 0x79, 0xa4, - 0xb4, 0xf6, 0x92, 0x79, 0x85, 0x27, 0x64, 0x0a, 0x09, 0x13, 0xe2, 0xd2, 0x7a, 0xf4, 0x2f, 0xf0, - 0xe2, 0xdd, 0xa3, 0x7f, 0x8a, 0x07, 0x0f, 0x3d, 0x78, 0xf0, 0xe8, 0xec, 0xfe, 0x23, 0x4e, 0x1e, - 0x5d, 0xa5, 0xe1, 0xb1, 0x1c, 0x9c, 0x9e, 0x78, 0x7c, 0x3f, 0x3f, 0xbe, 0x3f, 0xf2, 0x4d, 0x1e, - 0x1c, 0x46, 0x6c, 0xcc, 0x82, 0xc6, 0x88, 0xc6, 0xb4, 0x71, 0x72, 0xd4, 0x88, 0x5f, 0xce, 0xd9, - 0x42, 0x99, 0x47, 0x61, 0x1c, 0xe2, 0x22, 0x87, 0x94, 0x04, 0x52, 0x4e, 0x8e, 0x6a, 0x7f, 0xec, - 0x43, 0xa1, 0x15, 0x06, 0x31, 0x0b, 0xe2, 0x63, 0xba, 0x98, 0xe0, 0x3b, 0x90, 0x8b, 0xe8, 0xb2, - 0x2c, 0x55, 0xa5, 0x1b, 0x05, 0x55, 0x56, 0xde, 0x20, 0x2b, 0x6b, 0x44, 0x85, 0xd0, 0x65, 0x33, - 0x5b, 0x96, 0x48, 0x42, 0xc7, 0xf7, 0x20, 0x3f, 0x8e, 0xe8, 0x7c, 0x52, 0xce, 0x72, 0x5d, 0xf5, - 0x02, 0x9d, 0x91, 0xf0, 0xb8, 0x72, 0x25, 0xc1, 0x5f, 0xc3, 0xa5, 0x88, 0x2e, 0xbd, 0x13, 0xb5, - 0x9c, 0xdb, 0x29, 0x26, 0x74, 0x39, 0x50, 0x49, 0x3e, 0x4a, 0x7e, 0xf0, 0x7d, 0x78, 0x87, 0x3b, - 0x24, 0xd2, 0x3d, 0x2e, 0xad, 0xed, 0xca, 0x3b, 0x50, 0xc9, 0xfe, 0x78, 0x75, 0xa8, 0xfc, 0x2a, - 0x41, 0x8e, 0xd0, 0x25, 0xc6, 0xb0, 0x37, 0xa1, 0x8b, 0x09, 0x6f, 0xf9, 0x0a, 0xe1, 0x67, 0x6c, - 0x02, 0x1a, 0xf9, 0x63, 0xb6, 0x88, 0x3d, 0x3a, 0x1d, 0x87, 0x91, 0x1f, 0x4f, 0x66, 0xbc, 0xb5, - 0xd2, 0xc6, 0x48, 0xda, 0x9c, 0xa6, 0x9d, 0xb3, 0xc8, 0xc1, 0xe8, 0xcd, 0x00, 0xbe, 0x07, 0x30, - 0x63, 0x23, 0x9f, 0x7a, 0xc9, 0x43, 0xe0, 0x2d, 0x96, 0xd4, 0x0f, 0x52, 0x26, 0x84, 0x2e, 0xad, - 0x84, 0xe3, 0xbe, 0x9c, 0x33, 0x72, 0x79, 0x76, 0x7e, 0xac, 0xfc, 0x92, 0x85, 0x3c, 0xaf, 0xfb, - 0x6d, 0x17, 0x39, 0x85, 0xca, 0x90, 0x06, 0x61, 0xe0, 0x0f, 0xe9, 0xd4, 0xff, 0x91, 0xc6, 0x7e, - 0x18, 0xac, 0x99, 0xae, 0x8a, 0xbe, 0x95, 0x32, 0xe5, 0x85, 0xb5, 0x52, 0xaa, 0xff, 0x72, 0x1c, - 0x0e, 0xb7, 0x41, 0xf8, 0x5b, 0x28, 0xcc, 0x58, 0xf4, 0x7c, 0xca, 0xbc, 0x38, 0x62, 0x8c, 0x3f, - 0xbb, 0xcd, 0x9a, 0xb9, 0xbd, 0xc5, 0x69, 0x6e, 0xc4, 0x18, 0x81, 0xd9, 0xbf, 0xe7, 0xca, 0x0c, - 0xf2, 0x7c, 0x13, 0x84, 0x63, 0xf9, 0x62, 0xcb, 0x58, 0x8a, 0x9b, 0x6d, 0x7f, 0x06, 0xa5, 0xef, - 0xfd, 0x29, 0xf3, 0xd8, 0x8b, 0x98, 0x05, 0x0b, 0x3f, 0x0c, 0x78, 0xab, 0x97, 0x49, 0x31, 0x89, - 0xea, 0xe7, 0xc1, 0xca, 0x6f, 0x12, 0xec, 0xbf, 0x5e, 0x9f, 0xff, 0x9b, 0xf1, 0xfe, 0xce, 0x41, - 0x17, 0x2f, 0x9a, 0xdc, 0xc7, 0x9b, 0x93, 0x2b, 0xae, 0x4f, 0xa6, 0x46, 0xa0, 0xb8, 0xb6, 0xf4, - 0x6c, 0x81, 0x35, 0x28, 0x0d, 0x57, 0x01, 0x6f, 0xc2, 0x23, 0x65, 0xa9, 0x9a, 0xbb, 0x51, 0x50, - 0x2b, 0xdb, 0x5f, 0x15, 0x52, 0x1c, 0xae, 0x5b, 0xd4, 0x1f, 0xc1, 0x41, 0x6a, 0x81, 0x70, 0x15, - 0x3e, 0x6c, 0x9b, 0x86, 0xde, 0x77, 0x3d, 0xad, 0x6b, 0xf4, 0x88, 0xe9, 0x1e, 0x5b, 0xde, 0x23, - 0xbb, 0xef, 0xe8, 0x2d, 0xb3, 0x63, 0xea, 0x6d, 0x94, 0x11, 0x32, 0x9a, 0x5d, 0xed, 0xa1, 0xae, - 0x36, 0x3d, 0xf5, 0xee, 0x57, 0x48, 0xaa, 0xff, 0x99, 0x83, 0x2b, 0xeb, 0x8b, 0x8f, 0x65, 0xa8, - 0x10, 0xed, 0xb1, 0x67, 0xe9, 0x6d, 0x53, 0xf3, 0xdc, 0xef, 0x1c, 0x3d, 0x65, 0xf9, 0x11, 0x1c, - 0xa6, 0x70, 0x57, 0x7f, 0xe2, 0x7a, 0x4e, 0x57, 0x33, 0x6d, 0x24, 0xe1, 0xeb, 0x70, 0x35, 0x05, - 0x3f, 0xe8, 0xf7, 0x6c, 0x94, 0xc5, 0xd7, 0x00, 0xa7, 0x80, 0x56, 0x7f, 0x80, 0x72, 0x82, 0xf8, - 0x13, 0xab, 0x8b, 0xf6, 0x04, 0x71, 0xa7, 0xdd, 0x41, 0x79, 0x41, 0x02, 0xd7, 0xec, 0x74, 0x10, - 0x12, 0x08, 0x1e, 0x38, 0x06, 0x7a, 0x57, 0x64, 0x64, 0x1b, 0x08, 0x0b, 0xe2, 0xfd, 0x81, 0x81, - 0xae, 0x0a, 0x12, 0x3c, 0xd6, 0x9b, 0x0e, 0x7a, 0x4f, 0x00, 0x68, 0x03, 0xb3, 0x83, 0xde, 0x17, - 0x38, 0x19, 0x66, 0x07, 0x5d, 0x13, 0x09, 0x92, 0xd4, 0xd7, 0x05, 0x80, 0xe5, 0xe8, 0x06, 0xaa, - 0x0a, 0x9c, 0x2c, 0xe7, 0x0e, 0xfa, 0x44, 0x5c, 0x93, 0x85, 0x6a, 0x02, 0x41, 0xcf, 0x30, 0xd0, - 0xa7, 0xf5, 0x9f, 0x24, 0x90, 0x2f, 0xfe, 0x34, 0xe0, 0xdb, 0x70, 0xd3, 0x20, 0x9a, 0x73, 0xec, - 0xb5, 0x34, 0xbb, 0x67, 0x9b, 0x2d, 0xad, 0x6b, 0x3e, 0xd5, 0x5c, 0xb3, 0x67, 0x6f, 0xdd, 0x26, - 0x05, 0xea, 0xbb, 0x15, 0xa4, 0x6d, 0x6b, 0xea, 0xed, 0xa3, 0xbb, 0x48, 0xaa, 0x7f, 0x03, 0x07, - 0xa9, 0xef, 0x07, 0xfe, 0x1c, 0x6a, 0x2b, 0x0b, 0x4b, 0x27, 0x0f, 0xbb, 0xba, 0xe7, 0x12, 0x5d, - 0xf7, 0xec, 0x9e, 0x9d, 0xda, 0xb2, 0x66, 0xe7, 0xf7, 0x53, 0x59, 0x7a, 0x75, 0x2a, 0x4b, 0x7f, - 0x9f, 0xca, 0xd2, 0xcf, 0x67, 0x72, 0xe6, 0xd5, 0x99, 0x9c, 0xf9, 0xeb, 0x4c, 0xce, 0x3c, 0xbd, - 0x39, 0xf6, 0xe3, 0xc9, 0x0f, 0xcf, 0x94, 0x61, 0x38, 0x6b, 0xf0, 0x97, 0xe7, 0x56, 0xc0, 0xe2, - 0x65, 0x18, 0x3d, 0x7f, 0xfd, 0x6f, 0xca, 0x46, 0x63, 0x16, 0x35, 0x5e, 0xf0, 0x6b, 0xf7, 0xd9, - 0x25, 0x7e, 0xdd, 0x7e, 0xf9, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xce, 0x99, 0x58, 0xe9, 0x8b, - 0x07, 0x00, 0x00, + proto.RegisterEnum("regen.data.v2.DigestAlgorithm", DigestAlgorithm_name, DigestAlgorithm_value) + proto.RegisterEnum("regen.data.v2.GraphCanonicalizationAlgorithm", GraphCanonicalizationAlgorithm_name, GraphCanonicalizationAlgorithm_value) + proto.RegisterEnum("regen.data.v2.GraphMerkleTree", GraphMerkleTree_name, GraphMerkleTree_value) + proto.RegisterType((*ContentHash)(nil), "regen.data.v2.ContentHash") + proto.RegisterType((*ContentHash_Raw)(nil), "regen.data.v2.ContentHash.Raw") + proto.RegisterType((*ContentHash_Graph)(nil), "regen.data.v2.ContentHash.Graph") + proto.RegisterType((*ContentHashes)(nil), "regen.data.v2.ContentHashes") +} + +func init() { proto.RegisterFile("regen/data/v2/types.proto", fileDescriptor_508db95308016166) } + +var fileDescriptor_508db95308016166 = []byte{ + // 500 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x93, 0xc1, 0x6e, 0x12, 0x41, + 0x1c, 0xc6, 0x19, 0xb7, 0x35, 0xf1, 0x8f, 0x14, 0xb2, 0x27, 0x4a, 0xcc, 0x4a, 0x48, 0x34, 0x94, + 0xb4, 0x0b, 0xae, 0xb1, 0x89, 0x07, 0x0f, 0xcb, 0x32, 0xc0, 0xa6, 0xb0, 0x34, 0x53, 0x7a, 0xe9, + 0x65, 0x32, 0x85, 0x71, 0x77, 0x03, 0xec, 0x92, 0xd9, 0xb1, 0x54, 0x6f, 0x3e, 0x80, 0x89, 0x4f, + 0xe1, 0xb3, 0x78, 0xec, 0xd1, 0xa3, 0x81, 0x17, 0x31, 0xcc, 0x5a, 0xa5, 0x8d, 0xe8, 0xc1, 0xdb, + 0xee, 0x37, 0xbf, 0xef, 0xff, 0xcd, 0x7c, 0xc9, 0x1f, 0xf6, 0x05, 0xf7, 0x79, 0x54, 0x1f, 0x33, + 0xc9, 0xea, 0x57, 0x56, 0x5d, 0xbe, 0x9f, 0xf3, 0xc4, 0x9c, 0x8b, 0x58, 0xc6, 0x7a, 0x4e, 0x1d, + 0x99, 0xeb, 0x23, 0xf3, 0xca, 0xaa, 0x7c, 0xd2, 0x20, 0xeb, 0xc4, 0x91, 0xe4, 0x91, 0xec, 0xb2, + 0x24, 0xd0, 0x1b, 0xa0, 0x09, 0xb6, 0x28, 0xa2, 0x32, 0xaa, 0x66, 0x2d, 0xc3, 0xbc, 0x03, 0x9b, + 0x1b, 0xa0, 0x49, 0xd8, 0x82, 0xac, 0x51, 0xfd, 0x18, 0x76, 0x7d, 0xc1, 0xe6, 0x41, 0xf1, 0x81, + 0xf2, 0x94, 0xff, 0xe2, 0xe9, 0xac, 0x39, 0x92, 0xe2, 0xa5, 0x09, 0x68, 0x84, 0x2d, 0x74, 0x1d, + 0x76, 0x02, 0x96, 0x04, 0x2a, 0xf1, 0x31, 0x51, 0xdf, 0xfa, 0x01, 0x14, 0xc6, 0xa1, 0xcf, 0x13, + 0x49, 0xd9, 0xd4, 0x8f, 0x45, 0x28, 0x83, 0x99, 0x9a, 0x9e, 0x23, 0xf9, 0x54, 0xb7, 0x6f, 0x65, + 0xfd, 0x19, 0xec, 0xbd, 0x0d, 0xa7, 0x9c, 0xf2, 0x6b, 0xc9, 0xa3, 0x24, 0x8c, 0xa3, 0xa2, 0x56, + 0x46, 0xd5, 0x47, 0x24, 0xb7, 0x56, 0xf1, 0xad, 0x58, 0xfa, 0x82, 0x60, 0x57, 0xa5, 0xff, 0x6f, + 0xde, 0x1b, 0x28, 0x8d, 0x58, 0x14, 0x47, 0xe1, 0x88, 0x4d, 0xc3, 0x0f, 0x4c, 0x86, 0x71, 0xb4, + 0x61, 0xd2, 0x94, 0x69, 0xff, 0x3e, 0xf1, 0xdb, 0xfe, 0x14, 0xb2, 0x33, 0x2e, 0x26, 0x53, 0x4e, + 0xa5, 0xe0, 0xbc, 0xb8, 0xa3, 0x78, 0x48, 0xa5, 0xa1, 0xe0, 0xbc, 0x42, 0x20, 0xb7, 0xd1, 0x18, + 0x4f, 0x74, 0x1b, 0xf6, 0x46, 0xa9, 0x40, 0x03, 0xa5, 0x14, 0x51, 0x59, 0xab, 0x66, 0xad, 0xd2, + 0xf6, 0x9e, 0x49, 0x6e, 0xb4, 0x39, 0xa2, 0x76, 0x0e, 0xf9, 0xd6, 0xbd, 0x67, 0x94, 0xe1, 0x49, + 0xcb, 0xed, 0xe0, 0xb3, 0x21, 0xb5, 0x7b, 0x9d, 0x01, 0x71, 0x87, 0xdd, 0x3e, 0x3d, 0xf7, 0xce, + 0x4e, 0xb1, 0xe3, 0xb6, 0x5d, 0xdc, 0x2a, 0x64, 0xfe, 0x48, 0x34, 0x7b, 0xf6, 0x09, 0xb6, 0x9a, + 0xd4, 0x7a, 0x75, 0x5c, 0x40, 0xb5, 0x8f, 0x08, 0x0c, 0xd5, 0xa9, 0xb3, 0xf5, 0xb9, 0x0d, 0x38, + 0xec, 0x10, 0xfb, 0xb4, 0x4b, 0x1d, 0xdb, 0x1b, 0x78, 0xae, 0x63, 0xf7, 0xdc, 0x0b, 0x7b, 0xe8, + 0x0e, 0xbc, 0xad, 0xb1, 0x47, 0x70, 0xf0, 0x4f, 0x07, 0x69, 0xb5, 0x1d, 0xfa, 0x82, 0x36, 0x0a, + 0xa8, 0xf6, 0x1a, 0xf2, 0xea, 0x0a, 0xfd, 0x5f, 0x0d, 0xea, 0xcf, 0xa1, 0x92, 0x4e, 0xe8, 0x63, + 0x72, 0xd2, 0xc3, 0x74, 0x48, 0x30, 0xa6, 0xde, 0xc0, 0xc3, 0x77, 0x93, 0x9a, 0xed, 0xaf, 0x4b, + 0x03, 0xdd, 0x2c, 0x0d, 0xf4, 0x7d, 0x69, 0xa0, 0xcf, 0x2b, 0x23, 0x73, 0xb3, 0x32, 0x32, 0xdf, + 0x56, 0x46, 0xe6, 0xe2, 0xd0, 0x0f, 0x65, 0xf0, 0xee, 0xd2, 0x1c, 0xc5, 0xb3, 0xba, 0x2a, 0xf9, + 0x28, 0xe2, 0x72, 0x11, 0x8b, 0xc9, 0xcf, 0xbf, 0x29, 0x1f, 0xfb, 0x5c, 0xd4, 0xaf, 0xd5, 0x7e, + 0x5d, 0x3e, 0x54, 0x7b, 0xf5, 0xf2, 0x47, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7a, 0x45, 0x83, 0x99, + 0x74, 0x03, 0x00, 0x00, } func (m *ContentHash) Marshal() (dAtA []byte, err error) { @@ -728,30 +445,6 @@ func (m *ContentHash) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.GraphV2 != nil { - { - size, err := m.GraphV2.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.RawV2 != nil { - { - size, err := m.RawV2.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } if m.Graph != nil { { size, err := m.Graph.MarshalToSizedBuffer(dAtA[:i]) @@ -799,10 +492,12 @@ func (m *ContentHash_Raw) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.MediaType != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.MediaType)) + if len(m.FileExtension) > 0 { + i -= len(m.FileExtension) + copy(dAtA[i:], m.FileExtension) + i = encodeVarintTypes(dAtA, i, uint64(len(m.FileExtension))) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x1a } if m.DigestAlgorithm != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.DigestAlgorithm)) @@ -864,7 +559,7 @@ func (m *ContentHash_Graph) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ContentHash_RawV2) Marshal() (dAtA []byte, err error) { +func (m *ContentHashes) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -874,198 +569,62 @@ func (m *ContentHash_RawV2) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ContentHash_RawV2) MarshalTo(dAtA []byte) (int, error) { +func (m *ContentHashes) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ContentHash_RawV2) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ContentHashes) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.FileExtension) > 0 { - i -= len(m.FileExtension) - copy(dAtA[i:], m.FileExtension) - i = encodeVarintTypes(dAtA, i, uint64(len(m.FileExtension))) - i-- - dAtA[i] = 0x1a - } - if m.DigestAlgorithm != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.DigestAlgorithm)) - i-- - dAtA[i] = 0x10 - } - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0xa + if len(m.ContentHashes) > 0 { + for iNdEx := len(m.ContentHashes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ContentHashes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } return len(dAtA) - i, nil } -func (m *ContentHash_GraphV2) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ } - return dAtA[:n], nil -} - -func (m *ContentHash_GraphV2) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + dAtA[offset] = uint8(v) + return base } - -func (m *ContentHash_GraphV2) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *ContentHash) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if m.MerkleTree != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.MerkleTree)) - i-- - dAtA[i] = 0x20 + if m.Raw != nil { + l = m.Raw.Size() + n += 1 + l + sovTypes(uint64(l)) } - if m.CanonicalizationAlgorithm != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.CanonicalizationAlgorithm)) - i-- - dAtA[i] = 0x18 - } - if m.DigestAlgorithm != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.DigestAlgorithm)) - i-- - dAtA[i] = 0x10 - } - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ContentHashes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ContentHashes) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ContentHashes) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ContentHashes) > 0 { - for iNdEx := len(m.ContentHashes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ContentHashes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { - offset -= sovTypes(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ContentHash) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Raw != nil { - l = m.Raw.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Graph != nil { - l = m.Graph.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.RawV2 != nil { - l = m.RawV2.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.GraphV2 != nil { - l = m.GraphV2.Size() - n += 1 + l + sovTypes(uint64(l)) + if m.Graph != nil { + l = m.Graph.Size() + n += 1 + l + sovTypes(uint64(l)) } return n } func (m *ContentHash_Raw) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.DigestAlgorithm != 0 { - n += 1 + sovTypes(uint64(m.DigestAlgorithm)) - } - if m.MediaType != 0 { - n += 1 + sovTypes(uint64(m.MediaType)) - } - return n -} - -func (m *ContentHash_Graph) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if m.DigestAlgorithm != 0 { - n += 1 + sovTypes(uint64(m.DigestAlgorithm)) - } - if m.CanonicalizationAlgorithm != 0 { - n += 1 + sovTypes(uint64(m.CanonicalizationAlgorithm)) - } - if m.MerkleTree != 0 { - n += 1 + sovTypes(uint64(m.MerkleTree)) - } - return n -} - -func (m *ContentHash_RawV2) Size() (n int) { if m == nil { return 0 } @@ -1085,7 +644,7 @@ func (m *ContentHash_RawV2) Size() (n int) { return n } -func (m *ContentHash_GraphV2) Size() (n int) { +func (m *ContentHash_Graph) Size() (n int) { if m == nil { return 0 } @@ -1229,78 +788,6 @@ func (m *ContentHash) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RawV2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RawV2 == nil { - m.RawV2 = &ContentHash_RawV2{} - } - if err := m.RawV2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GraphV2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GraphV2 == nil { - m.GraphV2 = &ContentHash_GraphV2{} - } - if err := m.GraphV2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -1351,269 +838,6 @@ func (m *ContentHash_Raw) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: Raw: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DigestAlgorithm", wireType) - } - m.DigestAlgorithm = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DigestAlgorithm |= DigestAlgorithm(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MediaType", wireType) - } - m.MediaType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MediaType |= RawMediaType(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ContentHash_Graph) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Graph: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Graph: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DigestAlgorithm", wireType) - } - m.DigestAlgorithm = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DigestAlgorithm |= DigestAlgorithm(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CanonicalizationAlgorithm", wireType) - } - m.CanonicalizationAlgorithm = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CanonicalizationAlgorithm |= GraphCanonicalizationAlgorithm(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MerkleTree", wireType) - } - m.MerkleTree = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MerkleTree |= GraphMerkleTree(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ContentHash_RawV2) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RawV2: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RawV2: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) @@ -1720,7 +944,7 @@ func (m *ContentHash_RawV2) Unmarshal(dAtA []byte) error { } return nil } -func (m *ContentHash_GraphV2) Unmarshal(dAtA []byte) error { +func (m *ContentHash_Graph) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1743,10 +967,10 @@ func (m *ContentHash_GraphV2) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GraphV2: wiretype end group for non-group") + return fmt.Errorf("proto: Graph: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GraphV2: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Graph: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/data/types_test.go b/x/data/types_test.go index bf1c5aa49a..d2ecf3408f 100644 --- a/x/data/types_test.go +++ b/x/data/types_test.go @@ -38,6 +38,10 @@ func (s *contentHash) ExpectTheError(a string) { require.EqualError(s.t, s.err, a) } +func (s *contentHash) ExpectAnError() { + require.Error(s.t, s.err) +} + func (s *contentHash) ExpectNoError() { require.NoError(s.t, s.err) } From 61a2255f2d5b822f23b61d78deb463579cba6cad Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Tue, 12 Dec 2023 12:34:59 -0500 Subject: [PATCH 09/20] revert v1 changes --- api/regen/data/v1/types.pulsar.go | 1924 ++++------------------------- proto/regen/data/v1/types.proto | 86 +- 2 files changed, 233 insertions(+), 1777 deletions(-) diff --git a/api/regen/data/v1/types.pulsar.go b/api/regen/data/v1/types.pulsar.go index 7ab0110b47..a53e594d24 100644 --- a/api/regen/data/v1/types.pulsar.go +++ b/api/regen/data/v1/types.pulsar.go @@ -13,11 +13,9 @@ import ( ) var ( - md_ContentHash protoreflect.MessageDescriptor - fd_ContentHash_raw protoreflect.FieldDescriptor - fd_ContentHash_graph protoreflect.FieldDescriptor - fd_ContentHash_raw_v2 protoreflect.FieldDescriptor - fd_ContentHash_graph_v2 protoreflect.FieldDescriptor + md_ContentHash protoreflect.MessageDescriptor + fd_ContentHash_raw protoreflect.FieldDescriptor + fd_ContentHash_graph protoreflect.FieldDescriptor ) func init() { @@ -25,8 +23,6 @@ func init() { md_ContentHash = File_regen_data_v1_types_proto.Messages().ByName("ContentHash") fd_ContentHash_raw = md_ContentHash.Fields().ByName("raw") fd_ContentHash_graph = md_ContentHash.Fields().ByName("graph") - fd_ContentHash_raw_v2 = md_ContentHash.Fields().ByName("raw_v2") - fd_ContentHash_graph_v2 = md_ContentHash.Fields().ByName("graph_v2") } var _ protoreflect.Message = (*fastReflection_ContentHash)(nil) @@ -106,18 +102,6 @@ func (x *fastReflection_ContentHash) Range(f func(protoreflect.FieldDescriptor, return } } - if x.RawV2 != nil { - value := protoreflect.ValueOfMessage(x.RawV2.ProtoReflect()) - if !f(fd_ContentHash_raw_v2, value) { - return - } - } - if x.GraphV2 != nil { - value := protoreflect.ValueOfMessage(x.GraphV2.ProtoReflect()) - if !f(fd_ContentHash_graph_v2, value) { - return - } - } } // Has reports whether a field is populated. @@ -137,10 +121,6 @@ func (x *fastReflection_ContentHash) Has(fd protoreflect.FieldDescriptor) bool { return x.Raw != nil case "regen.data.v1.ContentHash.graph": return x.Graph != nil - case "regen.data.v1.ContentHash.raw_v2": - return x.RawV2 != nil - case "regen.data.v1.ContentHash.graph_v2": - return x.GraphV2 != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash")) @@ -161,10 +141,6 @@ func (x *fastReflection_ContentHash) Clear(fd protoreflect.FieldDescriptor) { x.Raw = nil case "regen.data.v1.ContentHash.graph": x.Graph = nil - case "regen.data.v1.ContentHash.raw_v2": - x.RawV2 = nil - case "regen.data.v1.ContentHash.graph_v2": - x.GraphV2 = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash")) @@ -187,12 +163,6 @@ func (x *fastReflection_ContentHash) Get(descriptor protoreflect.FieldDescriptor case "regen.data.v1.ContentHash.graph": value := x.Graph return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "regen.data.v1.ContentHash.raw_v2": - value := x.RawV2 - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "regen.data.v1.ContentHash.graph_v2": - value := x.GraphV2 - return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash")) @@ -217,10 +187,6 @@ func (x *fastReflection_ContentHash) Set(fd protoreflect.FieldDescriptor, value x.Raw = value.Message().Interface().(*ContentHash_Raw) case "regen.data.v1.ContentHash.graph": x.Graph = value.Message().Interface().(*ContentHash_Graph) - case "regen.data.v1.ContentHash.raw_v2": - x.RawV2 = value.Message().Interface().(*ContentHash_RawV2) - case "regen.data.v1.ContentHash.graph_v2": - x.GraphV2 = value.Message().Interface().(*ContentHash_GraphV2) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash")) @@ -251,16 +217,6 @@ func (x *fastReflection_ContentHash) Mutable(fd protoreflect.FieldDescriptor) pr x.Graph = new(ContentHash_Graph) } return protoreflect.ValueOfMessage(x.Graph.ProtoReflect()) - case "regen.data.v1.ContentHash.raw_v2": - if x.RawV2 == nil { - x.RawV2 = new(ContentHash_RawV2) - } - return protoreflect.ValueOfMessage(x.RawV2.ProtoReflect()) - case "regen.data.v1.ContentHash.graph_v2": - if x.GraphV2 == nil { - x.GraphV2 = new(ContentHash_GraphV2) - } - return protoreflect.ValueOfMessage(x.GraphV2.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash")) @@ -280,12 +236,6 @@ func (x *fastReflection_ContentHash) NewField(fd protoreflect.FieldDescriptor) p case "regen.data.v1.ContentHash.graph": m := new(ContentHash_Graph) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "regen.data.v1.ContentHash.raw_v2": - m := new(ContentHash_RawV2) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "regen.data.v1.ContentHash.graph_v2": - m := new(ContentHash_GraphV2) - return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash")) @@ -363,14 +313,6 @@ func (x *fastReflection_ContentHash) ProtoMethods() *protoiface.Methods { l = options.Size(x.Graph) n += 1 + l + runtime.Sov(uint64(l)) } - if x.RawV2 != nil { - l = options.Size(x.RawV2) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.GraphV2 != nil { - l = options.Size(x.GraphV2) - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -400,34 +342,6 @@ func (x *fastReflection_ContentHash) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.GraphV2 != nil { - encoded, err := options.Marshal(x.GraphV2) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if x.RawV2 != nil { - encoded, err := options.Marshal(x.RawV2) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } if x.Graph != nil { encoded, err := options.Marshal(x.Graph) if err != nil { @@ -577,78 +491,6 @@ func (x *fastReflection_ContentHash) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RawV2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.RawV2 == nil { - x.RawV2 = &ContentHash_RawV2{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RawV2); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GraphV2", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.GraphV2 == nil { - x.GraphV2 = &ContentHash_GraphV2{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.GraphV2); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1768,31 +1610,78 @@ func (x *fastReflection_ContentHash_Graph) ProtoMethods() *protoiface.Methods { } } +var _ protoreflect.List = (*_ContentHashes_1_list)(nil) + +type _ContentHashes_1_list struct { + list *[]*ContentHash +} + +func (x *_ContentHashes_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ContentHashes_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ContentHashes_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ContentHash) + (*x.list)[i] = concreteValue +} + +func (x *_ContentHashes_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ContentHash) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ContentHashes_1_list) AppendMutable() protoreflect.Value { + v := new(ContentHash) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ContentHashes_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ContentHashes_1_list) NewElement() protoreflect.Value { + v := new(ContentHash) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ContentHashes_1_list) IsValid() bool { + return x.list != nil +} + var ( - md_ContentHash_RawV2 protoreflect.MessageDescriptor - fd_ContentHash_RawV2_hash protoreflect.FieldDescriptor - fd_ContentHash_RawV2_digest_algorithm protoreflect.FieldDescriptor - fd_ContentHash_RawV2_file_extension protoreflect.FieldDescriptor + md_ContentHashes protoreflect.MessageDescriptor + fd_ContentHashes_content_hashes protoreflect.FieldDescriptor ) func init() { file_regen_data_v1_types_proto_init() - md_ContentHash_RawV2 = File_regen_data_v1_types_proto.Messages().ByName("ContentHash").Messages().ByName("RawV2") - fd_ContentHash_RawV2_hash = md_ContentHash_RawV2.Fields().ByName("hash") - fd_ContentHash_RawV2_digest_algorithm = md_ContentHash_RawV2.Fields().ByName("digest_algorithm") - fd_ContentHash_RawV2_file_extension = md_ContentHash_RawV2.Fields().ByName("file_extension") + md_ContentHashes = File_regen_data_v1_types_proto.Messages().ByName("ContentHashes") + fd_ContentHashes_content_hashes = md_ContentHashes.Fields().ByName("content_hashes") } -var _ protoreflect.Message = (*fastReflection_ContentHash_RawV2)(nil) +var _ protoreflect.Message = (*fastReflection_ContentHashes)(nil) -type fastReflection_ContentHash_RawV2 ContentHash_RawV2 +type fastReflection_ContentHashes ContentHashes -func (x *ContentHash_RawV2) ProtoReflect() protoreflect.Message { - return (*fastReflection_ContentHash_RawV2)(x) +func (x *ContentHashes) ProtoReflect() protoreflect.Message { + return (*fastReflection_ContentHashes)(x) } -func (x *ContentHash_RawV2) slowProtoReflect() protoreflect.Message { - mi := &file_regen_data_v1_types_proto_msgTypes[4] +func (x *ContentHashes) slowProtoReflect() protoreflect.Message { + mi := &file_regen_data_v1_types_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1803,43 +1692,43 @@ func (x *ContentHash_RawV2) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_ContentHash_RawV2_messageType fastReflection_ContentHash_RawV2_messageType -var _ protoreflect.MessageType = fastReflection_ContentHash_RawV2_messageType{} +var _fastReflection_ContentHashes_messageType fastReflection_ContentHashes_messageType +var _ protoreflect.MessageType = fastReflection_ContentHashes_messageType{} -type fastReflection_ContentHash_RawV2_messageType struct{} +type fastReflection_ContentHashes_messageType struct{} -func (x fastReflection_ContentHash_RawV2_messageType) Zero() protoreflect.Message { - return (*fastReflection_ContentHash_RawV2)(nil) +func (x fastReflection_ContentHashes_messageType) Zero() protoreflect.Message { + return (*fastReflection_ContentHashes)(nil) } -func (x fastReflection_ContentHash_RawV2_messageType) New() protoreflect.Message { - return new(fastReflection_ContentHash_RawV2) +func (x fastReflection_ContentHashes_messageType) New() protoreflect.Message { + return new(fastReflection_ContentHashes) } -func (x fastReflection_ContentHash_RawV2_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ContentHash_RawV2 +func (x fastReflection_ContentHashes_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ContentHashes } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_ContentHash_RawV2) Descriptor() protoreflect.MessageDescriptor { - return md_ContentHash_RawV2 +func (x *fastReflection_ContentHashes) Descriptor() protoreflect.MessageDescriptor { + return md_ContentHashes } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_ContentHash_RawV2) Type() protoreflect.MessageType { - return _fastReflection_ContentHash_RawV2_messageType +func (x *fastReflection_ContentHashes) Type() protoreflect.MessageType { + return _fastReflection_ContentHashes_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_ContentHash_RawV2) New() protoreflect.Message { - return new(fastReflection_ContentHash_RawV2) +func (x *fastReflection_ContentHashes) New() protoreflect.Message { + return new(fastReflection_ContentHashes) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_ContentHash_RawV2) Interface() protoreflect.ProtoMessage { - return (*ContentHash_RawV2)(x) +func (x *fastReflection_ContentHashes) Interface() protoreflect.ProtoMessage { + return (*ContentHashes)(x) } // Range iterates over every populated field in an undefined order, @@ -1847,22 +1736,10 @@ func (x *fastReflection_ContentHash_RawV2) Interface() protoreflect.ProtoMessage // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_ContentHash_RawV2) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Hash) != 0 { - value := protoreflect.ValueOfBytes(x.Hash) - if !f(fd_ContentHash_RawV2_hash, value) { - return - } - } - if x.DigestAlgorithm != uint32(0) { - value := protoreflect.ValueOfUint32(x.DigestAlgorithm) - if !f(fd_ContentHash_RawV2_digest_algorithm, value) { - return - } - } - if x.FileExtension != "" { - value := protoreflect.ValueOfString(x.FileExtension) - if !f(fd_ContentHash_RawV2_file_extension, value) { +func (x *fastReflection_ContentHashes) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.ContentHashes) != 0 { + value := protoreflect.ValueOfList(&_ContentHashes_1_list{list: &x.ContentHashes}) + if !f(fd_ContentHashes_content_hashes, value) { return } } @@ -1879,19 +1756,15 @@ func (x *fastReflection_ContentHash_RawV2) Range(f func(protoreflect.FieldDescri // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_ContentHash_RawV2) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_ContentHashes) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "regen.data.v1.ContentHash.RawV2.hash": - return len(x.Hash) != 0 - case "regen.data.v1.ContentHash.RawV2.digest_algorithm": - return x.DigestAlgorithm != uint32(0) - case "regen.data.v1.ContentHash.RawV2.file_extension": - return x.FileExtension != "" + case "regen.data.v1.ContentHashes.content_hashes": + return len(x.ContentHashes) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.RawV2")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHashes")) } - panic(fmt.Errorf("message regen.data.v1.ContentHash.RawV2 does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.data.v1.ContentHashes does not contain field %s", fd.FullName())) } } @@ -1901,19 +1774,15 @@ func (x *fastReflection_ContentHash_RawV2) Has(fd protoreflect.FieldDescriptor) // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ContentHash_RawV2) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_ContentHashes) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "regen.data.v1.ContentHash.RawV2.hash": - x.Hash = nil - case "regen.data.v1.ContentHash.RawV2.digest_algorithm": - x.DigestAlgorithm = uint32(0) - case "regen.data.v1.ContentHash.RawV2.file_extension": - x.FileExtension = "" + case "regen.data.v1.ContentHashes.content_hashes": + x.ContentHashes = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.RawV2")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHashes")) } - panic(fmt.Errorf("message regen.data.v1.ContentHash.RawV2 does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.data.v1.ContentHashes does not contain field %s", fd.FullName())) } } @@ -1923,22 +1792,19 @@ func (x *fastReflection_ContentHash_RawV2) Clear(fd protoreflect.FieldDescriptor // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ContentHash_RawV2) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_ContentHashes) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "regen.data.v1.ContentHash.RawV2.hash": - value := x.Hash - return protoreflect.ValueOfBytes(value) - case "regen.data.v1.ContentHash.RawV2.digest_algorithm": - value := x.DigestAlgorithm - return protoreflect.ValueOfUint32(value) - case "regen.data.v1.ContentHash.RawV2.file_extension": - value := x.FileExtension - return protoreflect.ValueOfString(value) + case "regen.data.v1.ContentHashes.content_hashes": + if len(x.ContentHashes) == 0 { + return protoreflect.ValueOfList(&_ContentHashes_1_list{}) + } + listValue := &_ContentHashes_1_list{list: &x.ContentHashes} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.RawV2")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHashes")) } - panic(fmt.Errorf("message regen.data.v1.ContentHash.RawV2 does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message regen.data.v1.ContentHashes does not contain field %s", descriptor.FullName())) } } @@ -1952,19 +1818,17 @@ func (x *fastReflection_ContentHash_RawV2) Get(descriptor protoreflect.FieldDesc // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ContentHash_RawV2) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_ContentHashes) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "regen.data.v1.ContentHash.RawV2.hash": - x.Hash = value.Bytes() - case "regen.data.v1.ContentHash.RawV2.digest_algorithm": - x.DigestAlgorithm = uint32(value.Uint()) - case "regen.data.v1.ContentHash.RawV2.file_extension": - x.FileExtension = value.Interface().(string) + case "regen.data.v1.ContentHashes.content_hashes": + lv := value.List() + clv := lv.(*_ContentHashes_1_list) + x.ContentHashes = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.RawV2")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHashes")) } - panic(fmt.Errorf("message regen.data.v1.ContentHash.RawV2 does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.data.v1.ContentHashes does not contain field %s", fd.FullName())) } } @@ -1978,48 +1842,45 @@ func (x *fastReflection_ContentHash_RawV2) Set(fd protoreflect.FieldDescriptor, // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ContentHash_RawV2) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_ContentHashes) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "regen.data.v1.ContentHash.RawV2.hash": - panic(fmt.Errorf("field hash of message regen.data.v1.ContentHash.RawV2 is not mutable")) - case "regen.data.v1.ContentHash.RawV2.digest_algorithm": - panic(fmt.Errorf("field digest_algorithm of message regen.data.v1.ContentHash.RawV2 is not mutable")) - case "regen.data.v1.ContentHash.RawV2.file_extension": - panic(fmt.Errorf("field file_extension of message regen.data.v1.ContentHash.RawV2 is not mutable")) + case "regen.data.v1.ContentHashes.content_hashes": + if x.ContentHashes == nil { + x.ContentHashes = []*ContentHash{} + } + value := &_ContentHashes_1_list{list: &x.ContentHashes} + return protoreflect.ValueOfList(value) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.RawV2")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHashes")) } - panic(fmt.Errorf("message regen.data.v1.ContentHash.RawV2 does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.data.v1.ContentHashes does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ContentHash_RawV2) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_ContentHashes) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "regen.data.v1.ContentHash.RawV2.hash": - return protoreflect.ValueOfBytes(nil) - case "regen.data.v1.ContentHash.RawV2.digest_algorithm": - return protoreflect.ValueOfUint32(uint32(0)) - case "regen.data.v1.ContentHash.RawV2.file_extension": - return protoreflect.ValueOfString("") + case "regen.data.v1.ContentHashes.content_hashes": + list := []*ContentHash{} + return protoreflect.ValueOfList(&_ContentHashes_1_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.RawV2")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHashes")) } - panic(fmt.Errorf("message regen.data.v1.ContentHash.RawV2 does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message regen.data.v1.ContentHashes does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ContentHash_RawV2) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_ContentHashes) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in regen.data.v1.ContentHash.RawV2", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in regen.data.v1.ContentHashes", d.FullName())) } panic("unreachable") } @@ -2027,7 +1888,7 @@ func (x *fastReflection_ContentHash_RawV2) WhichOneof(d protoreflect.OneofDescri // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ContentHash_RawV2) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_ContentHashes) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2038,7 +1899,7 @@ func (x *fastReflection_ContentHash_RawV2) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ContentHash_RawV2) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_ContentHashes) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2050,7 +1911,7 @@ func (x *fastReflection_ContentHash_RawV2) SetUnknown(fields protoreflect.RawFie // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_ContentHash_RawV2) IsValid() bool { +func (x *fastReflection_ContentHashes) IsValid() bool { return x != nil } @@ -2060,9 +1921,9 @@ func (x *fastReflection_ContentHash_RawV2) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_ContentHash_RawV2) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_ContentHashes) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ContentHash_RawV2) + x := input.Message.Interface().(*ContentHashes) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2074,1130 +1935,11 @@ func (x *fastReflection_ContentHash_RawV2) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Hash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.DigestAlgorithm != 0 { - n += 1 + runtime.Sov(uint64(x.DigestAlgorithm)) - } - l = len(x.FileExtension) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ContentHash_RawV2) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.FileExtension) > 0 { - i -= len(x.FileExtension) - copy(dAtA[i:], x.FileExtension) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FileExtension))) - i-- - dAtA[i] = 0x1a - } - if x.DigestAlgorithm != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.DigestAlgorithm)) - i-- - dAtA[i] = 0x10 - } - if len(x.Hash) > 0 { - i -= len(x.Hash) - copy(dAtA[i:], x.Hash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Hash))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ContentHash_RawV2) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContentHash_RawV2: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContentHash_RawV2: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Hash = append(x.Hash[:0], dAtA[iNdEx:postIndex]...) - if x.Hash == nil { - x.Hash = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DigestAlgorithm", wireType) - } - x.DigestAlgorithm = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.DigestAlgorithm |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FileExtension", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.FileExtension = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ContentHash_GraphV2 protoreflect.MessageDescriptor - fd_ContentHash_GraphV2_hash protoreflect.FieldDescriptor - fd_ContentHash_GraphV2_digest_algorithm protoreflect.FieldDescriptor - fd_ContentHash_GraphV2_canonicalization_algorithm protoreflect.FieldDescriptor - fd_ContentHash_GraphV2_merkle_tree protoreflect.FieldDescriptor -) - -func init() { - file_regen_data_v1_types_proto_init() - md_ContentHash_GraphV2 = File_regen_data_v1_types_proto.Messages().ByName("ContentHash").Messages().ByName("GraphV2") - fd_ContentHash_GraphV2_hash = md_ContentHash_GraphV2.Fields().ByName("hash") - fd_ContentHash_GraphV2_digest_algorithm = md_ContentHash_GraphV2.Fields().ByName("digest_algorithm") - fd_ContentHash_GraphV2_canonicalization_algorithm = md_ContentHash_GraphV2.Fields().ByName("canonicalization_algorithm") - fd_ContentHash_GraphV2_merkle_tree = md_ContentHash_GraphV2.Fields().ByName("merkle_tree") -} - -var _ protoreflect.Message = (*fastReflection_ContentHash_GraphV2)(nil) - -type fastReflection_ContentHash_GraphV2 ContentHash_GraphV2 - -func (x *ContentHash_GraphV2) ProtoReflect() protoreflect.Message { - return (*fastReflection_ContentHash_GraphV2)(x) -} - -func (x *ContentHash_GraphV2) slowProtoReflect() protoreflect.Message { - mi := &file_regen_data_v1_types_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ContentHash_GraphV2_messageType fastReflection_ContentHash_GraphV2_messageType -var _ protoreflect.MessageType = fastReflection_ContentHash_GraphV2_messageType{} - -type fastReflection_ContentHash_GraphV2_messageType struct{} - -func (x fastReflection_ContentHash_GraphV2_messageType) Zero() protoreflect.Message { - return (*fastReflection_ContentHash_GraphV2)(nil) -} -func (x fastReflection_ContentHash_GraphV2_messageType) New() protoreflect.Message { - return new(fastReflection_ContentHash_GraphV2) -} -func (x fastReflection_ContentHash_GraphV2_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ContentHash_GraphV2 -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ContentHash_GraphV2) Descriptor() protoreflect.MessageDescriptor { - return md_ContentHash_GraphV2 -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ContentHash_GraphV2) Type() protoreflect.MessageType { - return _fastReflection_ContentHash_GraphV2_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ContentHash_GraphV2) New() protoreflect.Message { - return new(fastReflection_ContentHash_GraphV2) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ContentHash_GraphV2) Interface() protoreflect.ProtoMessage { - return (*ContentHash_GraphV2)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ContentHash_GraphV2) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Hash) != 0 { - value := protoreflect.ValueOfBytes(x.Hash) - if !f(fd_ContentHash_GraphV2_hash, value) { - return - } - } - if x.DigestAlgorithm != uint32(0) { - value := protoreflect.ValueOfUint32(x.DigestAlgorithm) - if !f(fd_ContentHash_GraphV2_digest_algorithm, value) { - return - } - } - if x.CanonicalizationAlgorithm != uint32(0) { - value := protoreflect.ValueOfUint32(x.CanonicalizationAlgorithm) - if !f(fd_ContentHash_GraphV2_canonicalization_algorithm, value) { - return - } - } - if x.MerkleTree != uint32(0) { - value := protoreflect.ValueOfUint32(x.MerkleTree) - if !f(fd_ContentHash_GraphV2_merkle_tree, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ContentHash_GraphV2) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "regen.data.v1.ContentHash.GraphV2.hash": - return len(x.Hash) != 0 - case "regen.data.v1.ContentHash.GraphV2.digest_algorithm": - return x.DigestAlgorithm != uint32(0) - case "regen.data.v1.ContentHash.GraphV2.canonicalization_algorithm": - return x.CanonicalizationAlgorithm != uint32(0) - case "regen.data.v1.ContentHash.GraphV2.merkle_tree": - return x.MerkleTree != uint32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.GraphV2")) - } - panic(fmt.Errorf("message regen.data.v1.ContentHash.GraphV2 does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ContentHash_GraphV2) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "regen.data.v1.ContentHash.GraphV2.hash": - x.Hash = nil - case "regen.data.v1.ContentHash.GraphV2.digest_algorithm": - x.DigestAlgorithm = uint32(0) - case "regen.data.v1.ContentHash.GraphV2.canonicalization_algorithm": - x.CanonicalizationAlgorithm = uint32(0) - case "regen.data.v1.ContentHash.GraphV2.merkle_tree": - x.MerkleTree = uint32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.GraphV2")) - } - panic(fmt.Errorf("message regen.data.v1.ContentHash.GraphV2 does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ContentHash_GraphV2) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "regen.data.v1.ContentHash.GraphV2.hash": - value := x.Hash - return protoreflect.ValueOfBytes(value) - case "regen.data.v1.ContentHash.GraphV2.digest_algorithm": - value := x.DigestAlgorithm - return protoreflect.ValueOfUint32(value) - case "regen.data.v1.ContentHash.GraphV2.canonicalization_algorithm": - value := x.CanonicalizationAlgorithm - return protoreflect.ValueOfUint32(value) - case "regen.data.v1.ContentHash.GraphV2.merkle_tree": - value := x.MerkleTree - return protoreflect.ValueOfUint32(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.GraphV2")) - } - panic(fmt.Errorf("message regen.data.v1.ContentHash.GraphV2 does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ContentHash_GraphV2) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "regen.data.v1.ContentHash.GraphV2.hash": - x.Hash = value.Bytes() - case "regen.data.v1.ContentHash.GraphV2.digest_algorithm": - x.DigestAlgorithm = uint32(value.Uint()) - case "regen.data.v1.ContentHash.GraphV2.canonicalization_algorithm": - x.CanonicalizationAlgorithm = uint32(value.Uint()) - case "regen.data.v1.ContentHash.GraphV2.merkle_tree": - x.MerkleTree = uint32(value.Uint()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.GraphV2")) - } - panic(fmt.Errorf("message regen.data.v1.ContentHash.GraphV2 does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ContentHash_GraphV2) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.data.v1.ContentHash.GraphV2.hash": - panic(fmt.Errorf("field hash of message regen.data.v1.ContentHash.GraphV2 is not mutable")) - case "regen.data.v1.ContentHash.GraphV2.digest_algorithm": - panic(fmt.Errorf("field digest_algorithm of message regen.data.v1.ContentHash.GraphV2 is not mutable")) - case "regen.data.v1.ContentHash.GraphV2.canonicalization_algorithm": - panic(fmt.Errorf("field canonicalization_algorithm of message regen.data.v1.ContentHash.GraphV2 is not mutable")) - case "regen.data.v1.ContentHash.GraphV2.merkle_tree": - panic(fmt.Errorf("field merkle_tree of message regen.data.v1.ContentHash.GraphV2 is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.GraphV2")) - } - panic(fmt.Errorf("message regen.data.v1.ContentHash.GraphV2 does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ContentHash_GraphV2) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.data.v1.ContentHash.GraphV2.hash": - return protoreflect.ValueOfBytes(nil) - case "regen.data.v1.ContentHash.GraphV2.digest_algorithm": - return protoreflect.ValueOfUint32(uint32(0)) - case "regen.data.v1.ContentHash.GraphV2.canonicalization_algorithm": - return protoreflect.ValueOfUint32(uint32(0)) - case "regen.data.v1.ContentHash.GraphV2.merkle_tree": - return protoreflect.ValueOfUint32(uint32(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHash.GraphV2")) - } - panic(fmt.Errorf("message regen.data.v1.ContentHash.GraphV2 does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ContentHash_GraphV2) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in regen.data.v1.ContentHash.GraphV2", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ContentHash_GraphV2) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ContentHash_GraphV2) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ContentHash_GraphV2) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ContentHash_GraphV2) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ContentHash_GraphV2) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Hash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.DigestAlgorithm != 0 { - n += 1 + runtime.Sov(uint64(x.DigestAlgorithm)) - } - if x.CanonicalizationAlgorithm != 0 { - n += 1 + runtime.Sov(uint64(x.CanonicalizationAlgorithm)) - } - if x.MerkleTree != 0 { - n += 1 + runtime.Sov(uint64(x.MerkleTree)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ContentHash_GraphV2) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.MerkleTree != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MerkleTree)) - i-- - dAtA[i] = 0x20 - } - if x.CanonicalizationAlgorithm != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.CanonicalizationAlgorithm)) - i-- - dAtA[i] = 0x18 - } - if x.DigestAlgorithm != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.DigestAlgorithm)) - i-- - dAtA[i] = 0x10 - } - if len(x.Hash) > 0 { - i -= len(x.Hash) - copy(dAtA[i:], x.Hash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Hash))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ContentHash_GraphV2) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContentHash_GraphV2: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ContentHash_GraphV2: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Hash = append(x.Hash[:0], dAtA[iNdEx:postIndex]...) - if x.Hash == nil { - x.Hash = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DigestAlgorithm", wireType) - } - x.DigestAlgorithm = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.DigestAlgorithm |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CanonicalizationAlgorithm", wireType) - } - x.CanonicalizationAlgorithm = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.CanonicalizationAlgorithm |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MerkleTree", wireType) - } - x.MerkleTree = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.MerkleTree |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ContentHashes_1_list)(nil) - -type _ContentHashes_1_list struct { - list *[]*ContentHash -} - -func (x *_ContentHashes_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ContentHashes_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ContentHashes_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ContentHash) - (*x.list)[i] = concreteValue -} - -func (x *_ContentHashes_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ContentHash) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ContentHashes_1_list) AppendMutable() protoreflect.Value { - v := new(ContentHash) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ContentHashes_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ContentHashes_1_list) NewElement() protoreflect.Value { - v := new(ContentHash) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ContentHashes_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ContentHashes protoreflect.MessageDescriptor - fd_ContentHashes_content_hashes protoreflect.FieldDescriptor -) - -func init() { - file_regen_data_v1_types_proto_init() - md_ContentHashes = File_regen_data_v1_types_proto.Messages().ByName("ContentHashes") - fd_ContentHashes_content_hashes = md_ContentHashes.Fields().ByName("content_hashes") -} - -var _ protoreflect.Message = (*fastReflection_ContentHashes)(nil) - -type fastReflection_ContentHashes ContentHashes - -func (x *ContentHashes) ProtoReflect() protoreflect.Message { - return (*fastReflection_ContentHashes)(x) -} - -func (x *ContentHashes) slowProtoReflect() protoreflect.Message { - mi := &file_regen_data_v1_types_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ContentHashes_messageType fastReflection_ContentHashes_messageType -var _ protoreflect.MessageType = fastReflection_ContentHashes_messageType{} - -type fastReflection_ContentHashes_messageType struct{} - -func (x fastReflection_ContentHashes_messageType) Zero() protoreflect.Message { - return (*fastReflection_ContentHashes)(nil) -} -func (x fastReflection_ContentHashes_messageType) New() protoreflect.Message { - return new(fastReflection_ContentHashes) -} -func (x fastReflection_ContentHashes_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ContentHashes -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ContentHashes) Descriptor() protoreflect.MessageDescriptor { - return md_ContentHashes -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ContentHashes) Type() protoreflect.MessageType { - return _fastReflection_ContentHashes_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ContentHashes) New() protoreflect.Message { - return new(fastReflection_ContentHashes) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ContentHashes) Interface() protoreflect.ProtoMessage { - return (*ContentHashes)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ContentHashes) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.ContentHashes) != 0 { - value := protoreflect.ValueOfList(&_ContentHashes_1_list{list: &x.ContentHashes}) - if !f(fd_ContentHashes_content_hashes, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ContentHashes) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "regen.data.v1.ContentHashes.content_hashes": - return len(x.ContentHashes) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHashes")) - } - panic(fmt.Errorf("message regen.data.v1.ContentHashes does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ContentHashes) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "regen.data.v1.ContentHashes.content_hashes": - x.ContentHashes = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHashes")) - } - panic(fmt.Errorf("message regen.data.v1.ContentHashes does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ContentHashes) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "regen.data.v1.ContentHashes.content_hashes": - if len(x.ContentHashes) == 0 { - return protoreflect.ValueOfList(&_ContentHashes_1_list{}) - } - listValue := &_ContentHashes_1_list{list: &x.ContentHashes} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHashes")) - } - panic(fmt.Errorf("message regen.data.v1.ContentHashes does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ContentHashes) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "regen.data.v1.ContentHashes.content_hashes": - lv := value.List() - clv := lv.(*_ContentHashes_1_list) - x.ContentHashes = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHashes")) - } - panic(fmt.Errorf("message regen.data.v1.ContentHashes does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ContentHashes) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.data.v1.ContentHashes.content_hashes": - if x.ContentHashes == nil { - x.ContentHashes = []*ContentHash{} - } - value := &_ContentHashes_1_list{list: &x.ContentHashes} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHashes")) - } - panic(fmt.Errorf("message regen.data.v1.ContentHashes does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ContentHashes) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "regen.data.v1.ContentHashes.content_hashes": - list := []*ContentHash{} - return protoreflect.ValueOfList(&_ContentHashes_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: regen.data.v1.ContentHashes")) - } - panic(fmt.Errorf("message regen.data.v1.ContentHashes does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ContentHashes) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in regen.data.v1.ContentHashes", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ContentHashes) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ContentHashes) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ContentHashes) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ContentHashes) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ContentHashes) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.ContentHashes) > 0 { - for _, e := range x.ContentHashes { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } + if len(x.ContentHashes) > 0 { + for _, e := range x.ContentHashes { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } } if x.unknownFields != nil { n += len(x.unknownFields) @@ -3424,7 +2166,6 @@ func (DigestAlgorithm) EnumDescriptor() ([]byte, []int) { return file_regen_data_v1_types_proto_rawDescGZIP(), []int{0} } -// Deprecated: use RawV2 instead. // RawMediaType defines MIME media types to be used with a ContentHash.Raw hash. type RawMediaType int32 @@ -3638,7 +2379,6 @@ type ContentHash struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Deprecated: use RawV2 instead. // Raw specifies "raw" data which does not specify a deterministic, canonical // encoding. Users of these hashes MUST maintain a copy of the hashed data // which is preserved bit by bit. All other content encodings specify a @@ -3646,28 +2386,11 @@ type ContentHash struct { // variety of alternative formats for transport and encoding while maintaining // the guarantee that the canonical hash will not change. The media type for // "raw" data is defined by the MediaType enum. - // - // Deprecated: Do not use. Raw *ContentHash_Raw `protobuf:"bytes,1,opt,name=raw,proto3" json:"raw,omitempty"` - // Deprecated: use GraphV2 instead. // Graph specifies graph data that conforms to the RDF data model. // The canonicalization algorithm used for an RDF graph is specified by // GraphCanonicalizationAlgorithm. - // - // Deprecated: Do not use. Graph *ContentHash_Graph `protobuf:"bytes,2,opt,name=graph,proto3" json:"graph,omitempty"` - // raw_v2 specifies "raw" data which does not specify a deterministic, canonical - // encoding. Users of these hashes MUST maintain a copy of the hashed data - // which is preserved bit by bit. All other content encodings specify a - // deterministic, canonical encoding allowing implementations to choose from a - // variety of alternative formats for transport and encoding while maintaining - // the guarantee that the canonical hash will not change. The media type for - // "raw" data is defined by the MediaType enum. - RawV2 *ContentHash_RawV2 `protobuf:"bytes,3,opt,name=raw_v2,json=rawV2,proto3" json:"raw_v2,omitempty"` - // graph_v2 specifies graph data that conforms to the RDF data model. - // The canonicalization algorithm used for an RDF graph is specified by - // GraphCanonicalizationAlgorithm. - GraphV2 *ContentHash_GraphV2 `protobuf:"bytes,4,opt,name=graph_v2,json=graphV2,proto3" json:"graph_v2,omitempty"` } func (x *ContentHash) Reset() { @@ -3690,7 +2413,6 @@ func (*ContentHash) Descriptor() ([]byte, []int) { return file_regen_data_v1_types_proto_rawDescGZIP(), []int{0} } -// Deprecated: Do not use. func (x *ContentHash) GetRaw() *ContentHash_Raw { if x != nil { return x.Raw @@ -3698,7 +2420,6 @@ func (x *ContentHash) GetRaw() *ContentHash_Raw { return nil } -// Deprecated: Do not use. func (x *ContentHash) GetGraph() *ContentHash_Graph { if x != nil { return x.Graph @@ -3706,20 +2427,6 @@ func (x *ContentHash) GetGraph() *ContentHash_Graph { return nil } -func (x *ContentHash) GetRawV2() *ContentHash_RawV2 { - if x != nil { - return x.RawV2 - } - return nil -} - -func (x *ContentHash) GetGraphV2() *ContentHash_GraphV2 { - if x != nil { - return x.GraphV2 - } - return nil -} - // ContentHashes contains list of content ContentHash. type ContentHashes struct { state protoimpl.MessageState @@ -3879,160 +2586,20 @@ func (x *ContentHash_Graph) GetMerkleTree() GraphMerkleTree { return GraphMerkleTree_GRAPH_MERKLE_TREE_NONE_UNSPECIFIED } -// RawV2 is the content hash type used for raw data. -type ContentHash_RawV2 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // hash represents the hash of the data based on the specified - // digest_algorithm. - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - // digest_algorithm represents the hash digest algorithm. - DigestAlgorithm uint32 `protobuf:"varint,2,opt,name=digest_algorithm,json=digestAlgorithm,proto3" json:"digest_algorithm,omitempty"` - // file_extension represents the file extension for raw data. It can be - // up to six characters long, must be all lower-case and should represent - // the canonical extension for the media type. - // - // A list of canonical extensions which should be used is provided here - // and SHOULD be used by implementations: txt, json, csv, xml, pdf, tiff, - // jpg, png, svg, webp, avif, gif, apng, mpeg, mp4, webm, ogg, heic, raw. - // - // The above list should be updated as new media types come into common usage - // especially when there are two or more possible extensions (i.e. jpg vs jpeg or tif vs tiff). - FileExtension string `protobuf:"bytes,3,opt,name=file_extension,json=fileExtension,proto3" json:"file_extension,omitempty"` -} - -func (x *ContentHash_RawV2) Reset() { - *x = ContentHash_RawV2{} - if protoimpl.UnsafeEnabled { - mi := &file_regen_data_v1_types_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ContentHash_RawV2) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ContentHash_RawV2) ProtoMessage() {} - -// Deprecated: Use ContentHash_RawV2.ProtoReflect.Descriptor instead. -func (*ContentHash_RawV2) Descriptor() ([]byte, []int) { - return file_regen_data_v1_types_proto_rawDescGZIP(), []int{0, 2} -} - -func (x *ContentHash_RawV2) GetHash() []byte { - if x != nil { - return x.Hash - } - return nil -} - -func (x *ContentHash_RawV2) GetDigestAlgorithm() uint32 { - if x != nil { - return x.DigestAlgorithm - } - return 0 -} - -func (x *ContentHash_RawV2) GetFileExtension() string { - if x != nil { - return x.FileExtension - } - return "" -} - -// GraphV2 is the content hash type used for RDF graph data. -type ContentHash_GraphV2 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // hash represents the hash of the data based on the specified - // digest_algorithm. - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - // digest_algorithm represents the hash digest algorithm and should be a value from the DigestAlgorithm enum. - DigestAlgorithm uint32 `protobuf:"varint,2,opt,name=digest_algorithm,json=digestAlgorithm,proto3" json:"digest_algorithm,omitempty"` - // graph_canonicalization_algorithm represents the RDF graph - // canonicalization algorithm and should be a value from the GraphCanonicalizationAlgorithm enum. - CanonicalizationAlgorithm uint32 `protobuf:"varint,3,opt,name=canonicalization_algorithm,json=canonicalizationAlgorithm,proto3" json:"canonicalization_algorithm,omitempty"` - // merkle_tree is the merkle tree type used for the graph hash, if any and should be a value from the GraphMerkleTree enum - // or left unspecified. - MerkleTree uint32 `protobuf:"varint,4,opt,name=merkle_tree,json=merkleTree,proto3" json:"merkle_tree,omitempty"` -} - -func (x *ContentHash_GraphV2) Reset() { - *x = ContentHash_GraphV2{} - if protoimpl.UnsafeEnabled { - mi := &file_regen_data_v1_types_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ContentHash_GraphV2) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ContentHash_GraphV2) ProtoMessage() {} - -// Deprecated: Use ContentHash_GraphV2.ProtoReflect.Descriptor instead. -func (*ContentHash_GraphV2) Descriptor() ([]byte, []int) { - return file_regen_data_v1_types_proto_rawDescGZIP(), []int{0, 3} -} - -func (x *ContentHash_GraphV2) GetHash() []byte { - if x != nil { - return x.Hash - } - return nil -} - -func (x *ContentHash_GraphV2) GetDigestAlgorithm() uint32 { - if x != nil { - return x.DigestAlgorithm - } - return 0 -} - -func (x *ContentHash_GraphV2) GetCanonicalizationAlgorithm() uint32 { - if x != nil { - return x.CanonicalizationAlgorithm - } - return 0 -} - -func (x *ContentHash_GraphV2) GetMerkleTree() uint32 { - if x != nil { - return x.MerkleTree - } - return 0 -} - var File_regen_data_v1_types_proto protoreflect.FileDescriptor var file_regen_data_v1_types_proto_rawDesc = []byte{ 0x0a, 0x19, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x72, 0x65, 0x67, - 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x22, 0xcc, 0x07, 0x0a, 0x0b, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x34, 0x0a, 0x03, 0x72, 0x61, + 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x22, 0xb2, 0x04, 0x0a, 0x0b, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x30, 0x0a, 0x03, 0x72, 0x61, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, - 0x61, 0x73, 0x68, 0x2e, 0x52, 0x61, 0x77, 0x42, 0x02, 0x18, 0x01, 0x52, 0x03, 0x72, 0x61, 0x77, - 0x12, 0x3a, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x70, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x20, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x2e, 0x47, 0x72, 0x61, 0x70, - 0x68, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, 0x67, 0x72, 0x61, 0x70, 0x68, 0x12, 0x37, 0x0a, 0x06, - 0x72, 0x61, 0x77, 0x5f, 0x76, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, - 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x2e, 0x52, 0x61, 0x77, 0x56, 0x32, 0x52, 0x05, - 0x72, 0x61, 0x77, 0x56, 0x32, 0x12, 0x3d, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x70, 0x68, 0x5f, 0x76, - 0x32, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, - 0x61, 0x73, 0x68, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x56, 0x32, 0x52, 0x07, 0x67, 0x72, 0x61, - 0x70, 0x68, 0x56, 0x32, 0x1a, 0xa0, 0x01, 0x0a, 0x03, 0x52, 0x61, 0x77, 0x12, 0x12, 0x0a, 0x04, + 0x61, 0x73, 0x68, 0x2e, 0x52, 0x61, 0x77, 0x52, 0x03, 0x72, 0x61, 0x77, 0x12, 0x36, 0x0a, 0x05, + 0x67, 0x72, 0x61, 0x70, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x52, 0x05, 0x67, + 0x72, 0x61, 0x70, 0x68, 0x1a, 0xa0, 0x01, 0x0a, 0x03, 0x52, 0x61, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x49, 0x0a, 0x10, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x72, 0x65, 0x67, @@ -4059,89 +2626,72 @@ var file_regen_data_v1_types_proto_rawDesc = []byte{ 0x0a, 0x0b, 0x6d, 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x4d, 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x54, - 0x72, 0x65, 0x65, 0x52, 0x0a, 0x6d, 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x54, 0x72, 0x65, 0x65, 0x1a, - 0x6d, 0x0a, 0x05, 0x52, 0x61, 0x77, 0x56, 0x32, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x29, 0x0a, 0x10, - 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x41, 0x6c, - 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x69, 0x6c, 0x65, 0x5f, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0d, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0xa8, - 0x01, 0x0a, 0x07, 0x47, 0x72, 0x61, 0x70, 0x68, 0x56, 0x32, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x29, - 0x0a, 0x10, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, - 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, - 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x3d, 0x0a, 0x1a, 0x63, 0x61, 0x6e, - 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6c, - 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x19, 0x63, - 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, - 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x65, 0x72, 0x6b, - 0x6c, 0x65, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6d, - 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x54, 0x72, 0x65, 0x65, 0x22, 0x52, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x41, 0x0a, 0x0e, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x52, 0x0d, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x2a, 0x55, 0x0a, - 0x0f, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, - 0x12, 0x20, 0x0a, 0x1c, 0x44, 0x49, 0x47, 0x45, 0x53, 0x54, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, - 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1c, 0x44, 0x49, 0x47, 0x45, 0x53, 0x54, 0x5f, 0x41, 0x4c, 0x47, - 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x42, 0x4c, 0x41, 0x4b, 0x45, 0x32, 0x42, 0x5f, 0x32, - 0x35, 0x36, 0x10, 0x01, 0x2a, 0xd4, 0x03, 0x0a, 0x0c, 0x52, 0x61, 0x77, 0x4d, 0x65, 0x64, 0x69, - 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, - 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, - 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x45, 0x58, 0x54, 0x5f, 0x50, 0x4c, 0x41, - 0x49, 0x4e, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, - 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x16, 0x0a, - 0x12, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x43, 0x53, 0x56, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, - 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x58, 0x4d, 0x4c, 0x10, 0x04, 0x12, 0x16, 0x0a, - 0x12, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x50, 0x44, 0x46, 0x10, 0x05, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, - 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x49, 0x46, 0x46, 0x10, 0x10, 0x12, 0x16, - 0x0a, 0x12, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x4a, 0x50, 0x47, 0x10, 0x11, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, - 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x4e, 0x47, 0x10, 0x12, 0x12, 0x16, + 0x72, 0x65, 0x65, 0x52, 0x0a, 0x6d, 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x54, 0x72, 0x65, 0x65, 0x22, + 0x52, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, + 0x12, 0x41, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x48, 0x61, 0x73, 0x68, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, + 0x68, 0x65, 0x73, 0x2a, 0x55, 0x0a, 0x0f, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x41, 0x6c, 0x67, + 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x20, 0x0a, 0x1c, 0x44, 0x49, 0x47, 0x45, 0x53, 0x54, + 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1c, 0x44, 0x49, 0x47, 0x45, + 0x53, 0x54, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x42, 0x4c, 0x41, + 0x4b, 0x45, 0x32, 0x42, 0x5f, 0x32, 0x35, 0x36, 0x10, 0x01, 0x2a, 0xd4, 0x03, 0x0a, 0x0c, 0x52, + 0x61, 0x77, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x52, + 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x52, + 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x45, + 0x58, 0x54, 0x5f, 0x50, 0x4c, 0x41, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x41, + 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4a, 0x53, 0x4f, + 0x4e, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x53, 0x56, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x52, + 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x58, 0x4d, + 0x4c, 0x10, 0x04, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x44, 0x46, 0x10, 0x05, 0x12, 0x17, 0x0a, 0x13, 0x52, + 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x49, + 0x46, 0x46, 0x10, 0x10, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, + 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4a, 0x50, 0x47, 0x10, 0x11, 0x12, 0x16, 0x0a, 0x12, + 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, + 0x4e, 0x47, 0x10, 0x12, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, + 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x56, 0x47, 0x10, 0x13, 0x12, 0x17, 0x0a, 0x13, + 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x57, + 0x45, 0x42, 0x50, 0x10, 0x14, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, + 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x56, 0x49, 0x46, 0x10, 0x15, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x53, 0x56, 0x47, 0x10, 0x13, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, - 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x57, 0x45, 0x42, 0x50, 0x10, 0x14, 0x12, + 0x5f, 0x47, 0x49, 0x46, 0x10, 0x16, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, + 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x50, 0x4e, 0x47, 0x10, 0x17, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x41, 0x56, 0x49, 0x46, 0x10, 0x15, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x41, 0x57, 0x5f, - 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x49, 0x46, 0x10, 0x16, + 0x45, 0x5f, 0x4d, 0x50, 0x45, 0x47, 0x10, 0x20, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x41, 0x57, 0x5f, + 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x50, 0x34, 0x10, 0x21, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x41, 0x50, 0x4e, 0x47, 0x10, 0x17, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x41, 0x57, - 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x50, 0x45, 0x47, - 0x10, 0x20, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x50, 0x34, 0x10, 0x21, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x41, - 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x57, 0x45, 0x42, - 0x4d, 0x10, 0x22, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x41, 0x57, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x47, 0x47, 0x10, 0x23, 0x2a, 0x82, 0x01, 0x0a, 0x1e, - 0x47, 0x72, 0x61, 0x70, 0x68, 0x43, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x30, - 0x0a, 0x2c, 0x47, 0x52, 0x41, 0x50, 0x48, 0x5f, 0x43, 0x41, 0x4e, 0x4f, 0x4e, 0x49, 0x43, 0x41, - 0x4c, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, - 0x48, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x2e, 0x0a, 0x2a, 0x47, 0x52, 0x41, 0x50, 0x48, 0x5f, 0x43, 0x41, 0x4e, 0x4f, 0x4e, 0x49, - 0x43, 0x41, 0x4c, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, - 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x55, 0x52, 0x44, 0x4e, 0x41, 0x32, 0x30, 0x31, 0x35, 0x10, 0x01, - 0x2a, 0x39, 0x0a, 0x0f, 0x47, 0x72, 0x61, 0x70, 0x68, 0x4d, 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x54, - 0x72, 0x65, 0x65, 0x12, 0x26, 0x0a, 0x22, 0x47, 0x52, 0x41, 0x50, 0x48, 0x5f, 0x4d, 0x45, 0x52, - 0x4b, 0x4c, 0x45, 0x5f, 0x54, 0x52, 0x45, 0x45, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x42, 0xb5, 0x01, 0x0a, 0x11, - 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, - 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x67, 0x65, - 0x6e, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, - 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, - 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x76, 0x31, 0xa2, - 0x02, 0x03, 0x52, 0x44, 0x58, 0xaa, 0x02, 0x0d, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x44, 0x61, - 0x74, 0x61, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x44, 0x61, - 0x74, 0x61, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x5c, 0x44, 0x61, - 0x74, 0x61, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x0f, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x50, 0x45, 0x5f, 0x57, 0x45, 0x42, 0x4d, 0x10, 0x22, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x41, 0x57, + 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x47, 0x47, 0x10, + 0x23, 0x2a, 0x82, 0x01, 0x0a, 0x1e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x43, 0x61, 0x6e, 0x6f, 0x6e, + 0x69, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x6c, 0x67, 0x6f, 0x72, + 0x69, 0x74, 0x68, 0x6d, 0x12, 0x30, 0x0a, 0x2c, 0x47, 0x52, 0x41, 0x50, 0x48, 0x5f, 0x43, 0x41, + 0x4e, 0x4f, 0x4e, 0x49, 0x43, 0x41, 0x4c, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, + 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2e, 0x0a, 0x2a, 0x47, 0x52, 0x41, 0x50, 0x48, 0x5f, + 0x43, 0x41, 0x4e, 0x4f, 0x4e, 0x49, 0x43, 0x41, 0x4c, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x55, 0x52, 0x44, 0x4e, 0x41, + 0x32, 0x30, 0x31, 0x35, 0x10, 0x01, 0x2a, 0x39, 0x0a, 0x0f, 0x47, 0x72, 0x61, 0x70, 0x68, 0x4d, + 0x65, 0x72, 0x6b, 0x6c, 0x65, 0x54, 0x72, 0x65, 0x65, 0x12, 0x26, 0x0a, 0x22, 0x47, 0x52, 0x41, + 0x50, 0x48, 0x5f, 0x4d, 0x45, 0x52, 0x4b, 0x4c, 0x45, 0x5f, 0x54, 0x52, 0x45, 0x45, 0x5f, 0x4e, + 0x4f, 0x4e, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x42, 0xb5, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, + 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x31, 0x3b, 0x64, + 0x61, 0x74, 0x61, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x58, 0xaa, 0x02, 0x0d, 0x52, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x52, 0x65, + 0x67, 0x65, 0x6e, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x52, 0x65, + 0x67, 0x65, 0x6e, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x52, 0x65, 0x67, 0x65, 0x6e, 0x3a, + 0x3a, 0x44, 0x61, 0x74, 0x61, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -4157,7 +2707,7 @@ func file_regen_data_v1_types_proto_rawDescGZIP() []byte { } var file_regen_data_v1_types_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_regen_data_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_regen_data_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_regen_data_v1_types_proto_goTypes = []interface{}{ (DigestAlgorithm)(0), // 0: regen.data.v1.DigestAlgorithm (RawMediaType)(0), // 1: regen.data.v1.RawMediaType @@ -4167,25 +2717,21 @@ var file_regen_data_v1_types_proto_goTypes = []interface{}{ (*ContentHashes)(nil), // 5: regen.data.v1.ContentHashes (*ContentHash_Raw)(nil), // 6: regen.data.v1.ContentHash.Raw (*ContentHash_Graph)(nil), // 7: regen.data.v1.ContentHash.Graph - (*ContentHash_RawV2)(nil), // 8: regen.data.v1.ContentHash.RawV2 - (*ContentHash_GraphV2)(nil), // 9: regen.data.v1.ContentHash.GraphV2 } var file_regen_data_v1_types_proto_depIdxs = []int32{ - 6, // 0: regen.data.v1.ContentHash.raw:type_name -> regen.data.v1.ContentHash.Raw - 7, // 1: regen.data.v1.ContentHash.graph:type_name -> regen.data.v1.ContentHash.Graph - 8, // 2: regen.data.v1.ContentHash.raw_v2:type_name -> regen.data.v1.ContentHash.RawV2 - 9, // 3: regen.data.v1.ContentHash.graph_v2:type_name -> regen.data.v1.ContentHash.GraphV2 - 4, // 4: regen.data.v1.ContentHashes.content_hashes:type_name -> regen.data.v1.ContentHash - 0, // 5: regen.data.v1.ContentHash.Raw.digest_algorithm:type_name -> regen.data.v1.DigestAlgorithm - 1, // 6: regen.data.v1.ContentHash.Raw.media_type:type_name -> regen.data.v1.RawMediaType - 0, // 7: regen.data.v1.ContentHash.Graph.digest_algorithm:type_name -> regen.data.v1.DigestAlgorithm - 2, // 8: regen.data.v1.ContentHash.Graph.canonicalization_algorithm:type_name -> regen.data.v1.GraphCanonicalizationAlgorithm - 3, // 9: regen.data.v1.ContentHash.Graph.merkle_tree:type_name -> regen.data.v1.GraphMerkleTree - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 6, // 0: regen.data.v1.ContentHash.raw:type_name -> regen.data.v1.ContentHash.Raw + 7, // 1: regen.data.v1.ContentHash.graph:type_name -> regen.data.v1.ContentHash.Graph + 4, // 2: regen.data.v1.ContentHashes.content_hashes:type_name -> regen.data.v1.ContentHash + 0, // 3: regen.data.v1.ContentHash.Raw.digest_algorithm:type_name -> regen.data.v1.DigestAlgorithm + 1, // 4: regen.data.v1.ContentHash.Raw.media_type:type_name -> regen.data.v1.RawMediaType + 0, // 5: regen.data.v1.ContentHash.Graph.digest_algorithm:type_name -> regen.data.v1.DigestAlgorithm + 2, // 6: regen.data.v1.ContentHash.Graph.canonicalization_algorithm:type_name -> regen.data.v1.GraphCanonicalizationAlgorithm + 3, // 7: regen.data.v1.ContentHash.Graph.merkle_tree:type_name -> regen.data.v1.GraphMerkleTree + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_regen_data_v1_types_proto_init() } @@ -4242,30 +2788,6 @@ func file_regen_data_v1_types_proto_init() { return nil } } - file_regen_data_v1_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContentHash_RawV2); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_regen_data_v1_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContentHash_GraphV2); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ @@ -4273,7 +2795,7 @@ func file_regen_data_v1_types_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_regen_data_v1_types_proto_rawDesc, NumEnums: 4, - NumMessages: 6, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/regen/data/v1/types.proto b/proto/regen/data/v1/types.proto index b45b8585be..c6c355f402 100644 --- a/proto/regen/data/v1/types.proto +++ b/proto/regen/data/v1/types.proto @@ -3,11 +3,8 @@ syntax = "proto3"; package regen.data.v1; // ContentHash specifies a hash-based content identifier for a piece of data. -// Exactly one of its fields must be set so this message behaves like a oneof. -// A protobuf oneof was not used because this caused compatibility issues with -// amino signing. message ContentHash { - // Deprecated: use RawV2 instead. + // Raw specifies "raw" data which does not specify a deterministic, canonical // encoding. Users of these hashes MUST maintain a copy of the hashed data // which is preserved bit by bit. All other content encodings specify a @@ -15,27 +12,12 @@ message ContentHash { // variety of alternative formats for transport and encoding while maintaining // the guarantee that the canonical hash will not change. The media type for // "raw" data is defined by the MediaType enum. - Raw raw = 1 [deprecated = true]; + Raw raw = 1; - // Deprecated: use GraphV2 instead. // Graph specifies graph data that conforms to the RDF data model. // The canonicalization algorithm used for an RDF graph is specified by // GraphCanonicalizationAlgorithm. - Graph graph = 2 [deprecated = true]; - - // raw_v2 specifies "raw" data which does not specify a deterministic, canonical - // encoding. Users of these hashes MUST maintain a copy of the hashed data - // which is preserved bit by bit. All other content encodings specify a - // deterministic, canonical encoding allowing implementations to choose from a - // variety of alternative formats for transport and encoding while maintaining - // the guarantee that the canonical hash will not change. The media type for - // "raw" data is defined by the MediaType enum. - RawV2 raw_v2 = 3; - - // graph_v2 specifies graph data that conforms to the RDF data model. - // The canonicalization algorithm used for an RDF graph is specified by - // GraphCanonicalizationAlgorithm. - GraphV2 graph_v2 = 4; + Graph graph = 2; // Raw is the content hash type used for raw data. message Raw { @@ -66,54 +48,11 @@ message ContentHash { // merkle_tree is the merkle tree type used for the graph hash, if any. GraphMerkleTree merkle_tree = 4; } - - // RawV2 is the content hash type used for raw data. - message RawV2 { - // hash represents the hash of the data based on the specified - // digest_algorithm. It must be at least 20 bytes long and at most 64 bytes long. - bytes hash = 1; - - // digest_algorithm represents the hash digest algorithm and should be a non-zero value from the DigestAlgorithm enum. - uint32 digest_algorithm = 2; - - // file_extension represents the file extension for raw data. It can be - // must be between 2-6 characters long, must be all lower-case and should represent - // the canonical extension for the media type. - // - // A list of canonical extensions which should be used is provided here - // and SHOULD be used by implementations: txt, json, csv, xml, pdf, tiff, - // jpg, png, svg, webp, avif, gif, apng, mpeg, mp4, webm, ogg, heic, raw. - // - // The above list should be updated as new media types come into common usage - // especially when there are two or more possible extensions (i.e. jpg vs jpeg or tif vs tiff). - string file_extension = 3; - } - - // GraphV2 is the content hash type used for RDF graph data. - message GraphV2 { - // hash represents the hash of the data based on the specified - // digest_algorithm. It must be at least 20 bytes long and at most 64 bytes long. - bytes hash = 1; - - // digest_algorithm represents the hash digest algorithm and should be a non-zero value from the DigestAlgorithm enum. - uint32 digest_algorithm = 2; - - // graph_canonicalization_algorithm represents the RDF graph - // canonicalization algorithm and should be a non-zero value from the GraphCanonicalizationAlgorithm enum. - uint32 canonicalization_algorithm = 3; - - // merkle_tree is the merkle tree type used for the graph hash, if any and should be a value from the GraphMerkleTree enum - // or left unspecified. - uint32 merkle_tree = 4; - } } // DigestAlgorithm is the hash digest algorithm -// -// With V2 of raw and graph hash, this enum is no longer validated on-chain. -// However, this enum SHOULD still be used and updated as a registry of known digest -// algorithms and all implementations should coordinate on these values. enum DigestAlgorithm { + // unspecified and invalid DIGEST_ALGORITHM_UNSPECIFIED = 0; @@ -121,9 +60,9 @@ enum DigestAlgorithm { DIGEST_ALGORITHM_BLAKE2B_256 = 1; } -// Deprecated: use RawV2 instead. // RawMediaType defines MIME media types to be used with a ContentHash.Raw hash. enum RawMediaType { + // RAW_MEDIA_TYPE_UNSPECIFIED can be used for raw binary data RAW_MEDIA_TYPE_UNSPECIFIED = 0; @@ -186,11 +125,8 @@ enum RawMediaType { } // GraphCanonicalizationAlgorithm is the graph canonicalization algorithm -// -// With V2 of the graph hash, this enum is no longer validated on-chain. -// However, this enum SHOULD still be used and updated as a registry of known canonicalization -// algorithms and all implementations should coordinate on these values. enum GraphCanonicalizationAlgorithm { + // unspecified and invalid GRAPH_CANONICALIZATION_ALGORITHM_UNSPECIFIED = 0; @@ -198,18 +134,16 @@ enum GraphCanonicalizationAlgorithm { GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015 = 1; } -// GraphMerkleTree is the graph merkle tree type used for hashing, if any. -// -// With V2 of the graph hash, this enum is no longer validated on-chain. -// However, this enum SHOULD still be used and updated as a registry of known merkle tree -// types and all implementations should coordinate on these values. +// GraphMerkleTree is the graph merkle tree type used for hashing, if any enum GraphMerkleTree { + // unspecified and valid GRAPH_MERKLE_TREE_NONE_UNSPECIFIED = 0; } // ContentHashes contains list of content ContentHash. message ContentHashes { + // data is a list of content hashes which the resolver claims to serve. repeated ContentHash content_hashes = 1; -} \ No newline at end of file +} From 65e1110935ba6c2f63ebdcef988fdf117c180088 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Tue, 12 Dec 2023 12:42:39 -0500 Subject: [PATCH 10/20] fix build errors --- x/data/client/testsuite/util.go | 4 ++-- x/data/iri_test.go | 2 +- x/data/server/query_anchor_by_hash_test.go | 8 ++++---- x/data/server/query_anchor_by_iri_test.go | 6 +++--- x/data/server/query_attestations_by_attestor_test.go | 4 ++-- x/data/server/query_attestations_by_hash_test.go | 12 ++++++------ x/data/server/query_attestations_by_iri_test.go | 8 ++++---- x/data/server/query_convert_hash_to_iri_test.go | 4 ++-- x/data/server/query_convert_iri_to_hash_test.go | 4 ++-- x/data/server/query_resolvers_by_hash_test.go | 12 ++++++------ x/data/server/query_resolvers_by_iri_test.go | 8 ++++---- x/data/server/testsuite/genesis.go | 8 ++++---- x/data/server/testsuite/suite.go | 8 ++++---- x/data/simulation/operations.go | 8 ++++---- 14 files changed, 48 insertions(+), 48 deletions(-) diff --git a/x/data/client/testsuite/util.go b/x/data/client/testsuite/util.go index d56c9be002..ce3a2cf721 100644 --- a/x/data/client/testsuite/util.go +++ b/x/data/client/testsuite/util.go @@ -19,8 +19,8 @@ func (s *IntegrationTestSuite) createIRIAndGraphHash(content []byte) (string, *d ch := data.ContentHash{ Graph: &data.ContentHash_Graph{ Hash: digest, - DigestAlgorithm: data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - CanonicalizationAlgorithm: data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015, + DigestAlgorithm: uint32(data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + CanonicalizationAlgorithm: uint32(data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0), }, } diff --git a/x/data/iri_test.go b/x/data/iri_test.go index 4b33ca8cf5..4cd4a6fbcc 100644 --- a/x/data/iri_test.go +++ b/x/data/iri_test.go @@ -231,7 +231,7 @@ func TestParseIRI(t *testing.T) { wantHash: &ContentHash{Graph: &ContentHash_Graph{ Hash: hash, DigestAlgorithm: uint32(DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), - CanonicalizationAlgorithm: uint32(GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015), + CanonicalizationAlgorithm: uint32(GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0), }}, }, { diff --git a/x/data/server/query_anchor_by_hash_test.go b/x/data/server/query_anchor_by_hash_test.go index 854c837850..aa84d33e9c 100644 --- a/x/data/server/query_anchor_by_hash_test.go +++ b/x/data/server/query_anchor_by_hash_test.go @@ -19,8 +19,8 @@ func TestQuery_AnchorByHash(t *testing.T) { id := []byte{0} ch := &data.ContentHash{Graph: &data.ContentHash_Graph{ Hash: bytes.Repeat([]byte{0}, 32), - DigestAlgorithm: data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - CanonicalizationAlgorithm: data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015, + DigestAlgorithm: uint32(data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + CanonicalizationAlgorithm: uint32(data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0), }} iri, err := ch.ToIRI() require.NoError(t, err) @@ -65,8 +65,8 @@ func TestQuery_AnchorByHash(t *testing.T) { _, err = s.server.AnchorByHash(s.ctx, &data.QueryAnchorByHashRequest{ ContentHash: &data.ContentHash{Graph: &data.ContentHash_Graph{ Hash: bytes.Repeat([]byte{1}, 32), - DigestAlgorithm: data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - CanonicalizationAlgorithm: data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015, + DigestAlgorithm: uint32(data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + CanonicalizationAlgorithm: uint32(data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0), }}, }) require.EqualError(t, err, "data record with IRI: regen:13toVfvdftodu8c1Jc4TXxCnq7XLRAe4p9MgDKF2VeFKMx9eZXMgGnB.rdf: not found") diff --git a/x/data/server/query_anchor_by_iri_test.go b/x/data/server/query_anchor_by_iri_test.go index 4124759bd0..4b70ecb6d7 100644 --- a/x/data/server/query_anchor_by_iri_test.go +++ b/x/data/server/query_anchor_by_iri_test.go @@ -19,9 +19,9 @@ func TestQuery_AnchorByIRI(t *testing.T) { id := []byte{0} ch := &data.ContentHash{Graph: &data.ContentHash_Graph{ Hash: bytes.Repeat([]byte{0}, 32), - DigestAlgorithm: data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - CanonicalizationAlgorithm: data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015, - MerkleTree: data.GraphMerkleTree_GRAPH_MERKLE_TREE_NONE_UNSPECIFIED, + DigestAlgorithm: uint32(data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + CanonicalizationAlgorithm: uint32(data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0), + MerkleTree: uint32(data.GraphMerkleTree_GRAPH_MERKLE_TREE_NONE_UNSPECIFIED), }} iri, err := ch.ToIRI() require.NoError(t, err) diff --git a/x/data/server/query_attestations_by_attestor_test.go b/x/data/server/query_attestations_by_attestor_test.go index 07dda1090c..77c19023df 100644 --- a/x/data/server/query_attestations_by_attestor_test.go +++ b/x/data/server/query_attestations_by_attestor_test.go @@ -22,8 +22,8 @@ func TestQuery_AttestationsByAttestor(t *testing.T) { id2 := []byte{1} ch := &data.ContentHash{Graph: &data.ContentHash_Graph{ Hash: bytes.Repeat([]byte{0}, 32), - DigestAlgorithm: data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - CanonicalizationAlgorithm: data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015, + DigestAlgorithm: uint32(data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + CanonicalizationAlgorithm: uint32(data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0), }} iri, err := ch.ToIRI() require.NoError(t, err) diff --git a/x/data/server/query_attestations_by_hash_test.go b/x/data/server/query_attestations_by_hash_test.go index 75554130f1..31588468f4 100644 --- a/x/data/server/query_attestations_by_hash_test.go +++ b/x/data/server/query_attestations_by_hash_test.go @@ -21,8 +21,8 @@ func TestQuery_AttestationsByHash(t *testing.T) { id1 := []byte{0} ch1 := &data.ContentHash{Graph: &data.ContentHash_Graph{ Hash: bytes.Repeat([]byte{0}, 32), - DigestAlgorithm: data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - CanonicalizationAlgorithm: data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015, + DigestAlgorithm: uint32(data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + CanonicalizationAlgorithm: uint32(data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0), }} iri1, err := ch1.ToIRI() require.NoError(t, err) @@ -30,8 +30,8 @@ func TestQuery_AttestationsByHash(t *testing.T) { id2 := []byte{1} ch2 := &data.ContentHash{Graph: &data.ContentHash_Graph{ Hash: bytes.Repeat([]byte{1}, 32), - DigestAlgorithm: data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - CanonicalizationAlgorithm: data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015, + DigestAlgorithm: uint32(data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + CanonicalizationAlgorithm: uint32(data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0), }} iri2, err := ch2.ToIRI() require.NoError(t, err) @@ -102,8 +102,8 @@ func TestQuery_AttestationsByHash(t *testing.T) { _, err = s.server.AttestationsByHash(s.ctx, &data.QueryAttestationsByHashRequest{ ContentHash: &data.ContentHash{Graph: &data.ContentHash_Graph{ Hash: bytes.Repeat([]byte{2}, 32), - DigestAlgorithm: data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - CanonicalizationAlgorithm: data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015, + DigestAlgorithm: uint32(data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + CanonicalizationAlgorithm: uint32(data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0), }}, }) require.EqualError(t, err, "data record with IRI: regen:13toVfw5KEeQwbmV733E3j9HwhVCQTxB7ojFPjGdmr7HX3kuSASGXxV.rdf: not found") diff --git a/x/data/server/query_attestations_by_iri_test.go b/x/data/server/query_attestations_by_iri_test.go index 51c1af285b..9f95b3c8b4 100644 --- a/x/data/server/query_attestations_by_iri_test.go +++ b/x/data/server/query_attestations_by_iri_test.go @@ -21,8 +21,8 @@ func TestQuery_AttestationsByIRI(t *testing.T) { id1 := []byte{0} ch1 := &data.ContentHash{Graph: &data.ContentHash_Graph{ Hash: bytes.Repeat([]byte{0}, 32), - DigestAlgorithm: data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - CanonicalizationAlgorithm: data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015, + DigestAlgorithm: uint32(data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + CanonicalizationAlgorithm: uint32(data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0), }} iri1, err := ch1.ToIRI() require.NoError(t, err) @@ -30,8 +30,8 @@ func TestQuery_AttestationsByIRI(t *testing.T) { id2 := []byte{1} ch2 := &data.ContentHash{Graph: &data.ContentHash_Graph{ Hash: bytes.Repeat([]byte{1}, 32), - DigestAlgorithm: data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - CanonicalizationAlgorithm: data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015, + DigestAlgorithm: uint32(data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + CanonicalizationAlgorithm: uint32(data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0), }} iri2, err := ch2.ToIRI() require.NoError(t, err) diff --git a/x/data/server/query_convert_hash_to_iri_test.go b/x/data/server/query_convert_hash_to_iri_test.go index a486ee6713..d48e18ab03 100644 --- a/x/data/server/query_convert_hash_to_iri_test.go +++ b/x/data/server/query_convert_hash_to_iri_test.go @@ -15,8 +15,8 @@ func TestQuery_ConvertHashToIRI(t *testing.T) { ch1 := &data.ContentHash{Graph: &data.ContentHash_Graph{ Hash: bytes.Repeat([]byte{0}, 32), - DigestAlgorithm: data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - CanonicalizationAlgorithm: data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015, + DigestAlgorithm: uint32(data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + CanonicalizationAlgorithm: uint32(data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0), }} iri1, err := ch1.ToIRI() require.NoError(t, err) diff --git a/x/data/server/query_convert_iri_to_hash_test.go b/x/data/server/query_convert_iri_to_hash_test.go index b3e8b16d95..af8ac6f10f 100644 --- a/x/data/server/query_convert_iri_to_hash_test.go +++ b/x/data/server/query_convert_iri_to_hash_test.go @@ -15,8 +15,8 @@ func TestQuery_ConvertIRIToHash(t *testing.T) { ch1 := &data.ContentHash{Graph: &data.ContentHash_Graph{ Hash: bytes.Repeat([]byte{0}, 32), - DigestAlgorithm: data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - CanonicalizationAlgorithm: data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015, + DigestAlgorithm: uint32(data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + CanonicalizationAlgorithm: uint32(data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0), }} iri1, err := ch1.ToIRI() require.NoError(t, err) diff --git a/x/data/server/query_resolvers_by_hash_test.go b/x/data/server/query_resolvers_by_hash_test.go index 31878c3841..7e858d2b23 100644 --- a/x/data/server/query_resolvers_by_hash_test.go +++ b/x/data/server/query_resolvers_by_hash_test.go @@ -19,8 +19,8 @@ func TestQuery_ResolversByHash(t *testing.T) { id1 := []byte{0} ch1 := &data.ContentHash{Graph: &data.ContentHash_Graph{ Hash: bytes.Repeat([]byte{0}, 32), - DigestAlgorithm: data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - CanonicalizationAlgorithm: data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015, + DigestAlgorithm: uint32(data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + CanonicalizationAlgorithm: uint32(data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0), }} iri1, err := ch1.ToIRI() require.NoError(t, err) @@ -28,8 +28,8 @@ func TestQuery_ResolversByHash(t *testing.T) { id2 := []byte{1} ch2 := &data.ContentHash{Graph: &data.ContentHash_Graph{ Hash: bytes.Repeat([]byte{1}, 32), - DigestAlgorithm: data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - CanonicalizationAlgorithm: data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015, + DigestAlgorithm: uint32(data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + CanonicalizationAlgorithm: uint32(data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0), }} iri2, err := ch2.ToIRI() require.NoError(t, err) @@ -101,8 +101,8 @@ func TestQuery_ResolversByHash(t *testing.T) { _, err = s.server.ResolversByHash(s.ctx, &data.QueryResolversByHashRequest{ ContentHash: &data.ContentHash{Graph: &data.ContentHash_Graph{ Hash: bytes.Repeat([]byte{2}, 32), - DigestAlgorithm: data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - CanonicalizationAlgorithm: data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015, + DigestAlgorithm: uint32(data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + CanonicalizationAlgorithm: uint32(data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0), }}, }) require.EqualError(t, err, "data record with content hash: not found") diff --git a/x/data/server/query_resolvers_by_iri_test.go b/x/data/server/query_resolvers_by_iri_test.go index 7116fa07ac..dfe706e827 100644 --- a/x/data/server/query_resolvers_by_iri_test.go +++ b/x/data/server/query_resolvers_by_iri_test.go @@ -19,8 +19,8 @@ func TestQuery_ResolversByIRI(t *testing.T) { id1 := []byte{0} ch1 := &data.ContentHash{Graph: &data.ContentHash_Graph{ Hash: bytes.Repeat([]byte{0}, 32), - DigestAlgorithm: data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - CanonicalizationAlgorithm: data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015, + DigestAlgorithm: uint32(data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + CanonicalizationAlgorithm: uint32(data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0), }} iri1, err := ch1.ToIRI() require.NoError(t, err) @@ -28,8 +28,8 @@ func TestQuery_ResolversByIRI(t *testing.T) { id2 := []byte{1} ch2 := &data.ContentHash{Graph: &data.ContentHash_Graph{ Hash: bytes.Repeat([]byte{1}, 32), - DigestAlgorithm: data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - CanonicalizationAlgorithm: data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015, + DigestAlgorithm: uint32(data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + CanonicalizationAlgorithm: uint32(data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0), }} iri2, err := ch2.ToIRI() require.NoError(t, err) diff --git a/x/data/server/testsuite/genesis.go b/x/data/server/testsuite/genesis.go index 7431320394..ed629d5427 100644 --- a/x/data/server/testsuite/genesis.go +++ b/x/data/server/testsuite/genesis.go @@ -56,15 +56,15 @@ func (s *GenesisTestSuite) SetupSuite() { graphHash := &data.ContentHash_Graph{ Hash: digest, - DigestAlgorithm: data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - CanonicalizationAlgorithm: data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015, + DigestAlgorithm: uint32(data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + CanonicalizationAlgorithm: uint32(data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0), } s.hash1 = &data.ContentHash{Graph: graphHash} rawHash := &data.ContentHash_Raw{ Hash: digest, - DigestAlgorithm: data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: data.RawMediaType_RAW_MEDIA_TYPE_UNSPECIFIED, + DigestAlgorithm: uint32(data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + FileExtension: "bin", } s.hash2 = &data.ContentHash{Raw: rawHash} } diff --git a/x/data/server/testsuite/suite.go b/x/data/server/testsuite/suite.go index 1c03ea307a..2bb0fbdb79 100644 --- a/x/data/server/testsuite/suite.go +++ b/x/data/server/testsuite/suite.go @@ -52,15 +52,15 @@ func (s *IntegrationTestSuite) SetupSuite() { s.graphHash = &data.ContentHash_Graph{ Hash: bytes.Repeat([]byte{0}, 32), - DigestAlgorithm: data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - CanonicalizationAlgorithm: data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015, + DigestAlgorithm: uint32(data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + CanonicalizationAlgorithm: uint32(data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0), } s.hash1 = &data.ContentHash{Graph: s.graphHash} s.rawHash = &data.ContentHash_Raw{ Hash: bytes.Repeat([]byte{0}, 32), - DigestAlgorithm: data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: data.RawMediaType_RAW_MEDIA_TYPE_UNSPECIFIED, + DigestAlgorithm: uint32(data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + FileExtension: "bin", } s.hash2 = &data.ContentHash{Raw: s.rawHash} } diff --git a/x/data/simulation/operations.go b/x/data/simulation/operations.go index de6f3c82af..278073da25 100644 --- a/x/data/simulation/operations.go +++ b/x/data/simulation/operations.go @@ -351,15 +351,15 @@ func getContentHash(r *rand.Rand) (*data.ContentHash, error) { func getGraph(digest []byte) *data.ContentHash_Graph { return &data.ContentHash_Graph{ Hash: digest, - DigestAlgorithm: data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - CanonicalizationAlgorithm: data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_URDNA2015, + DigestAlgorithm: uint32(data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + CanonicalizationAlgorithm: uint32(data.GraphCanonicalizationAlgorithm_GRAPH_CANONICALIZATION_ALGORITHM_RDFC_1_0), } } func getRaw(digest []byte) *data.ContentHash_Raw { return &data.ContentHash_Raw{ Hash: digest, - DigestAlgorithm: data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256, - MediaType: data.RawMediaType_RAW_MEDIA_TYPE_UNSPECIFIED, + DigestAlgorithm: uint32(data.DigestAlgorithm_DIGEST_ALGORITHM_BLAKE2B_256), + FileExtension: "bin", } } From 4fce35f93828c4ede337026e590f75663c6aae76 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Tue, 12 Dec 2023 13:12:37 -0500 Subject: [PATCH 11/20] fix tests --- x/data/server/features/msg_anchor.feature | 3 ++- x/data/server/features/msg_register_resolver.feature | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/x/data/server/features/msg_anchor.feature b/x/data/server/features/msg_anchor.feature index 4d7ed8faa7..72ea31f0ca 100644 --- a/x/data/server/features/msg_anchor.feature +++ b/x/data/server/features/msg_anchor.feature @@ -6,7 +6,8 @@ Feature: Msg/Anchor { "raw": { "hash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", - "digest_algorithm": 1 + "digest_algorithm": 1, + "file_extension": "bin" } } """ diff --git a/x/data/server/features/msg_register_resolver.feature b/x/data/server/features/msg_register_resolver.feature index 3163628e08..a1b2206758 100644 --- a/x/data/server/features/msg_register_resolver.feature +++ b/x/data/server/features/msg_register_resolver.feature @@ -6,7 +6,8 @@ Feature: Msg/RegisterResolver { "raw": { "hash": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", - "digest_algorithm": 1 + "digest_algorithm": 1, + "file_extension": "bin" } } """ From dbcd518f280874e72c6149b536fa465422f6cfbe Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Tue, 12 Dec 2023 13:21:30 -0500 Subject: [PATCH 12/20] fix grpc gateway tests --- x/data/client/testsuite/grpc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/data/client/testsuite/grpc.go b/x/data/client/testsuite/grpc.go index a82ac9298a..5c20ffd1ab 100644 --- a/x/data/client/testsuite/grpc.go +++ b/x/data/client/testsuite/grpc.go @@ -12,7 +12,7 @@ import ( ) const ( - dataRoute = "regen/data/v1" + dataRoute = "regen/data/v2" pagination = "pagination.limit=1&pagination.countTotal=true" ) From f954c9a2bf78b6715d7efb15ac1c7ccd2aa1c6a7 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Wed, 13 Dec 2023 15:53:39 -0500 Subject: [PATCH 13/20] Update x/data/iri.go Co-authored-by: Marie Gauthier --- x/data/iri.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/data/iri.go b/x/data/iri.go index e02220c566..4cfd860aec 100644 --- a/x/data/iri.go +++ b/x/data/iri.go @@ -30,7 +30,7 @@ const ( IriPrefixGraph byte = 1 ) -// ToIRI converts the ContentHash_RawV2 to an IRI (internationalized URI) based on the following +// ToIRI converts the ContentHash_Raw to an IRI (internationalized URI) based on the following // pattern: regen:{base58check(concat( byte(0x0), byte(digest_algorithm), hash), 1)}.{file_extension} // This is the same as ContentHash_Raw.ToIRI except that the media type is replaced with a file extension // and the base58check version byte is 1 instead of 0. From 78fdbb91185cf2009d3cb066b068e3e964a96010 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Wed, 13 Dec 2023 15:54:29 -0500 Subject: [PATCH 14/20] Update x/data/iri.go Co-authored-by: Marie Gauthier --- x/data/iri.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/data/iri.go b/x/data/iri.go index 4cfd860aec..8f35dee0da 100644 --- a/x/data/iri.go +++ b/x/data/iri.go @@ -50,7 +50,7 @@ func (chr ContentHash_Raw) ToIRI() (string, error) { return fmt.Sprintf("regen:%s.%s", hashStr, ext), nil } -// ToIRI converts the ContentHash_GraphV2 to an IRI (internationalized URI) based on the following +// ToIRI converts the ContentHash_Graph to an IRI (internationalized URI) based on the following // pattern: regen:{base58check(concat(byte(0x1), byte(canonicalization_algorithm), // byte(merkle_tree), byte(digest_algorithm), hash), 1)}.rdf // This is the same as ContentHash_Graph.ToIRI except that the base58check version byte is 1 instead of 0. From cbd68fd0a0d2c72a751b79e46d12955dd88d2345 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Wed, 13 Dec 2023 15:54:41 -0500 Subject: [PATCH 15/20] Update x/data/iri.go Co-authored-by: Marie Gauthier --- x/data/iri.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/data/iri.go b/x/data/iri.go index 8f35dee0da..a6967407b4 100644 --- a/x/data/iri.go +++ b/x/data/iri.go @@ -32,7 +32,7 @@ const ( // ToIRI converts the ContentHash_Raw to an IRI (internationalized URI) based on the following // pattern: regen:{base58check(concat( byte(0x0), byte(digest_algorithm), hash), 1)}.{file_extension} -// This is the same as ContentHash_Raw.ToIRI except that the media type is replaced with a file extension +// This is the same as ContentHash_Raw.ToIRI from regen.data.v1 except that the media type is replaced with a file extension // and the base58check version byte is 1 instead of 0. func (chr ContentHash_Raw) ToIRI() (string, error) { err := chr.Validate() From ab50183759261e54099f80513e14075ad16e4b8d Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Wed, 13 Dec 2023 15:55:51 -0500 Subject: [PATCH 16/20] remove mention of media type --- proto/regen/data/v2/types.proto | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/proto/regen/data/v2/types.proto b/proto/regen/data/v2/types.proto index 4163e924bd..187bc79bbb 100644 --- a/proto/regen/data/v2/types.proto +++ b/proto/regen/data/v2/types.proto @@ -14,8 +14,7 @@ message ContentHash { // which is preserved bit by bit. All other content encodings specify a // deterministic, canonical encoding allowing implementations to choose from a // variety of alternative formats for transport and encoding while maintaining - // the guarantee that the canonical hash will not change. The media type for - // "raw" data is defined by the MediaType enum. + // the guarantee that the canonical hash will not change. Raw raw = 1; // graph specifies graph data that conforms to the RDF data model. From f8f0dd3eb260af1d88e1b2e70edc3a048815f8bb Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Wed, 13 Dec 2023 15:57:11 -0500 Subject: [PATCH 17/20] update version references --- x/data/iri.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/x/data/iri.go b/x/data/iri.go index a6967407b4..f9bba6b333 100644 --- a/x/data/iri.go +++ b/x/data/iri.go @@ -31,9 +31,7 @@ const ( ) // ToIRI converts the ContentHash_Raw to an IRI (internationalized URI) based on the following -// pattern: regen:{base58check(concat( byte(0x0), byte(digest_algorithm), hash), 1)}.{file_extension} -// This is the same as ContentHash_Raw.ToIRI from regen.data.v1 except that the media type is replaced with a file extension -// and the base58check version byte is 1 instead of 0. +// pattern: regen:{base58check(concat( byte(0x0), byte(digest_algorithm), hash), 0)}.{file_extension} func (chr ContentHash_Raw) ToIRI() (string, error) { err := chr.Validate() if err != nil { @@ -52,8 +50,7 @@ func (chr ContentHash_Raw) ToIRI() (string, error) { // ToIRI converts the ContentHash_Graph to an IRI (internationalized URI) based on the following // pattern: regen:{base58check(concat(byte(0x1), byte(canonicalization_algorithm), -// byte(merkle_tree), byte(digest_algorithm), hash), 1)}.rdf -// This is the same as ContentHash_Graph.ToIRI except that the base58check version byte is 1 instead of 0. +// byte(merkle_tree), byte(digest_algorithm), hash), 0)}.rdf func (chg ContentHash_Graph) ToIRI() (string, error) { err := chg.Validate() if err != nil { From a7be3d406ac3a62906be180d49264a6f73620892 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Sun, 7 Jan 2024 12:43:35 -0500 Subject: [PATCH 18/20] add ext test case --- x/data/iri_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/x/data/iri_test.go b/x/data/iri_test.go index 4cd4a6fbcc..371148232e 100644 --- a/x/data/iri_test.go +++ b/x/data/iri_test.go @@ -155,6 +155,16 @@ func TestContentHash_Raw_ToIRI(t *testing.T) { true, "", }, + { + "ext bad characters", + ContentHash_Raw{ + Hash: hash, + DigestAlgorithm: 2, + FileExtension: "jpg!", + }, + true, + "", + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { From 1a90f7a410a10e9bb80dcabe1414747d68d6ed26 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Mon, 29 Jan 2024 12:54:03 -0500 Subject: [PATCH 19/20] lint --- x/data/iri.go | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/x/data/iri.go b/x/data/iri.go index f9bba6b333..fcada9b868 100644 --- a/x/data/iri.go +++ b/x/data/iri.go @@ -114,16 +114,16 @@ func ParseIRI(iri string) (*ContentHash, error) { hash := rdr.Bytes() - if version == iriVersion0 { - return &ContentHash{Raw: &ContentHash_Raw{ - Hash: hash, - DigestAlgorithm: uint32(b0), - FileExtension: ext, - }}, nil - } else { + if version != iriVersion0 { return nil, ErrInvalidIRI.Wrapf("failed to parse IRI %s: invalid version %d", iri, version) } + return &ContentHash{Raw: &ContentHash_Raw{ + Hash: hash, + DigestAlgorithm: uint32(b0), + FileExtension: ext, + }}, nil + case IriPrefixGraph: // rdf extension is expected for graph data if ext != "rdf" { @@ -151,16 +151,16 @@ func ParseIRI(iri string) (*ContentHash, error) { // read hash hash := rdr.Bytes() - if version == iriVersion0 { - return &ContentHash{Graph: &ContentHash_Graph{ - Hash: hash, - DigestAlgorithm: uint32(bDigestAlg), - CanonicalizationAlgorithm: uint32(bC14NAlg), - MerkleTree: uint32(bMtAlg), - }}, nil - } else { + if version != iriVersion0 { return nil, ErrInvalidIRI.Wrapf("failed to parse IRI %s: invalid version %d", iri, version) } + + return &ContentHash{Graph: &ContentHash_Graph{ + Hash: hash, + DigestAlgorithm: uint32(bDigestAlg), + CanonicalizationAlgorithm: uint32(bC14NAlg), + MerkleTree: uint32(bMtAlg), + }}, nil } return nil, ErrInvalidIRI.Wrapf("unable to parse IRI %s", iri) From 1320571ef5ecc0d46c580eced7a86c35aaf0e791 Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Mon, 29 Jan 2024 19:51:56 -0500 Subject: [PATCH 20/20] lint --- app/app.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/app.go b/app/app.go index 3b9c3c2fbe..166756d771 100644 --- a/app/app.go +++ b/app/app.go @@ -810,7 +810,8 @@ func (app *RegenApp) setUpgradeStoreLoaders() { return } - for _, u := range upgrades { + for i := range upgrades { + u := upgrades[i] // fix G601: Implicit memory aliasing in for loop. (gosec) if upgradeInfo.Name == u.UpgradeName { app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &u.StoreUpgrades)) }