From dd040845c26a409b193ce056d2ebcc85e6dcc8d8 Mon Sep 17 00:00:00 2001 From: Marie Gauthier Date: Thu, 16 Jun 2022 15:33:09 +0200 Subject: [PATCH] fix: GetTxsEvent pagination (#12261) ## Description Closes: https://github.com/cosmos/cosmos-sdk/issues/11538 Also see thread after https://github.com/cosmos/cosmos-sdk/issues/11538#issuecomment-1150040922 --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting)) - [x] provided a link to the relevant issue or specification - [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules) - [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable) (cherry picked from commit c68fa3b2998f7447c1d84ea68bfac357e24c73c1) # Conflicts: # api/cosmos/orm/query/v1alpha1/query.pulsar.go --- CHANGELOG.md | 1 + api/cosmos/orm/query/v1alpha1/query.pulsar.go | 5375 +++++++++++++++++ api/cosmos/tx/v1beta1/service.pulsar.go | 470 +- proto/cosmos/tx/v1beta1/service.proto | 13 +- types/tx/service.pb.go | 243 +- x/auth/tx/query.go | 4 +- x/auth/tx/service.go | 18 +- x/auth/tx/service_test.go | 44 +- 8 files changed, 5929 insertions(+), 239 deletions(-) create mode 100644 api/cosmos/orm/query/v1alpha1/query.pulsar.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 66b01bd0458..ff73b5f78f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Bug Fixes +* (x/auth) [#12261](https://github.com/cosmos/cosmos-sdk/pull/12261) Deprecate pagination in GetTxsEventRequest/Response in favor of page and limit to align with tendermint `SignClient.TxSearch` * (vesting) [#12190](https://github.com/cosmos/cosmos-sdk/pull/12190) Replace https://github.com/cosmos/cosmos-sdk/pull/12190 to use `NewBaseAccountWithAddress` in all vesting account message handlers. * (cli) [#12127](https://github.com/cosmos/cosmos-sdk/pull/12127) Fix the CLI not always taking into account `--fee-payer` and `--fee-granter` flags. * (migrations) [#12028](https://github.com/cosmos/cosmos-sdk/pull/12028) Fix v0.45->v0.46 in-place store migrations. diff --git a/api/cosmos/orm/query/v1alpha1/query.pulsar.go b/api/cosmos/orm/query/v1alpha1/query.pulsar.go new file mode 100644 index 00000000000..c95afe909cd --- /dev/null +++ b/api/cosmos/orm/query/v1alpha1/query.pulsar.go @@ -0,0 +1,5375 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package queryv1alpha1 + +import ( + v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" + 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" + anypb "google.golang.org/protobuf/types/known/anypb" + durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_GetRequest_3_list)(nil) + +type _GetRequest_3_list struct { + list *[]*IndexValue +} + +func (x *_GetRequest_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GetRequest_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GetRequest_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*IndexValue) + (*x.list)[i] = concreteValue +} + +func (x *_GetRequest_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*IndexValue) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GetRequest_3_list) AppendMutable() protoreflect.Value { + v := new(IndexValue) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GetRequest_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GetRequest_3_list) NewElement() protoreflect.Value { + v := new(IndexValue) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GetRequest_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_GetRequest protoreflect.MessageDescriptor + fd_GetRequest_message_name protoreflect.FieldDescriptor + fd_GetRequest_index protoreflect.FieldDescriptor + fd_GetRequest_values protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_orm_query_v1alpha1_query_proto_init() + md_GetRequest = File_cosmos_orm_query_v1alpha1_query_proto.Messages().ByName("GetRequest") + fd_GetRequest_message_name = md_GetRequest.Fields().ByName("message_name") + fd_GetRequest_index = md_GetRequest.Fields().ByName("index") + fd_GetRequest_values = md_GetRequest.Fields().ByName("values") +} + +var _ protoreflect.Message = (*fastReflection_GetRequest)(nil) + +type fastReflection_GetRequest GetRequest + +func (x *GetRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_GetRequest)(x) +} + +func (x *GetRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_orm_query_v1alpha1_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_GetRequest_messageType fastReflection_GetRequest_messageType +var _ protoreflect.MessageType = fastReflection_GetRequest_messageType{} + +type fastReflection_GetRequest_messageType struct{} + +func (x fastReflection_GetRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_GetRequest)(nil) +} +func (x fastReflection_GetRequest_messageType) New() protoreflect.Message { + return new(fastReflection_GetRequest) +} +func (x fastReflection_GetRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_GetRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_GetRequest) Descriptor() protoreflect.MessageDescriptor { + return md_GetRequest +} + +// 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_GetRequest) Type() protoreflect.MessageType { + return _fastReflection_GetRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_GetRequest) New() protoreflect.Message { + return new(fastReflection_GetRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_GetRequest) Interface() protoreflect.ProtoMessage { + return (*GetRequest)(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_GetRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.MessageName != "" { + value := protoreflect.ValueOfString(x.MessageName) + if !f(fd_GetRequest_message_name, value) { + return + } + } + if x.Index != "" { + value := protoreflect.ValueOfString(x.Index) + if !f(fd_GetRequest_index, value) { + return + } + } + if len(x.Values) != 0 { + value := protoreflect.ValueOfList(&_GetRequest_3_list{list: &x.Values}) + if !f(fd_GetRequest_values, 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_GetRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.GetRequest.message_name": + return x.MessageName != "" + case "cosmos.orm.query.v1alpha1.GetRequest.index": + return x.Index != "" + case "cosmos.orm.query.v1alpha1.GetRequest.values": + return len(x.Values) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.GetRequest")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.GetRequest 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_GetRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.GetRequest.message_name": + x.MessageName = "" + case "cosmos.orm.query.v1alpha1.GetRequest.index": + x.Index = "" + case "cosmos.orm.query.v1alpha1.GetRequest.values": + x.Values = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.GetRequest")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.GetRequest 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_GetRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.orm.query.v1alpha1.GetRequest.message_name": + value := x.MessageName + return protoreflect.ValueOfString(value) + case "cosmos.orm.query.v1alpha1.GetRequest.index": + value := x.Index + return protoreflect.ValueOfString(value) + case "cosmos.orm.query.v1alpha1.GetRequest.values": + if len(x.Values) == 0 { + return protoreflect.ValueOfList(&_GetRequest_3_list{}) + } + listValue := &_GetRequest_3_list{list: &x.Values} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.GetRequest")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.GetRequest 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_GetRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.GetRequest.message_name": + x.MessageName = value.Interface().(string) + case "cosmos.orm.query.v1alpha1.GetRequest.index": + x.Index = value.Interface().(string) + case "cosmos.orm.query.v1alpha1.GetRequest.values": + lv := value.List() + clv := lv.(*_GetRequest_3_list) + x.Values = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.GetRequest")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.GetRequest 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_GetRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.GetRequest.values": + if x.Values == nil { + x.Values = []*IndexValue{} + } + value := &_GetRequest_3_list{list: &x.Values} + return protoreflect.ValueOfList(value) + case "cosmos.orm.query.v1alpha1.GetRequest.message_name": + panic(fmt.Errorf("field message_name of message cosmos.orm.query.v1alpha1.GetRequest is not mutable")) + case "cosmos.orm.query.v1alpha1.GetRequest.index": + panic(fmt.Errorf("field index of message cosmos.orm.query.v1alpha1.GetRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.GetRequest")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.GetRequest 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_GetRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.GetRequest.message_name": + return protoreflect.ValueOfString("") + case "cosmos.orm.query.v1alpha1.GetRequest.index": + return protoreflect.ValueOfString("") + case "cosmos.orm.query.v1alpha1.GetRequest.values": + list := []*IndexValue{} + return protoreflect.ValueOfList(&_GetRequest_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.GetRequest")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.GetRequest 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_GetRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.orm.query.v1alpha1.GetRequest", 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_GetRequest) 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_GetRequest) 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_GetRequest) 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_GetRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*GetRequest) + 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.MessageName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Index) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Values) > 0 { + for _, e := range x.Values { + 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().(*GetRequest) + 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.Values) > 0 { + for iNdEx := len(x.Values) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Values[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 len(x.Index) > 0 { + i -= len(x.Index) + copy(dAtA[i:], x.Index) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Index))) + i-- + dAtA[i] = 0x12 + } + if len(x.MessageName) > 0 { + i -= len(x.MessageName) + copy(dAtA[i:], x.MessageName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MessageName))) + 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().(*GetRequest) + 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: GetRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetRequest: 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 MessageName", 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.MessageName = 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 Index", 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.Index = 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 Values", 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.Values = append(x.Values, &IndexValue{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Values[len(x.Values)-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_GetResponse protoreflect.MessageDescriptor + fd_GetResponse_result protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_orm_query_v1alpha1_query_proto_init() + md_GetResponse = File_cosmos_orm_query_v1alpha1_query_proto.Messages().ByName("GetResponse") + fd_GetResponse_result = md_GetResponse.Fields().ByName("result") +} + +var _ protoreflect.Message = (*fastReflection_GetResponse)(nil) + +type fastReflection_GetResponse GetResponse + +func (x *GetResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_GetResponse)(x) +} + +func (x *GetResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_orm_query_v1alpha1_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_GetResponse_messageType fastReflection_GetResponse_messageType +var _ protoreflect.MessageType = fastReflection_GetResponse_messageType{} + +type fastReflection_GetResponse_messageType struct{} + +func (x fastReflection_GetResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_GetResponse)(nil) +} +func (x fastReflection_GetResponse_messageType) New() protoreflect.Message { + return new(fastReflection_GetResponse) +} +func (x fastReflection_GetResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_GetResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_GetResponse) Descriptor() protoreflect.MessageDescriptor { + return md_GetResponse +} + +// 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_GetResponse) Type() protoreflect.MessageType { + return _fastReflection_GetResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_GetResponse) New() protoreflect.Message { + return new(fastReflection_GetResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_GetResponse) Interface() protoreflect.ProtoMessage { + return (*GetResponse)(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_GetResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Result != nil { + value := protoreflect.ValueOfMessage(x.Result.ProtoReflect()) + if !f(fd_GetResponse_result, 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_GetResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.GetResponse.result": + return x.Result != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.GetResponse")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.GetResponse 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_GetResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.GetResponse.result": + x.Result = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.GetResponse")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.GetResponse 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_GetResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.orm.query.v1alpha1.GetResponse.result": + value := x.Result + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.GetResponse")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.GetResponse 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_GetResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.GetResponse.result": + x.Result = value.Message().Interface().(*anypb.Any) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.GetResponse")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.GetResponse 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_GetResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.GetResponse.result": + if x.Result == nil { + x.Result = new(anypb.Any) + } + return protoreflect.ValueOfMessage(x.Result.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.GetResponse")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.GetResponse 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_GetResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.GetResponse.result": + m := new(anypb.Any) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.GetResponse")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.GetResponse 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_GetResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.orm.query.v1alpha1.GetResponse", 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_GetResponse) 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_GetResponse) 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_GetResponse) 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_GetResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*GetResponse) + 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.Result != nil { + l = options.Size(x.Result) + 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().(*GetResponse) + 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.Result != nil { + encoded, err := options.Marshal(x.Result) + 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().(*GetResponse) + 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: GetResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetResponse: 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 Result", 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.Result == nil { + x.Result = &anypb.Any{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Result); 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_ListRequest protoreflect.MessageDescriptor + fd_ListRequest_message_name protoreflect.FieldDescriptor + fd_ListRequest_index protoreflect.FieldDescriptor + fd_ListRequest_prefix protoreflect.FieldDescriptor + fd_ListRequest_range protoreflect.FieldDescriptor + fd_ListRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_orm_query_v1alpha1_query_proto_init() + md_ListRequest = File_cosmos_orm_query_v1alpha1_query_proto.Messages().ByName("ListRequest") + fd_ListRequest_message_name = md_ListRequest.Fields().ByName("message_name") + fd_ListRequest_index = md_ListRequest.Fields().ByName("index") + fd_ListRequest_prefix = md_ListRequest.Fields().ByName("prefix") + fd_ListRequest_range = md_ListRequest.Fields().ByName("range") + fd_ListRequest_pagination = md_ListRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_ListRequest)(nil) + +type fastReflection_ListRequest ListRequest + +func (x *ListRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_ListRequest)(x) +} + +func (x *ListRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_orm_query_v1alpha1_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_ListRequest_messageType fastReflection_ListRequest_messageType +var _ protoreflect.MessageType = fastReflection_ListRequest_messageType{} + +type fastReflection_ListRequest_messageType struct{} + +func (x fastReflection_ListRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_ListRequest)(nil) +} +func (x fastReflection_ListRequest_messageType) New() protoreflect.Message { + return new(fastReflection_ListRequest) +} +func (x fastReflection_ListRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ListRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ListRequest) Descriptor() protoreflect.MessageDescriptor { + return md_ListRequest +} + +// 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_ListRequest) Type() protoreflect.MessageType { + return _fastReflection_ListRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ListRequest) New() protoreflect.Message { + return new(fastReflection_ListRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ListRequest) Interface() protoreflect.ProtoMessage { + return (*ListRequest)(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_ListRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.MessageName != "" { + value := protoreflect.ValueOfString(x.MessageName) + if !f(fd_ListRequest_message_name, value) { + return + } + } + if x.Index != "" { + value := protoreflect.ValueOfString(x.Index) + if !f(fd_ListRequest_index, value) { + return + } + } + if x.Query != nil { + switch o := x.Query.(type) { + case *ListRequest_Prefix_: + v := o.Prefix + value := protoreflect.ValueOfMessage(v.ProtoReflect()) + if !f(fd_ListRequest_prefix, value) { + return + } + case *ListRequest_Range_: + v := o.Range_ + value := protoreflect.ValueOfMessage(v.ProtoReflect()) + if !f(fd_ListRequest_range, value) { + return + } + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_ListRequest_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_ListRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.ListRequest.message_name": + return x.MessageName != "" + case "cosmos.orm.query.v1alpha1.ListRequest.index": + return x.Index != "" + case "cosmos.orm.query.v1alpha1.ListRequest.prefix": + if x.Query == nil { + return false + } else if _, ok := x.Query.(*ListRequest_Prefix_); ok { + return true + } else { + return false + } + case "cosmos.orm.query.v1alpha1.ListRequest.range": + if x.Query == nil { + return false + } else if _, ok := x.Query.(*ListRequest_Range_); ok { + return true + } else { + return false + } + case "cosmos.orm.query.v1alpha1.ListRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.ListRequest")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.ListRequest 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_ListRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.ListRequest.message_name": + x.MessageName = "" + case "cosmos.orm.query.v1alpha1.ListRequest.index": + x.Index = "" + case "cosmos.orm.query.v1alpha1.ListRequest.prefix": + x.Query = nil + case "cosmos.orm.query.v1alpha1.ListRequest.range": + x.Query = nil + case "cosmos.orm.query.v1alpha1.ListRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.ListRequest")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.ListRequest 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_ListRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.orm.query.v1alpha1.ListRequest.message_name": + value := x.MessageName + return protoreflect.ValueOfString(value) + case "cosmos.orm.query.v1alpha1.ListRequest.index": + value := x.Index + return protoreflect.ValueOfString(value) + case "cosmos.orm.query.v1alpha1.ListRequest.prefix": + if x.Query == nil { + return protoreflect.ValueOfMessage((*ListRequest_Prefix)(nil).ProtoReflect()) + } else if v, ok := x.Query.(*ListRequest_Prefix_); ok { + return protoreflect.ValueOfMessage(v.Prefix.ProtoReflect()) + } else { + return protoreflect.ValueOfMessage((*ListRequest_Prefix)(nil).ProtoReflect()) + } + case "cosmos.orm.query.v1alpha1.ListRequest.range": + if x.Query == nil { + return protoreflect.ValueOfMessage((*ListRequest_Range)(nil).ProtoReflect()) + } else if v, ok := x.Query.(*ListRequest_Range_); ok { + return protoreflect.ValueOfMessage(v.Range_.ProtoReflect()) + } else { + return protoreflect.ValueOfMessage((*ListRequest_Range)(nil).ProtoReflect()) + } + case "cosmos.orm.query.v1alpha1.ListRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.ListRequest")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.ListRequest 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_ListRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.ListRequest.message_name": + x.MessageName = value.Interface().(string) + case "cosmos.orm.query.v1alpha1.ListRequest.index": + x.Index = value.Interface().(string) + case "cosmos.orm.query.v1alpha1.ListRequest.prefix": + cv := value.Message().Interface().(*ListRequest_Prefix) + x.Query = &ListRequest_Prefix_{Prefix: cv} + case "cosmos.orm.query.v1alpha1.ListRequest.range": + cv := value.Message().Interface().(*ListRequest_Range) + x.Query = &ListRequest_Range_{Range_: cv} + case "cosmos.orm.query.v1alpha1.ListRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.ListRequest")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.ListRequest 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_ListRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.ListRequest.prefix": + if x.Query == nil { + value := &ListRequest_Prefix{} + oneofValue := &ListRequest_Prefix_{Prefix: value} + x.Query = oneofValue + return protoreflect.ValueOfMessage(value.ProtoReflect()) + } + switch m := x.Query.(type) { + case *ListRequest_Prefix_: + return protoreflect.ValueOfMessage(m.Prefix.ProtoReflect()) + default: + value := &ListRequest_Prefix{} + oneofValue := &ListRequest_Prefix_{Prefix: value} + x.Query = oneofValue + return protoreflect.ValueOfMessage(value.ProtoReflect()) + } + case "cosmos.orm.query.v1alpha1.ListRequest.range": + if x.Query == nil { + value := &ListRequest_Range{} + oneofValue := &ListRequest_Range_{Range_: value} + x.Query = oneofValue + return protoreflect.ValueOfMessage(value.ProtoReflect()) + } + switch m := x.Query.(type) { + case *ListRequest_Range_: + return protoreflect.ValueOfMessage(m.Range_.ProtoReflect()) + default: + value := &ListRequest_Range{} + oneofValue := &ListRequest_Range_{Range_: value} + x.Query = oneofValue + return protoreflect.ValueOfMessage(value.ProtoReflect()) + } + case "cosmos.orm.query.v1alpha1.ListRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + case "cosmos.orm.query.v1alpha1.ListRequest.message_name": + panic(fmt.Errorf("field message_name of message cosmos.orm.query.v1alpha1.ListRequest is not mutable")) + case "cosmos.orm.query.v1alpha1.ListRequest.index": + panic(fmt.Errorf("field index of message cosmos.orm.query.v1alpha1.ListRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.ListRequest")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.ListRequest 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_ListRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.ListRequest.message_name": + return protoreflect.ValueOfString("") + case "cosmos.orm.query.v1alpha1.ListRequest.index": + return protoreflect.ValueOfString("") + case "cosmos.orm.query.v1alpha1.ListRequest.prefix": + value := &ListRequest_Prefix{} + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.orm.query.v1alpha1.ListRequest.range": + value := &ListRequest_Range{} + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.orm.query.v1alpha1.ListRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.ListRequest")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.ListRequest 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_ListRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + case "cosmos.orm.query.v1alpha1.ListRequest.query": + if x.Query == nil { + return nil + } + switch x.Query.(type) { + case *ListRequest_Prefix_: + return x.Descriptor().Fields().ByName("prefix") + case *ListRequest_Range_: + return x.Descriptor().Fields().ByName("range") + } + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.orm.query.v1alpha1.ListRequest", 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_ListRequest) 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_ListRequest) 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_ListRequest) 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_ListRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ListRequest) + 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.MessageName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Index) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + switch x := x.Query.(type) { + case *ListRequest_Prefix_: + if x == nil { + break + } + l = options.Size(x.Prefix) + n += 1 + l + runtime.Sov(uint64(l)) + case *ListRequest_Range_: + if x == nil { + break + } + l = options.Size(x.Range_) + 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().(*ListRequest) + 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) + } + switch x := x.Query.(type) { + case *ListRequest_Prefix_: + encoded, err := options.Marshal(x.Prefix) + 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 + case *ListRequest_Range_: + encoded, err := options.Marshal(x.Range_) + 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.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] = 0x2a + } + if len(x.Index) > 0 { + i -= len(x.Index) + copy(dAtA[i:], x.Index) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Index))) + i-- + dAtA[i] = 0x12 + } + if len(x.MessageName) > 0 { + i -= len(x.MessageName) + copy(dAtA[i:], x.MessageName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MessageName))) + 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().(*ListRequest) + 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: ListRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListRequest: 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 MessageName", 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.MessageName = 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 Index", 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.Index = 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 Prefix", 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 + } + v := &ListRequest_Prefix{} + if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + x.Query = &ListRequest_Prefix_{v} + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Range_", 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 + } + v := &ListRequest_Range{} + if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + x.Query = &ListRequest_Range_{v} + iNdEx = postIndex + case 5: + 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 = (*_ListRequest_Prefix_1_list)(nil) + +type _ListRequest_Prefix_1_list struct { + list *[]*IndexValue +} + +func (x *_ListRequest_Prefix_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ListRequest_Prefix_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ListRequest_Prefix_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*IndexValue) + (*x.list)[i] = concreteValue +} + +func (x *_ListRequest_Prefix_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*IndexValue) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ListRequest_Prefix_1_list) AppendMutable() protoreflect.Value { + v := new(IndexValue) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ListRequest_Prefix_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ListRequest_Prefix_1_list) NewElement() protoreflect.Value { + v := new(IndexValue) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ListRequest_Prefix_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ListRequest_Prefix protoreflect.MessageDescriptor + fd_ListRequest_Prefix_values protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_orm_query_v1alpha1_query_proto_init() + md_ListRequest_Prefix = File_cosmos_orm_query_v1alpha1_query_proto.Messages().ByName("ListRequest").Messages().ByName("Prefix") + fd_ListRequest_Prefix_values = md_ListRequest_Prefix.Fields().ByName("values") +} + +var _ protoreflect.Message = (*fastReflection_ListRequest_Prefix)(nil) + +type fastReflection_ListRequest_Prefix ListRequest_Prefix + +func (x *ListRequest_Prefix) ProtoReflect() protoreflect.Message { + return (*fastReflection_ListRequest_Prefix)(x) +} + +func (x *ListRequest_Prefix) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_orm_query_v1alpha1_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_ListRequest_Prefix_messageType fastReflection_ListRequest_Prefix_messageType +var _ protoreflect.MessageType = fastReflection_ListRequest_Prefix_messageType{} + +type fastReflection_ListRequest_Prefix_messageType struct{} + +func (x fastReflection_ListRequest_Prefix_messageType) Zero() protoreflect.Message { + return (*fastReflection_ListRequest_Prefix)(nil) +} +func (x fastReflection_ListRequest_Prefix_messageType) New() protoreflect.Message { + return new(fastReflection_ListRequest_Prefix) +} +func (x fastReflection_ListRequest_Prefix_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ListRequest_Prefix +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ListRequest_Prefix) Descriptor() protoreflect.MessageDescriptor { + return md_ListRequest_Prefix +} + +// 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_ListRequest_Prefix) Type() protoreflect.MessageType { + return _fastReflection_ListRequest_Prefix_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ListRequest_Prefix) New() protoreflect.Message { + return new(fastReflection_ListRequest_Prefix) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ListRequest_Prefix) Interface() protoreflect.ProtoMessage { + return (*ListRequest_Prefix)(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_ListRequest_Prefix) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Values) != 0 { + value := protoreflect.ValueOfList(&_ListRequest_Prefix_1_list{list: &x.Values}) + if !f(fd_ListRequest_Prefix_values, 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_ListRequest_Prefix) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.ListRequest.Prefix.values": + return len(x.Values) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.ListRequest.Prefix")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.ListRequest.Prefix 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_ListRequest_Prefix) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.ListRequest.Prefix.values": + x.Values = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.ListRequest.Prefix")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.ListRequest.Prefix 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_ListRequest_Prefix) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.orm.query.v1alpha1.ListRequest.Prefix.values": + if len(x.Values) == 0 { + return protoreflect.ValueOfList(&_ListRequest_Prefix_1_list{}) + } + listValue := &_ListRequest_Prefix_1_list{list: &x.Values} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.ListRequest.Prefix")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.ListRequest.Prefix 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_ListRequest_Prefix) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.ListRequest.Prefix.values": + lv := value.List() + clv := lv.(*_ListRequest_Prefix_1_list) + x.Values = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.ListRequest.Prefix")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.ListRequest.Prefix 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_ListRequest_Prefix) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.ListRequest.Prefix.values": + if x.Values == nil { + x.Values = []*IndexValue{} + } + value := &_ListRequest_Prefix_1_list{list: &x.Values} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.ListRequest.Prefix")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.ListRequest.Prefix 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_ListRequest_Prefix) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.ListRequest.Prefix.values": + list := []*IndexValue{} + return protoreflect.ValueOfList(&_ListRequest_Prefix_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.ListRequest.Prefix")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.ListRequest.Prefix 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_ListRequest_Prefix) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.orm.query.v1alpha1.ListRequest.Prefix", 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_ListRequest_Prefix) 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_ListRequest_Prefix) 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_ListRequest_Prefix) 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_ListRequest_Prefix) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ListRequest_Prefix) + 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.Values) > 0 { + for _, e := range x.Values { + 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().(*ListRequest_Prefix) + 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.Values) > 0 { + for iNdEx := len(x.Values) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Values[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().(*ListRequest_Prefix) + 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: ListRequest_Prefix: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListRequest_Prefix: 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 Values", 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.Values = append(x.Values, &IndexValue{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Values[len(x.Values)-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 = (*_ListRequest_Range_1_list)(nil) + +type _ListRequest_Range_1_list struct { + list *[]*IndexValue +} + +func (x *_ListRequest_Range_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ListRequest_Range_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ListRequest_Range_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*IndexValue) + (*x.list)[i] = concreteValue +} + +func (x *_ListRequest_Range_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*IndexValue) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ListRequest_Range_1_list) AppendMutable() protoreflect.Value { + v := new(IndexValue) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ListRequest_Range_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ListRequest_Range_1_list) NewElement() protoreflect.Value { + v := new(IndexValue) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ListRequest_Range_1_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_ListRequest_Range_2_list)(nil) + +type _ListRequest_Range_2_list struct { + list *[]*IndexValue +} + +func (x *_ListRequest_Range_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ListRequest_Range_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ListRequest_Range_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*IndexValue) + (*x.list)[i] = concreteValue +} + +func (x *_ListRequest_Range_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*IndexValue) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ListRequest_Range_2_list) AppendMutable() protoreflect.Value { + v := new(IndexValue) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ListRequest_Range_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ListRequest_Range_2_list) NewElement() protoreflect.Value { + v := new(IndexValue) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ListRequest_Range_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ListRequest_Range protoreflect.MessageDescriptor + fd_ListRequest_Range_start protoreflect.FieldDescriptor + fd_ListRequest_Range_end protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_orm_query_v1alpha1_query_proto_init() + md_ListRequest_Range = File_cosmos_orm_query_v1alpha1_query_proto.Messages().ByName("ListRequest").Messages().ByName("Range") + fd_ListRequest_Range_start = md_ListRequest_Range.Fields().ByName("start") + fd_ListRequest_Range_end = md_ListRequest_Range.Fields().ByName("end") +} + +var _ protoreflect.Message = (*fastReflection_ListRequest_Range)(nil) + +type fastReflection_ListRequest_Range ListRequest_Range + +func (x *ListRequest_Range) ProtoReflect() protoreflect.Message { + return (*fastReflection_ListRequest_Range)(x) +} + +func (x *ListRequest_Range) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_orm_query_v1alpha1_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_ListRequest_Range_messageType fastReflection_ListRequest_Range_messageType +var _ protoreflect.MessageType = fastReflection_ListRequest_Range_messageType{} + +type fastReflection_ListRequest_Range_messageType struct{} + +func (x fastReflection_ListRequest_Range_messageType) Zero() protoreflect.Message { + return (*fastReflection_ListRequest_Range)(nil) +} +func (x fastReflection_ListRequest_Range_messageType) New() protoreflect.Message { + return new(fastReflection_ListRequest_Range) +} +func (x fastReflection_ListRequest_Range_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ListRequest_Range +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ListRequest_Range) Descriptor() protoreflect.MessageDescriptor { + return md_ListRequest_Range +} + +// 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_ListRequest_Range) Type() protoreflect.MessageType { + return _fastReflection_ListRequest_Range_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ListRequest_Range) New() protoreflect.Message { + return new(fastReflection_ListRequest_Range) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ListRequest_Range) Interface() protoreflect.ProtoMessage { + return (*ListRequest_Range)(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_ListRequest_Range) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Start) != 0 { + value := protoreflect.ValueOfList(&_ListRequest_Range_1_list{list: &x.Start}) + if !f(fd_ListRequest_Range_start, value) { + return + } + } + if len(x.End) != 0 { + value := protoreflect.ValueOfList(&_ListRequest_Range_2_list{list: &x.End}) + if !f(fd_ListRequest_Range_end, 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_ListRequest_Range) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.ListRequest.Range.start": + return len(x.Start) != 0 + case "cosmos.orm.query.v1alpha1.ListRequest.Range.end": + return len(x.End) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.ListRequest.Range")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.ListRequest.Range 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_ListRequest_Range) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.ListRequest.Range.start": + x.Start = nil + case "cosmos.orm.query.v1alpha1.ListRequest.Range.end": + x.End = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.ListRequest.Range")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.ListRequest.Range 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_ListRequest_Range) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.orm.query.v1alpha1.ListRequest.Range.start": + if len(x.Start) == 0 { + return protoreflect.ValueOfList(&_ListRequest_Range_1_list{}) + } + listValue := &_ListRequest_Range_1_list{list: &x.Start} + return protoreflect.ValueOfList(listValue) + case "cosmos.orm.query.v1alpha1.ListRequest.Range.end": + if len(x.End) == 0 { + return protoreflect.ValueOfList(&_ListRequest_Range_2_list{}) + } + listValue := &_ListRequest_Range_2_list{list: &x.End} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.ListRequest.Range")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.ListRequest.Range 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_ListRequest_Range) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.ListRequest.Range.start": + lv := value.List() + clv := lv.(*_ListRequest_Range_1_list) + x.Start = *clv.list + case "cosmos.orm.query.v1alpha1.ListRequest.Range.end": + lv := value.List() + clv := lv.(*_ListRequest_Range_2_list) + x.End = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.ListRequest.Range")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.ListRequest.Range 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_ListRequest_Range) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.ListRequest.Range.start": + if x.Start == nil { + x.Start = []*IndexValue{} + } + value := &_ListRequest_Range_1_list{list: &x.Start} + return protoreflect.ValueOfList(value) + case "cosmos.orm.query.v1alpha1.ListRequest.Range.end": + if x.End == nil { + x.End = []*IndexValue{} + } + value := &_ListRequest_Range_2_list{list: &x.End} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.ListRequest.Range")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.ListRequest.Range 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_ListRequest_Range) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.ListRequest.Range.start": + list := []*IndexValue{} + return protoreflect.ValueOfList(&_ListRequest_Range_1_list{list: &list}) + case "cosmos.orm.query.v1alpha1.ListRequest.Range.end": + list := []*IndexValue{} + return protoreflect.ValueOfList(&_ListRequest_Range_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.ListRequest.Range")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.ListRequest.Range 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_ListRequest_Range) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.orm.query.v1alpha1.ListRequest.Range", 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_ListRequest_Range) 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_ListRequest_Range) 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_ListRequest_Range) 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_ListRequest_Range) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ListRequest_Range) + 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.Start) > 0 { + for _, e := range x.Start { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.End) > 0 { + for _, e := range x.End { + 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().(*ListRequest_Range) + 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.End) > 0 { + for iNdEx := len(x.End) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.End[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.Start) > 0 { + for iNdEx := len(x.Start) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Start[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().(*ListRequest_Range) + 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: ListRequest_Range: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListRequest_Range: 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 Start", 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.Start = append(x.Start, &IndexValue{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Start[len(x.Start)-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 End", 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.End = append(x.End, &IndexValue{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.End[len(x.End)-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 = (*_ListResponse_1_list)(nil) + +type _ListResponse_1_list struct { + list *[]*anypb.Any +} + +func (x *_ListResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ListResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ListResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*anypb.Any) + (*x.list)[i] = concreteValue +} + +func (x *_ListResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*anypb.Any) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ListResponse_1_list) AppendMutable() protoreflect.Value { + v := new(anypb.Any) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ListResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ListResponse_1_list) NewElement() protoreflect.Value { + v := new(anypb.Any) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ListResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ListResponse protoreflect.MessageDescriptor + fd_ListResponse_results protoreflect.FieldDescriptor + fd_ListResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_orm_query_v1alpha1_query_proto_init() + md_ListResponse = File_cosmos_orm_query_v1alpha1_query_proto.Messages().ByName("ListResponse") + fd_ListResponse_results = md_ListResponse.Fields().ByName("results") + fd_ListResponse_pagination = md_ListResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_ListResponse)(nil) + +type fastReflection_ListResponse ListResponse + +func (x *ListResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_ListResponse)(x) +} + +func (x *ListResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_orm_query_v1alpha1_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_ListResponse_messageType fastReflection_ListResponse_messageType +var _ protoreflect.MessageType = fastReflection_ListResponse_messageType{} + +type fastReflection_ListResponse_messageType struct{} + +func (x fastReflection_ListResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_ListResponse)(nil) +} +func (x fastReflection_ListResponse_messageType) New() protoreflect.Message { + return new(fastReflection_ListResponse) +} +func (x fastReflection_ListResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ListResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ListResponse) Descriptor() protoreflect.MessageDescriptor { + return md_ListResponse +} + +// 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_ListResponse) Type() protoreflect.MessageType { + return _fastReflection_ListResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ListResponse) New() protoreflect.Message { + return new(fastReflection_ListResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ListResponse) Interface() protoreflect.ProtoMessage { + return (*ListResponse)(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_ListResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Results) != 0 { + value := protoreflect.ValueOfList(&_ListResponse_1_list{list: &x.Results}) + if !f(fd_ListResponse_results, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_ListResponse_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_ListResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.ListResponse.results": + return len(x.Results) != 0 + case "cosmos.orm.query.v1alpha1.ListResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.ListResponse")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.ListResponse 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_ListResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.ListResponse.results": + x.Results = nil + case "cosmos.orm.query.v1alpha1.ListResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.ListResponse")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.ListResponse 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_ListResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.orm.query.v1alpha1.ListResponse.results": + if len(x.Results) == 0 { + return protoreflect.ValueOfList(&_ListResponse_1_list{}) + } + listValue := &_ListResponse_1_list{list: &x.Results} + return protoreflect.ValueOfList(listValue) + case "cosmos.orm.query.v1alpha1.ListResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.ListResponse")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.ListResponse 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_ListResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.ListResponse.results": + lv := value.List() + clv := lv.(*_ListResponse_1_list) + x.Results = *clv.list + case "cosmos.orm.query.v1alpha1.ListResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.ListResponse")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.ListResponse 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_ListResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.ListResponse.results": + if x.Results == nil { + x.Results = []*anypb.Any{} + } + value := &_ListResponse_1_list{list: &x.Results} + return protoreflect.ValueOfList(value) + case "cosmos.orm.query.v1alpha1.ListResponse.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: cosmos.orm.query.v1alpha1.ListResponse")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.ListResponse 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_ListResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.ListResponse.results": + list := []*anypb.Any{} + return protoreflect.ValueOfList(&_ListResponse_1_list{list: &list}) + case "cosmos.orm.query.v1alpha1.ListResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.ListResponse")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.ListResponse 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_ListResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.orm.query.v1alpha1.ListResponse", 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_ListResponse) 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_ListResponse) 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_ListResponse) 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_ListResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ListResponse) + 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.Results) > 0 { + for _, e := range x.Results { + 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().(*ListResponse) + 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] = 0x2a + } + if len(x.Results) > 0 { + for iNdEx := len(x.Results) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Results[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().(*ListResponse) + 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: ListResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListResponse: 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 Results", 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.Results = append(x.Results, &anypb.Any{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Results[len(x.Results)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: + 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_IndexValue protoreflect.MessageDescriptor + fd_IndexValue_uint protoreflect.FieldDescriptor + fd_IndexValue_int protoreflect.FieldDescriptor + fd_IndexValue_str protoreflect.FieldDescriptor + fd_IndexValue_bytes protoreflect.FieldDescriptor + fd_IndexValue_enum protoreflect.FieldDescriptor + fd_IndexValue_bool protoreflect.FieldDescriptor + fd_IndexValue_timestamp protoreflect.FieldDescriptor + fd_IndexValue_duration protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_orm_query_v1alpha1_query_proto_init() + md_IndexValue = File_cosmos_orm_query_v1alpha1_query_proto.Messages().ByName("IndexValue") + fd_IndexValue_uint = md_IndexValue.Fields().ByName("uint") + fd_IndexValue_int = md_IndexValue.Fields().ByName("int") + fd_IndexValue_str = md_IndexValue.Fields().ByName("str") + fd_IndexValue_bytes = md_IndexValue.Fields().ByName("bytes") + fd_IndexValue_enum = md_IndexValue.Fields().ByName("enum") + fd_IndexValue_bool = md_IndexValue.Fields().ByName("bool") + fd_IndexValue_timestamp = md_IndexValue.Fields().ByName("timestamp") + fd_IndexValue_duration = md_IndexValue.Fields().ByName("duration") +} + +var _ protoreflect.Message = (*fastReflection_IndexValue)(nil) + +type fastReflection_IndexValue IndexValue + +func (x *IndexValue) ProtoReflect() protoreflect.Message { + return (*fastReflection_IndexValue)(x) +} + +func (x *IndexValue) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_orm_query_v1alpha1_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_IndexValue_messageType fastReflection_IndexValue_messageType +var _ protoreflect.MessageType = fastReflection_IndexValue_messageType{} + +type fastReflection_IndexValue_messageType struct{} + +func (x fastReflection_IndexValue_messageType) Zero() protoreflect.Message { + return (*fastReflection_IndexValue)(nil) +} +func (x fastReflection_IndexValue_messageType) New() protoreflect.Message { + return new(fastReflection_IndexValue) +} +func (x fastReflection_IndexValue_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_IndexValue +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_IndexValue) Descriptor() protoreflect.MessageDescriptor { + return md_IndexValue +} + +// 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_IndexValue) Type() protoreflect.MessageType { + return _fastReflection_IndexValue_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_IndexValue) New() protoreflect.Message { + return new(fastReflection_IndexValue) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_IndexValue) Interface() protoreflect.ProtoMessage { + return (*IndexValue)(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_IndexValue) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Value != nil { + switch o := x.Value.(type) { + case *IndexValue_Uint: + v := o.Uint + value := protoreflect.ValueOfUint64(v) + if !f(fd_IndexValue_uint, value) { + return + } + case *IndexValue_Int: + v := o.Int + value := protoreflect.ValueOfInt64(v) + if !f(fd_IndexValue_int, value) { + return + } + case *IndexValue_Str: + v := o.Str + value := protoreflect.ValueOfString(v) + if !f(fd_IndexValue_str, value) { + return + } + case *IndexValue_Bytes: + v := o.Bytes + value := protoreflect.ValueOfBytes(v) + if !f(fd_IndexValue_bytes, value) { + return + } + case *IndexValue_Enum: + v := o.Enum + value := protoreflect.ValueOfString(v) + if !f(fd_IndexValue_enum, value) { + return + } + case *IndexValue_Bool: + v := o.Bool + value := protoreflect.ValueOfBool(v) + if !f(fd_IndexValue_bool, value) { + return + } + case *IndexValue_Timestamp: + v := o.Timestamp + value := protoreflect.ValueOfMessage(v.ProtoReflect()) + if !f(fd_IndexValue_timestamp, value) { + return + } + case *IndexValue_Duration: + v := o.Duration + value := protoreflect.ValueOfMessage(v.ProtoReflect()) + if !f(fd_IndexValue_duration, 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_IndexValue) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.IndexValue.uint": + if x.Value == nil { + return false + } else if _, ok := x.Value.(*IndexValue_Uint); ok { + return true + } else { + return false + } + case "cosmos.orm.query.v1alpha1.IndexValue.int": + if x.Value == nil { + return false + } else if _, ok := x.Value.(*IndexValue_Int); ok { + return true + } else { + return false + } + case "cosmos.orm.query.v1alpha1.IndexValue.str": + if x.Value == nil { + return false + } else if _, ok := x.Value.(*IndexValue_Str); ok { + return true + } else { + return false + } + case "cosmos.orm.query.v1alpha1.IndexValue.bytes": + if x.Value == nil { + return false + } else if _, ok := x.Value.(*IndexValue_Bytes); ok { + return true + } else { + return false + } + case "cosmos.orm.query.v1alpha1.IndexValue.enum": + if x.Value == nil { + return false + } else if _, ok := x.Value.(*IndexValue_Enum); ok { + return true + } else { + return false + } + case "cosmos.orm.query.v1alpha1.IndexValue.bool": + if x.Value == nil { + return false + } else if _, ok := x.Value.(*IndexValue_Bool); ok { + return true + } else { + return false + } + case "cosmos.orm.query.v1alpha1.IndexValue.timestamp": + if x.Value == nil { + return false + } else if _, ok := x.Value.(*IndexValue_Timestamp); ok { + return true + } else { + return false + } + case "cosmos.orm.query.v1alpha1.IndexValue.duration": + if x.Value == nil { + return false + } else if _, ok := x.Value.(*IndexValue_Duration); ok { + return true + } else { + return false + } + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.IndexValue")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.IndexValue 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_IndexValue) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.IndexValue.uint": + x.Value = nil + case "cosmos.orm.query.v1alpha1.IndexValue.int": + x.Value = nil + case "cosmos.orm.query.v1alpha1.IndexValue.str": + x.Value = nil + case "cosmos.orm.query.v1alpha1.IndexValue.bytes": + x.Value = nil + case "cosmos.orm.query.v1alpha1.IndexValue.enum": + x.Value = nil + case "cosmos.orm.query.v1alpha1.IndexValue.bool": + x.Value = nil + case "cosmos.orm.query.v1alpha1.IndexValue.timestamp": + x.Value = nil + case "cosmos.orm.query.v1alpha1.IndexValue.duration": + x.Value = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.IndexValue")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.IndexValue 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_IndexValue) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.orm.query.v1alpha1.IndexValue.uint": + if x.Value == nil { + return protoreflect.ValueOfUint64(uint64(0)) + } else if v, ok := x.Value.(*IndexValue_Uint); ok { + return protoreflect.ValueOfUint64(v.Uint) + } else { + return protoreflect.ValueOfUint64(uint64(0)) + } + case "cosmos.orm.query.v1alpha1.IndexValue.int": + if x.Value == nil { + return protoreflect.ValueOfInt64(int64(0)) + } else if v, ok := x.Value.(*IndexValue_Int); ok { + return protoreflect.ValueOfInt64(v.Int) + } else { + return protoreflect.ValueOfInt64(int64(0)) + } + case "cosmos.orm.query.v1alpha1.IndexValue.str": + if x.Value == nil { + return protoreflect.ValueOfString("") + } else if v, ok := x.Value.(*IndexValue_Str); ok { + return protoreflect.ValueOfString(v.Str) + } else { + return protoreflect.ValueOfString("") + } + case "cosmos.orm.query.v1alpha1.IndexValue.bytes": + if x.Value == nil { + return protoreflect.ValueOfBytes(nil) + } else if v, ok := x.Value.(*IndexValue_Bytes); ok { + return protoreflect.ValueOfBytes(v.Bytes) + } else { + return protoreflect.ValueOfBytes(nil) + } + case "cosmos.orm.query.v1alpha1.IndexValue.enum": + if x.Value == nil { + return protoreflect.ValueOfString("") + } else if v, ok := x.Value.(*IndexValue_Enum); ok { + return protoreflect.ValueOfString(v.Enum) + } else { + return protoreflect.ValueOfString("") + } + case "cosmos.orm.query.v1alpha1.IndexValue.bool": + if x.Value == nil { + return protoreflect.ValueOfBool(false) + } else if v, ok := x.Value.(*IndexValue_Bool); ok { + return protoreflect.ValueOfBool(v.Bool) + } else { + return protoreflect.ValueOfBool(false) + } + case "cosmos.orm.query.v1alpha1.IndexValue.timestamp": + if x.Value == nil { + return protoreflect.ValueOfMessage((*timestamppb.Timestamp)(nil).ProtoReflect()) + } else if v, ok := x.Value.(*IndexValue_Timestamp); ok { + return protoreflect.ValueOfMessage(v.Timestamp.ProtoReflect()) + } else { + return protoreflect.ValueOfMessage((*timestamppb.Timestamp)(nil).ProtoReflect()) + } + case "cosmos.orm.query.v1alpha1.IndexValue.duration": + if x.Value == nil { + return protoreflect.ValueOfMessage((*durationpb.Duration)(nil).ProtoReflect()) + } else if v, ok := x.Value.(*IndexValue_Duration); ok { + return protoreflect.ValueOfMessage(v.Duration.ProtoReflect()) + } else { + return protoreflect.ValueOfMessage((*durationpb.Duration)(nil).ProtoReflect()) + } + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.IndexValue")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.IndexValue 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_IndexValue) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.IndexValue.uint": + cv := value.Uint() + x.Value = &IndexValue_Uint{Uint: cv} + case "cosmos.orm.query.v1alpha1.IndexValue.int": + cv := value.Int() + x.Value = &IndexValue_Int{Int: cv} + case "cosmos.orm.query.v1alpha1.IndexValue.str": + cv := value.Interface().(string) + x.Value = &IndexValue_Str{Str: cv} + case "cosmos.orm.query.v1alpha1.IndexValue.bytes": + cv := value.Bytes() + x.Value = &IndexValue_Bytes{Bytes: cv} + case "cosmos.orm.query.v1alpha1.IndexValue.enum": + cv := value.Interface().(string) + x.Value = &IndexValue_Enum{Enum: cv} + case "cosmos.orm.query.v1alpha1.IndexValue.bool": + cv := value.Bool() + x.Value = &IndexValue_Bool{Bool: cv} + case "cosmos.orm.query.v1alpha1.IndexValue.timestamp": + cv := value.Message().Interface().(*timestamppb.Timestamp) + x.Value = &IndexValue_Timestamp{Timestamp: cv} + case "cosmos.orm.query.v1alpha1.IndexValue.duration": + cv := value.Message().Interface().(*durationpb.Duration) + x.Value = &IndexValue_Duration{Duration: cv} + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.IndexValue")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.IndexValue 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_IndexValue) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.IndexValue.timestamp": + if x.Value == nil { + value := ×tamppb.Timestamp{} + oneofValue := &IndexValue_Timestamp{Timestamp: value} + x.Value = oneofValue + return protoreflect.ValueOfMessage(value.ProtoReflect()) + } + switch m := x.Value.(type) { + case *IndexValue_Timestamp: + return protoreflect.ValueOfMessage(m.Timestamp.ProtoReflect()) + default: + value := ×tamppb.Timestamp{} + oneofValue := &IndexValue_Timestamp{Timestamp: value} + x.Value = oneofValue + return protoreflect.ValueOfMessage(value.ProtoReflect()) + } + case "cosmos.orm.query.v1alpha1.IndexValue.duration": + if x.Value == nil { + value := &durationpb.Duration{} + oneofValue := &IndexValue_Duration{Duration: value} + x.Value = oneofValue + return protoreflect.ValueOfMessage(value.ProtoReflect()) + } + switch m := x.Value.(type) { + case *IndexValue_Duration: + return protoreflect.ValueOfMessage(m.Duration.ProtoReflect()) + default: + value := &durationpb.Duration{} + oneofValue := &IndexValue_Duration{Duration: value} + x.Value = oneofValue + return protoreflect.ValueOfMessage(value.ProtoReflect()) + } + case "cosmos.orm.query.v1alpha1.IndexValue.uint": + panic(fmt.Errorf("field uint of message cosmos.orm.query.v1alpha1.IndexValue is not mutable")) + case "cosmos.orm.query.v1alpha1.IndexValue.int": + panic(fmt.Errorf("field int of message cosmos.orm.query.v1alpha1.IndexValue is not mutable")) + case "cosmos.orm.query.v1alpha1.IndexValue.str": + panic(fmt.Errorf("field str of message cosmos.orm.query.v1alpha1.IndexValue is not mutable")) + case "cosmos.orm.query.v1alpha1.IndexValue.bytes": + panic(fmt.Errorf("field bytes of message cosmos.orm.query.v1alpha1.IndexValue is not mutable")) + case "cosmos.orm.query.v1alpha1.IndexValue.enum": + panic(fmt.Errorf("field enum of message cosmos.orm.query.v1alpha1.IndexValue is not mutable")) + case "cosmos.orm.query.v1alpha1.IndexValue.bool": + panic(fmt.Errorf("field bool of message cosmos.orm.query.v1alpha1.IndexValue is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.IndexValue")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.IndexValue 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_IndexValue) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.orm.query.v1alpha1.IndexValue.uint": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.orm.query.v1alpha1.IndexValue.int": + return protoreflect.ValueOfInt64(int64(0)) + case "cosmos.orm.query.v1alpha1.IndexValue.str": + return protoreflect.ValueOfString("") + case "cosmos.orm.query.v1alpha1.IndexValue.bytes": + return protoreflect.ValueOfBytes(nil) + case "cosmos.orm.query.v1alpha1.IndexValue.enum": + return protoreflect.ValueOfString("") + case "cosmos.orm.query.v1alpha1.IndexValue.bool": + return protoreflect.ValueOfBool(false) + case "cosmos.orm.query.v1alpha1.IndexValue.timestamp": + value := ×tamppb.Timestamp{} + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.orm.query.v1alpha1.IndexValue.duration": + value := &durationpb.Duration{} + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.orm.query.v1alpha1.IndexValue")) + } + panic(fmt.Errorf("message cosmos.orm.query.v1alpha1.IndexValue 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_IndexValue) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + case "cosmos.orm.query.v1alpha1.IndexValue.value": + if x.Value == nil { + return nil + } + switch x.Value.(type) { + case *IndexValue_Uint: + return x.Descriptor().Fields().ByName("uint") + case *IndexValue_Int: + return x.Descriptor().Fields().ByName("int") + case *IndexValue_Str: + return x.Descriptor().Fields().ByName("str") + case *IndexValue_Bytes: + return x.Descriptor().Fields().ByName("bytes") + case *IndexValue_Enum: + return x.Descriptor().Fields().ByName("enum") + case *IndexValue_Bool: + return x.Descriptor().Fields().ByName("bool") + case *IndexValue_Timestamp: + return x.Descriptor().Fields().ByName("timestamp") + case *IndexValue_Duration: + return x.Descriptor().Fields().ByName("duration") + } + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.orm.query.v1alpha1.IndexValue", 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_IndexValue) 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_IndexValue) 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_IndexValue) 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_IndexValue) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*IndexValue) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + switch x := x.Value.(type) { + case *IndexValue_Uint: + if x == nil { + break + } + n += 1 + runtime.Sov(uint64(x.Uint)) + case *IndexValue_Int: + if x == nil { + break + } + n += 1 + runtime.Sov(uint64(x.Int)) + case *IndexValue_Str: + if x == nil { + break + } + l = len(x.Str) + n += 1 + l + runtime.Sov(uint64(l)) + case *IndexValue_Bytes: + if x == nil { + break + } + l = len(x.Bytes) + n += 1 + l + runtime.Sov(uint64(l)) + case *IndexValue_Enum: + if x == nil { + break + } + l = len(x.Enum) + n += 1 + l + runtime.Sov(uint64(l)) + case *IndexValue_Bool: + if x == nil { + break + } + n += 2 + case *IndexValue_Timestamp: + if x == nil { + break + } + l = options.Size(x.Timestamp) + n += 1 + l + runtime.Sov(uint64(l)) + case *IndexValue_Duration: + if x == nil { + break + } + l = options.Size(x.Duration) + 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().(*IndexValue) + 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) + } + switch x := x.Value.(type) { + case *IndexValue_Uint: + i = runtime.EncodeVarint(dAtA, i, uint64(x.Uint)) + i-- + dAtA[i] = 0x8 + case *IndexValue_Int: + i = runtime.EncodeVarint(dAtA, i, uint64(x.Int)) + i-- + dAtA[i] = 0x10 + case *IndexValue_Str: + i -= len(x.Str) + copy(dAtA[i:], x.Str) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Str))) + i-- + dAtA[i] = 0x1a + case *IndexValue_Bytes: + i -= len(x.Bytes) + copy(dAtA[i:], x.Bytes) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bytes))) + i-- + dAtA[i] = 0x22 + case *IndexValue_Enum: + i -= len(x.Enum) + copy(dAtA[i:], x.Enum) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Enum))) + i-- + dAtA[i] = 0x2a + case *IndexValue_Bool: + i-- + if x.Bool { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + case *IndexValue_Timestamp: + 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] = 0x3a + case *IndexValue_Duration: + encoded, err := options.Marshal(x.Duration) + 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] = 0x42 + } + 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().(*IndexValue) + 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: IndexValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: IndexValue: 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 Uint", wireType) + } + var v 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++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Value = &IndexValue_Uint{v} + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Int", wireType) + } + var v int64 + 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++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Value = &IndexValue_Int{v} + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Str", 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.Value = &IndexValue_Str{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Bytes", 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 + } + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + x.Value = &IndexValue_Bytes{v} + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Enum", 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.Value = &IndexValue_Enum{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 6: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Bool", wireType) + } + var v 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++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + x.Value = &IndexValue_Bool{b} + case 7: + 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 + } + v := ×tamppb.Timestamp{} + if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + x.Value = &IndexValue_Timestamp{v} + iNdEx = postIndex + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Duration", 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 + } + v := &durationpb.Duration{} + if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + x.Value = &IndexValue_Duration{v} + 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: cosmos/orm/query/v1alpha1/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) +) + +// GetRequest is the Query/Get request type. +type GetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // message_name is the fully-qualified message name of the ORM table being queried. + MessageName string `protobuf:"bytes,1,opt,name=message_name,json=messageName,proto3" json:"message_name,omitempty"` + // index is the index fields expression used in orm definitions. If it + // is empty, the table's primary key is assumed. If it is non-empty, it must + // refer to an unique index. + Index string `protobuf:"bytes,2,opt,name=index,proto3" json:"index,omitempty"` + // values are the values of the fields corresponding to the requested index. + // There must be as many values provided as there are fields in the index and + // these values must correspond to the index field types. + Values []*IndexValue `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` +} + +func (x *GetRequest) Reset() { + *x = GetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_orm_query_v1alpha1_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRequest) ProtoMessage() {} + +// Deprecated: Use GetRequest.ProtoReflect.Descriptor instead. +func (*GetRequest) Descriptor() ([]byte, []int) { + return file_cosmos_orm_query_v1alpha1_query_proto_rawDescGZIP(), []int{0} +} + +func (x *GetRequest) GetMessageName() string { + if x != nil { + return x.MessageName + } + return "" +} + +func (x *GetRequest) GetIndex() string { + if x != nil { + return x.Index + } + return "" +} + +func (x *GetRequest) GetValues() []*IndexValue { + if x != nil { + return x.Values + } + return nil +} + +// GetResponse is the Query/Get response type. +type GetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // result is the result of the get query. If no value is found, the gRPC + // status code NOT_FOUND will be returned. + Result *anypb.Any `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` +} + +func (x *GetResponse) Reset() { + *x = GetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_orm_query_v1alpha1_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetResponse) ProtoMessage() {} + +// Deprecated: Use GetResponse.ProtoReflect.Descriptor instead. +func (*GetResponse) Descriptor() ([]byte, []int) { + return file_cosmos_orm_query_v1alpha1_query_proto_rawDescGZIP(), []int{1} +} + +func (x *GetResponse) GetResult() *anypb.Any { + if x != nil { + return x.Result + } + return nil +} + +// ListRequest is the Query/List request type. +type ListRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // message_name is the fully-qualified message name of the ORM table being queried. + MessageName string `protobuf:"bytes,1,opt,name=message_name,json=messageName,proto3" json:"message_name,omitempty"` + // index is the index fields expression used in orm definitions. If it + // is empty, the table's primary key is assumed. + Index string `protobuf:"bytes,2,opt,name=index,proto3" json:"index,omitempty"` + // query is the query expression corresponding to the provided index. If + // neither prefix nor range is specified, the query will list all the fields + // in the index. + // + // Types that are assignable to Query: + // *ListRequest_Prefix_ + // *ListRequest_Range_ + Query isListRequest_Query `protobuf_oneof:"query"` + // pagination is the pagination request. + Pagination *v1beta1.PageRequest `protobuf:"bytes,5,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *ListRequest) Reset() { + *x = ListRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_orm_query_v1alpha1_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRequest) ProtoMessage() {} + +// Deprecated: Use ListRequest.ProtoReflect.Descriptor instead. +func (*ListRequest) Descriptor() ([]byte, []int) { + return file_cosmos_orm_query_v1alpha1_query_proto_rawDescGZIP(), []int{2} +} + +func (x *ListRequest) GetMessageName() string { + if x != nil { + return x.MessageName + } + return "" +} + +func (x *ListRequest) GetIndex() string { + if x != nil { + return x.Index + } + return "" +} + +func (x *ListRequest) GetQuery() isListRequest_Query { + if x != nil { + return x.Query + } + return nil +} + +func (x *ListRequest) GetPrefix() *ListRequest_Prefix { + if x, ok := x.GetQuery().(*ListRequest_Prefix_); ok { + return x.Prefix + } + return nil +} + +func (x *ListRequest) GetRange_() *ListRequest_Range { + if x, ok := x.GetQuery().(*ListRequest_Range_); ok { + return x.Range_ + } + return nil +} + +func (x *ListRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +type isListRequest_Query interface { + isListRequest_Query() +} + +type ListRequest_Prefix_ struct { + // prefix defines a prefix query. + Prefix *ListRequest_Prefix `protobuf:"bytes,3,opt,name=prefix,proto3,oneof"` +} + +type ListRequest_Range_ struct { + // range defines a range query. + Range_ *ListRequest_Range `protobuf:"bytes,4,opt,name=range,proto3,oneof"` +} + +func (*ListRequest_Prefix_) isListRequest_Query() {} + +func (*ListRequest_Range_) isListRequest_Query() {} + +// ListResponse is the Query/List response type. +type ListResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // results are the results of the query. + Results []*anypb.Any `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` + // pagination is the pagination response. + Pagination *v1beta1.PageResponse `protobuf:"bytes,5,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *ListResponse) Reset() { + *x = ListResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_orm_query_v1alpha1_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListResponse) ProtoMessage() {} + +// Deprecated: Use ListResponse.ProtoReflect.Descriptor instead. +func (*ListResponse) Descriptor() ([]byte, []int) { + return file_cosmos_orm_query_v1alpha1_query_proto_rawDescGZIP(), []int{3} +} + +func (x *ListResponse) GetResults() []*anypb.Any { + if x != nil { + return x.Results + } + return nil +} + +func (x *ListResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +// IndexValue represents the value of a field in an ORM index expression. +type IndexValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // value specifies the index value + // + // Types that are assignable to Value: + // *IndexValue_Uint + // *IndexValue_Int + // *IndexValue_Str + // *IndexValue_Bytes + // *IndexValue_Enum + // *IndexValue_Bool + // *IndexValue_Timestamp + // *IndexValue_Duration + Value isIndexValue_Value `protobuf_oneof:"value"` +} + +func (x *IndexValue) Reset() { + *x = IndexValue{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_orm_query_v1alpha1_query_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IndexValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IndexValue) ProtoMessage() {} + +// Deprecated: Use IndexValue.ProtoReflect.Descriptor instead. +func (*IndexValue) Descriptor() ([]byte, []int) { + return file_cosmos_orm_query_v1alpha1_query_proto_rawDescGZIP(), []int{4} +} + +func (x *IndexValue) GetValue() isIndexValue_Value { + if x != nil { + return x.Value + } + return nil +} + +func (x *IndexValue) GetUint() uint64 { + if x, ok := x.GetValue().(*IndexValue_Uint); ok { + return x.Uint + } + return 0 +} + +func (x *IndexValue) GetInt() int64 { + if x, ok := x.GetValue().(*IndexValue_Int); ok { + return x.Int + } + return 0 +} + +func (x *IndexValue) GetStr() string { + if x, ok := x.GetValue().(*IndexValue_Str); ok { + return x.Str + } + return "" +} + +func (x *IndexValue) GetBytes() []byte { + if x, ok := x.GetValue().(*IndexValue_Bytes); ok { + return x.Bytes + } + return nil +} + +func (x *IndexValue) GetEnum() string { + if x, ok := x.GetValue().(*IndexValue_Enum); ok { + return x.Enum + } + return "" +} + +func (x *IndexValue) GetBool() bool { + if x, ok := x.GetValue().(*IndexValue_Bool); ok { + return x.Bool + } + return false +} + +func (x *IndexValue) GetTimestamp() *timestamppb.Timestamp { + if x, ok := x.GetValue().(*IndexValue_Timestamp); ok { + return x.Timestamp + } + return nil +} + +func (x *IndexValue) GetDuration() *durationpb.Duration { + if x, ok := x.GetValue().(*IndexValue_Duration); ok { + return x.Duration + } + return nil +} + +type isIndexValue_Value interface { + isIndexValue_Value() +} + +type IndexValue_Uint struct { + // uint specifies a value for an uint32, fixed32, uint64, or fixed64 + // index field. + Uint uint64 `protobuf:"varint,1,opt,name=uint,proto3,oneof"` +} + +type IndexValue_Int struct { + // int64 specifies a value for an int32, sfixed32, int64, or sfixed64 + // index field. + Int int64 `protobuf:"varint,2,opt,name=int,proto3,oneof"` +} + +type IndexValue_Str struct { + // str specifies a value for a string index field. + Str string `protobuf:"bytes,3,opt,name=str,proto3,oneof"` +} + +type IndexValue_Bytes struct { + // bytes specifies a value for a bytes index field. + Bytes []byte `protobuf:"bytes,4,opt,name=bytes,proto3,oneof"` +} + +type IndexValue_Enum struct { + // enum specifies a value for an enum index field. + Enum string `protobuf:"bytes,5,opt,name=enum,proto3,oneof"` +} + +type IndexValue_Bool struct { + // bool specifies a value for a bool index field. + Bool bool `protobuf:"varint,6,opt,name=bool,proto3,oneof"` +} + +type IndexValue_Timestamp struct { + // timestamp specifies a value for a timestamp index field. + Timestamp *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=timestamp,proto3,oneof"` +} + +type IndexValue_Duration struct { + // duration specifies a value for a duration index field. + Duration *durationpb.Duration `protobuf:"bytes,8,opt,name=duration,proto3,oneof"` +} + +func (*IndexValue_Uint) isIndexValue_Value() {} + +func (*IndexValue_Int) isIndexValue_Value() {} + +func (*IndexValue_Str) isIndexValue_Value() {} + +func (*IndexValue_Bytes) isIndexValue_Value() {} + +func (*IndexValue_Enum) isIndexValue_Value() {} + +func (*IndexValue_Bool) isIndexValue_Value() {} + +func (*IndexValue_Timestamp) isIndexValue_Value() {} + +func (*IndexValue_Duration) isIndexValue_Value() {} + +// Prefix specifies the arguments to a prefix query. +type ListRequest_Prefix struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // values specifies the index values for the prefix query. + // It is valid to special a partial prefix with fewer values than + // the number of fields in the index. + Values []*IndexValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` +} + +func (x *ListRequest_Prefix) Reset() { + *x = ListRequest_Prefix{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_orm_query_v1alpha1_query_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRequest_Prefix) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRequest_Prefix) ProtoMessage() {} + +// Deprecated: Use ListRequest_Prefix.ProtoReflect.Descriptor instead. +func (*ListRequest_Prefix) Descriptor() ([]byte, []int) { + return file_cosmos_orm_query_v1alpha1_query_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *ListRequest_Prefix) GetValues() []*IndexValue { + if x != nil { + return x.Values + } + return nil +} + +// Range specifies the arguments to a range query. +type ListRequest_Range struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // start specifies the starting index values for the range query. + // It is valid to provide fewer values than the number of fields in the + // index. + Start []*IndexValue `protobuf:"bytes,1,rep,name=start,proto3" json:"start,omitempty"` + // end specifies the inclusive ending index values for the range query. + // It is valid to provide fewer values than the number of fields in the + // index. + End []*IndexValue `protobuf:"bytes,2,rep,name=end,proto3" json:"end,omitempty"` +} + +func (x *ListRequest_Range) Reset() { + *x = ListRequest_Range{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_orm_query_v1alpha1_query_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRequest_Range) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRequest_Range) ProtoMessage() {} + +// Deprecated: Use ListRequest_Range.ProtoReflect.Descriptor instead. +func (*ListRequest_Range) Descriptor() ([]byte, []int) { + return file_cosmos_orm_query_v1alpha1_query_proto_rawDescGZIP(), []int{2, 1} +} + +func (x *ListRequest_Range) GetStart() []*IndexValue { + if x != nil { + return x.Start + } + return nil +} + +func (x *ListRequest_Range) GetEnd() []*IndexValue { + if x != nil { + return x.End + } + return nil +} + +var File_cosmos_orm_query_v1alpha1_query_proto protoreflect.FileDescriptor + +var file_cosmos_orm_query_v1alpha1_query_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x6f, 0x72, 0x6d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 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, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 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, 0x22, 0x84, 0x01, 0x0a, 0x0a, 0x47, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x12, 0x3d, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x22, 0x3b, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x2c, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xee, + 0x03, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, + 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x47, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, + 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x48, 0x00, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x12, 0x44, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00, 0x52, + 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 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, 0x1a, 0x47, + 0x0a, 0x06, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x3d, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x7d, 0x0a, 0x05, 0x52, 0x61, 0x6e, 0x67, 0x65, + 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x37, 0x0a, + 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x42, 0x07, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, + 0x87, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x2e, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, + 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, + 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, 0x8c, 0x02, 0x0a, 0x0a, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x04, 0x75, 0x69, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x04, 0x75, 0x69, 0x6e, 0x74, 0x12, 0x12, + 0x0a, 0x03, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x03, 0x69, + 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x03, 0x73, 0x74, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x03, 0x73, 0x74, 0x72, 0x12, 0x16, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x14, + 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, + 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x14, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x12, 0x3a, 0x0a, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x07, 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, 0x48, 0x00, 0x52, 0x09, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x37, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x32, 0xb6, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x12, 0x54, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, + 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x42, 0xec, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x6f, 0x72, 0x6d, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x38, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4f, + 0x51, 0xaa, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4f, 0x72, 0x6d, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x19, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4f, 0x72, 0x6d, 0x5c, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x25, 0x43, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x5c, 0x4f, 0x72, 0x6d, 0x5c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x1c, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x4f, 0x72, 0x6d, 0x3a, + 0x3a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cosmos_orm_query_v1alpha1_query_proto_rawDescOnce sync.Once + file_cosmos_orm_query_v1alpha1_query_proto_rawDescData = file_cosmos_orm_query_v1alpha1_query_proto_rawDesc +) + +func file_cosmos_orm_query_v1alpha1_query_proto_rawDescGZIP() []byte { + file_cosmos_orm_query_v1alpha1_query_proto_rawDescOnce.Do(func() { + file_cosmos_orm_query_v1alpha1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_orm_query_v1alpha1_query_proto_rawDescData) + }) + return file_cosmos_orm_query_v1alpha1_query_proto_rawDescData +} + +var file_cosmos_orm_query_v1alpha1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_cosmos_orm_query_v1alpha1_query_proto_goTypes = []interface{}{ + (*GetRequest)(nil), // 0: cosmos.orm.query.v1alpha1.GetRequest + (*GetResponse)(nil), // 1: cosmos.orm.query.v1alpha1.GetResponse + (*ListRequest)(nil), // 2: cosmos.orm.query.v1alpha1.ListRequest + (*ListResponse)(nil), // 3: cosmos.orm.query.v1alpha1.ListResponse + (*IndexValue)(nil), // 4: cosmos.orm.query.v1alpha1.IndexValue + (*ListRequest_Prefix)(nil), // 5: cosmos.orm.query.v1alpha1.ListRequest.Prefix + (*ListRequest_Range)(nil), // 6: cosmos.orm.query.v1alpha1.ListRequest.Range + (*anypb.Any)(nil), // 7: google.protobuf.Any + (*v1beta1.PageRequest)(nil), // 8: cosmos.base.query.v1beta1.PageRequest + (*v1beta1.PageResponse)(nil), // 9: cosmos.base.query.v1beta1.PageResponse + (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 11: google.protobuf.Duration +} +var file_cosmos_orm_query_v1alpha1_query_proto_depIdxs = []int32{ + 4, // 0: cosmos.orm.query.v1alpha1.GetRequest.values:type_name -> cosmos.orm.query.v1alpha1.IndexValue + 7, // 1: cosmos.orm.query.v1alpha1.GetResponse.result:type_name -> google.protobuf.Any + 5, // 2: cosmos.orm.query.v1alpha1.ListRequest.prefix:type_name -> cosmos.orm.query.v1alpha1.ListRequest.Prefix + 6, // 3: cosmos.orm.query.v1alpha1.ListRequest.range:type_name -> cosmos.orm.query.v1alpha1.ListRequest.Range + 8, // 4: cosmos.orm.query.v1alpha1.ListRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 7, // 5: cosmos.orm.query.v1alpha1.ListResponse.results:type_name -> google.protobuf.Any + 9, // 6: cosmos.orm.query.v1alpha1.ListResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 10, // 7: cosmos.orm.query.v1alpha1.IndexValue.timestamp:type_name -> google.protobuf.Timestamp + 11, // 8: cosmos.orm.query.v1alpha1.IndexValue.duration:type_name -> google.protobuf.Duration + 4, // 9: cosmos.orm.query.v1alpha1.ListRequest.Prefix.values:type_name -> cosmos.orm.query.v1alpha1.IndexValue + 4, // 10: cosmos.orm.query.v1alpha1.ListRequest.Range.start:type_name -> cosmos.orm.query.v1alpha1.IndexValue + 4, // 11: cosmos.orm.query.v1alpha1.ListRequest.Range.end:type_name -> cosmos.orm.query.v1alpha1.IndexValue + 0, // 12: cosmos.orm.query.v1alpha1.Query.Get:input_type -> cosmos.orm.query.v1alpha1.GetRequest + 2, // 13: cosmos.orm.query.v1alpha1.Query.List:input_type -> cosmos.orm.query.v1alpha1.ListRequest + 1, // 14: cosmos.orm.query.v1alpha1.Query.Get:output_type -> cosmos.orm.query.v1alpha1.GetResponse + 3, // 15: cosmos.orm.query.v1alpha1.Query.List:output_type -> cosmos.orm.query.v1alpha1.ListResponse + 14, // [14:16] is the sub-list for method output_type + 12, // [12:14] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_cosmos_orm_query_v1alpha1_query_proto_init() } +func file_cosmos_orm_query_v1alpha1_query_proto_init() { + if File_cosmos_orm_query_v1alpha1_query_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_cosmos_orm_query_v1alpha1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_orm_query_v1alpha1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_orm_query_v1alpha1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_orm_query_v1alpha1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_orm_query_v1alpha1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IndexValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_orm_query_v1alpha1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRequest_Prefix); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_orm_query_v1alpha1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRequest_Range); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_cosmos_orm_query_v1alpha1_query_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*ListRequest_Prefix_)(nil), + (*ListRequest_Range_)(nil), + } + file_cosmos_orm_query_v1alpha1_query_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*IndexValue_Uint)(nil), + (*IndexValue_Int)(nil), + (*IndexValue_Str)(nil), + (*IndexValue_Bytes)(nil), + (*IndexValue_Enum)(nil), + (*IndexValue_Bool)(nil), + (*IndexValue_Timestamp)(nil), + (*IndexValue_Duration)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_cosmos_orm_query_v1alpha1_query_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_cosmos_orm_query_v1alpha1_query_proto_goTypes, + DependencyIndexes: file_cosmos_orm_query_v1alpha1_query_proto_depIdxs, + MessageInfos: file_cosmos_orm_query_v1alpha1_query_proto_msgTypes, + }.Build() + File_cosmos_orm_query_v1alpha1_query_proto = out.File + file_cosmos_orm_query_v1alpha1_query_proto_rawDesc = nil + file_cosmos_orm_query_v1alpha1_query_proto_goTypes = nil + file_cosmos_orm_query_v1alpha1_query_proto_depIdxs = nil +} diff --git a/api/cosmos/tx/v1beta1/service.pulsar.go b/api/cosmos/tx/v1beta1/service.pulsar.go index deb06a619cd..eb0f8d308c0 100644 --- a/api/cosmos/tx/v1beta1/service.pulsar.go +++ b/api/cosmos/tx/v1beta1/service.pulsar.go @@ -67,6 +67,8 @@ var ( fd_GetTxsEventRequest_events protoreflect.FieldDescriptor fd_GetTxsEventRequest_pagination protoreflect.FieldDescriptor fd_GetTxsEventRequest_order_by protoreflect.FieldDescriptor + fd_GetTxsEventRequest_page protoreflect.FieldDescriptor + fd_GetTxsEventRequest_limit protoreflect.FieldDescriptor ) func init() { @@ -75,6 +77,8 @@ func init() { fd_GetTxsEventRequest_events = md_GetTxsEventRequest.Fields().ByName("events") fd_GetTxsEventRequest_pagination = md_GetTxsEventRequest.Fields().ByName("pagination") fd_GetTxsEventRequest_order_by = md_GetTxsEventRequest.Fields().ByName("order_by") + fd_GetTxsEventRequest_page = md_GetTxsEventRequest.Fields().ByName("page") + fd_GetTxsEventRequest_limit = md_GetTxsEventRequest.Fields().ByName("limit") } var _ protoreflect.Message = (*fastReflection_GetTxsEventRequest)(nil) @@ -160,6 +164,18 @@ func (x *fastReflection_GetTxsEventRequest) Range(f func(protoreflect.FieldDescr return } } + if x.Page != uint64(0) { + value := protoreflect.ValueOfUint64(x.Page) + if !f(fd_GetTxsEventRequest_page, value) { + return + } + } + if x.Limit != uint64(0) { + value := protoreflect.ValueOfUint64(x.Limit) + if !f(fd_GetTxsEventRequest_limit, value) { + return + } + } } // Has reports whether a field is populated. @@ -181,6 +197,10 @@ func (x *fastReflection_GetTxsEventRequest) Has(fd protoreflect.FieldDescriptor) return x.Pagination != nil case "cosmos.tx.v1beta1.GetTxsEventRequest.order_by": return x.OrderBy != 0 + case "cosmos.tx.v1beta1.GetTxsEventRequest.page": + return x.Page != uint64(0) + case "cosmos.tx.v1beta1.GetTxsEventRequest.limit": + return x.Limit != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxsEventRequest")) @@ -203,6 +223,10 @@ func (x *fastReflection_GetTxsEventRequest) Clear(fd protoreflect.FieldDescripto x.Pagination = nil case "cosmos.tx.v1beta1.GetTxsEventRequest.order_by": x.OrderBy = 0 + case "cosmos.tx.v1beta1.GetTxsEventRequest.page": + x.Page = uint64(0) + case "cosmos.tx.v1beta1.GetTxsEventRequest.limit": + x.Limit = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxsEventRequest")) @@ -231,6 +255,12 @@ func (x *fastReflection_GetTxsEventRequest) Get(descriptor protoreflect.FieldDes case "cosmos.tx.v1beta1.GetTxsEventRequest.order_by": value := x.OrderBy return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "cosmos.tx.v1beta1.GetTxsEventRequest.page": + value := x.Page + return protoreflect.ValueOfUint64(value) + case "cosmos.tx.v1beta1.GetTxsEventRequest.limit": + value := x.Limit + return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxsEventRequest")) @@ -259,6 +289,10 @@ func (x *fastReflection_GetTxsEventRequest) Set(fd protoreflect.FieldDescriptor, x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) case "cosmos.tx.v1beta1.GetTxsEventRequest.order_by": x.OrderBy = (OrderBy)(value.Enum()) + case "cosmos.tx.v1beta1.GetTxsEventRequest.page": + x.Page = value.Uint() + case "cosmos.tx.v1beta1.GetTxsEventRequest.limit": + x.Limit = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxsEventRequest")) @@ -292,6 +326,10 @@ func (x *fastReflection_GetTxsEventRequest) Mutable(fd protoreflect.FieldDescrip return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) case "cosmos.tx.v1beta1.GetTxsEventRequest.order_by": panic(fmt.Errorf("field order_by of message cosmos.tx.v1beta1.GetTxsEventRequest is not mutable")) + case "cosmos.tx.v1beta1.GetTxsEventRequest.page": + panic(fmt.Errorf("field page of message cosmos.tx.v1beta1.GetTxsEventRequest is not mutable")) + case "cosmos.tx.v1beta1.GetTxsEventRequest.limit": + panic(fmt.Errorf("field limit of message cosmos.tx.v1beta1.GetTxsEventRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxsEventRequest")) @@ -313,6 +351,10 @@ func (x *fastReflection_GetTxsEventRequest) NewField(fd protoreflect.FieldDescri return protoreflect.ValueOfMessage(m.ProtoReflect()) case "cosmos.tx.v1beta1.GetTxsEventRequest.order_by": return protoreflect.ValueOfEnum(0) + case "cosmos.tx.v1beta1.GetTxsEventRequest.page": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.tx.v1beta1.GetTxsEventRequest.limit": + return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxsEventRequest")) @@ -395,6 +437,12 @@ func (x *fastReflection_GetTxsEventRequest) ProtoMethods() *protoiface.Methods { if x.OrderBy != 0 { n += 1 + runtime.Sov(uint64(x.OrderBy)) } + if x.Page != 0 { + n += 1 + runtime.Sov(uint64(x.Page)) + } + if x.Limit != 0 { + n += 1 + runtime.Sov(uint64(x.Limit)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -424,6 +472,16 @@ func (x *fastReflection_GetTxsEventRequest) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.Limit != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Limit)) + i-- + dAtA[i] = 0x28 + } + if x.Page != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Page)) + i-- + dAtA[i] = 0x20 + } if x.OrderBy != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.OrderBy)) i-- @@ -588,6 +646,44 @@ func (x *fastReflection_GetTxsEventRequest) ProtoMethods() *protoiface.Methods { break } } + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Page", wireType) + } + x.Page = 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.Page |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + } + x.Limit = 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.Limit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -730,6 +826,7 @@ var ( fd_GetTxsEventResponse_txs protoreflect.FieldDescriptor fd_GetTxsEventResponse_tx_responses protoreflect.FieldDescriptor fd_GetTxsEventResponse_pagination protoreflect.FieldDescriptor + fd_GetTxsEventResponse_total protoreflect.FieldDescriptor ) func init() { @@ -738,6 +835,7 @@ func init() { fd_GetTxsEventResponse_txs = md_GetTxsEventResponse.Fields().ByName("txs") fd_GetTxsEventResponse_tx_responses = md_GetTxsEventResponse.Fields().ByName("tx_responses") fd_GetTxsEventResponse_pagination = md_GetTxsEventResponse.Fields().ByName("pagination") + fd_GetTxsEventResponse_total = md_GetTxsEventResponse.Fields().ByName("total") } var _ protoreflect.Message = (*fastReflection_GetTxsEventResponse)(nil) @@ -823,6 +921,12 @@ func (x *fastReflection_GetTxsEventResponse) Range(f func(protoreflect.FieldDesc return } } + if x.Total != uint64(0) { + value := protoreflect.ValueOfUint64(x.Total) + if !f(fd_GetTxsEventResponse_total, value) { + return + } + } } // Has reports whether a field is populated. @@ -844,6 +948,8 @@ func (x *fastReflection_GetTxsEventResponse) Has(fd protoreflect.FieldDescriptor return len(x.TxResponses) != 0 case "cosmos.tx.v1beta1.GetTxsEventResponse.pagination": return x.Pagination != nil + case "cosmos.tx.v1beta1.GetTxsEventResponse.total": + return x.Total != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxsEventResponse")) @@ -866,6 +972,8 @@ func (x *fastReflection_GetTxsEventResponse) Clear(fd protoreflect.FieldDescript x.TxResponses = nil case "cosmos.tx.v1beta1.GetTxsEventResponse.pagination": x.Pagination = nil + case "cosmos.tx.v1beta1.GetTxsEventResponse.total": + x.Total = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxsEventResponse")) @@ -897,6 +1005,9 @@ func (x *fastReflection_GetTxsEventResponse) Get(descriptor protoreflect.FieldDe case "cosmos.tx.v1beta1.GetTxsEventResponse.pagination": value := x.Pagination return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "cosmos.tx.v1beta1.GetTxsEventResponse.total": + value := x.Total + return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxsEventResponse")) @@ -927,6 +1038,8 @@ func (x *fastReflection_GetTxsEventResponse) Set(fd protoreflect.FieldDescriptor x.TxResponses = *clv.list case "cosmos.tx.v1beta1.GetTxsEventResponse.pagination": x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + case "cosmos.tx.v1beta1.GetTxsEventResponse.total": + x.Total = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxsEventResponse")) @@ -964,6 +1077,8 @@ func (x *fastReflection_GetTxsEventResponse) Mutable(fd protoreflect.FieldDescri x.Pagination = new(v1beta1.PageResponse) } return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + case "cosmos.tx.v1beta1.GetTxsEventResponse.total": + panic(fmt.Errorf("field total of message cosmos.tx.v1beta1.GetTxsEventResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxsEventResponse")) @@ -986,6 +1101,8 @@ func (x *fastReflection_GetTxsEventResponse) NewField(fd protoreflect.FieldDescr case "cosmos.tx.v1beta1.GetTxsEventResponse.pagination": m := new(v1beta1.PageResponse) return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "cosmos.tx.v1beta1.GetTxsEventResponse.total": + return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.tx.v1beta1.GetTxsEventResponse")) @@ -1071,6 +1188,9 @@ func (x *fastReflection_GetTxsEventResponse) ProtoMethods() *protoiface.Methods l = options.Size(x.Pagination) n += 1 + l + runtime.Sov(uint64(l)) } + if x.Total != 0 { + n += 1 + runtime.Sov(uint64(x.Total)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1100,6 +1220,11 @@ func (x *fastReflection_GetTxsEventResponse) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.Total != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Total)) + i-- + dAtA[i] = 0x20 + } if x.Pagination != nil { encoded, err := options.Marshal(x.Pagination) if err != nil { @@ -1299,6 +1424,25 @@ func (x *fastReflection_GetTxsEventResponse) ProtoMethods() *protoiface.Methods return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + x.Total = 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.Total |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -5538,8 +5682,16 @@ type GetTxsEventRequest struct { // events is the list of transaction event type. Events []string `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` // pagination defines a pagination for the request. + // Deprecated post v0.46.x: use page and limit instead. + // + // Deprecated: Do not use. Pagination *v1beta1.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` OrderBy OrderBy `protobuf:"varint,3,opt,name=order_by,json=orderBy,proto3,enum=cosmos.tx.v1beta1.OrderBy" json:"order_by,omitempty"` + // page is the page number to query, starts at 1. If not provided, will default to first page. + Page uint64 `protobuf:"varint,4,opt,name=page,proto3" json:"page,omitempty"` + // limit is the total number of results to be returned in the result page. + // If left empty it will default to a value to be set by each app. + Limit uint64 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"` } func (x *GetTxsEventRequest) Reset() { @@ -5569,6 +5721,7 @@ func (x *GetTxsEventRequest) GetEvents() []string { return nil } +// Deprecated: Do not use. func (x *GetTxsEventRequest) GetPagination() *v1beta1.PageRequest { if x != nil { return x.Pagination @@ -5583,6 +5736,20 @@ func (x *GetTxsEventRequest) GetOrderBy() OrderBy { return OrderBy_ORDER_BY_UNSPECIFIED } +func (x *GetTxsEventRequest) GetPage() uint64 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *GetTxsEventRequest) GetLimit() uint64 { + if x != nil { + return x.Limit + } + return 0 +} + // GetTxsEventResponse is the response type for the Service.TxsByEvents // RPC method. type GetTxsEventResponse struct { @@ -5595,7 +5762,12 @@ type GetTxsEventResponse struct { // tx_responses is the list of queried TxResponses. TxResponses []*v1beta11.TxResponse `protobuf:"bytes,2,rep,name=tx_responses,json=txResponses,proto3" json:"tx_responses,omitempty"` // pagination defines a pagination for the response. + // Deprecated post v0.46.x: use total instead. + // + // Deprecated: Do not use. Pagination *v1beta1.PageResponse `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` + // total is total number of results available + Total uint64 `protobuf:"varint,4,opt,name=total,proto3" json:"total,omitempty"` } func (x *GetTxsEventResponse) Reset() { @@ -5632,6 +5804,7 @@ func (x *GetTxsEventResponse) GetTxResponses() []*v1beta11.TxResponse { return nil } +// Deprecated: Do not use. func (x *GetTxsEventResponse) GetPagination() *v1beta1.PageResponse { if x != nil { return x.Pagination @@ -5639,6 +5812,13 @@ func (x *GetTxsEventResponse) GetPagination() *v1beta1.PageResponse { return nil } +func (x *GetTxsEventResponse) GetTotal() uint64 { + if x != nil { + return x.Total + } + return 0 +} + // BroadcastTxRequest is the request type for the Service.BroadcastTxRequest // RPC method. type BroadcastTxRequest struct { @@ -6038,157 +6218,161 @@ var file_cosmos_tx_v1beta1_service_proto_rawDesc = []byte{ 0x1c, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xab, 0x01, 0x0a, 0x12, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd9, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x54, 0x78, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, + 0x28, 0x09, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x4a, 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, 0x12, 0x35, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, - 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x22, 0xd0, 0x01, 0x0a, 0x13, 0x47, 0x65, - 0x74, 0x54, 0x78, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x27, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x54, 0x78, 0x52, 0x03, 0x74, 0x78, 0x73, 0x12, 0x47, 0x0a, 0x0c, 0x74, 0x78, - 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, + 0x62, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x64, + 0x65, 0x72, 0x42, 0x79, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, 0x12, 0x0a, + 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x70, 0x61, 0x67, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0xea, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x54, + 0x78, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x27, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x54, 0x78, 0x52, 0x03, 0x74, 0x78, 0x73, 0x12, 0x47, 0x0a, 0x0c, 0x74, 0x78, 0x5f, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x62, 0x63, + 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0b, 0x74, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x73, 0x12, 0x4b, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 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, 0x42, 0x02, + 0x18, 0x01, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x65, 0x0a, 0x12, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, + 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x78, + 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x78, + 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, + 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0x5c, 0x0a, 0x13, 0x42, + 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0b, 0x74, 0x78, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x74, + 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x57, 0x0a, 0x0f, 0x53, 0x69, 0x6d, + 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x02, + 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x42, + 0x02, 0x18, 0x01, 0x52, 0x02, 0x74, 0x78, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x78, 0x5f, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x78, 0x42, 0x79, 0x74, + 0x65, 0x73, 0x22, 0x8a, 0x01, 0x0a, 0x10, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x69, + 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x61, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x67, 0x61, + 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x38, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, + 0x22, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, + 0x61, 0x73, 0x68, 0x22, 0x7d, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x02, 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x52, 0x02, 0x74, 0x78, 0x12, 0x45, 0x0a, 0x0b, 0x74, + 0x78, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0b, 0x74, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 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, 0x65, 0x0a, 0x12, - 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x34, 0x0a, - 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, - 0x6f, 0x64, 0x65, 0x22, 0x5c, 0x0a, 0x13, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, - 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0b, 0x74, 0x78, - 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x62, - 0x63, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x74, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x57, 0x0a, 0x0f, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x02, 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x42, 0x02, 0x18, 0x01, 0x52, 0x02, 0x74, 0x78, 0x12, - 0x19, 0x0a, 0x08, 0x74, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x07, 0x74, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x8a, 0x01, 0x0a, 0x10, 0x53, - 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3c, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x61, 0x62, 0x63, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x61, 0x73, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x67, 0x61, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x38, 0x0a, - 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x62, 0x63, 0x69, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, - 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x22, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x54, 0x78, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x22, 0x7d, 0x0a, 0x0d, 0x47, - 0x65, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x02, - 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x52, - 0x02, 0x74, 0x78, 0x12, 0x45, 0x0a, 0x0b, 0x74, 0x78, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, - 0x74, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x78, 0x0a, 0x16, 0x47, 0x65, - 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x54, 0x78, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 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, 0xf0, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x57, 0x69, 0x74, 0x68, 0x54, 0x78, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x27, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x54, 0x78, 0x52, 0x03, 0x74, 0x78, 0x73, 0x12, 0x34, 0x0a, 0x08, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x12, - 0x2d, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x47, - 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 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, 0x2a, 0x48, 0x0a, 0x07, 0x4f, 0x72, 0x64, 0x65, 0x72, - 0x42, 0x79, 0x12, 0x18, 0x0a, 0x14, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x42, 0x59, 0x5f, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, - 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x42, 0x59, 0x5f, 0x41, 0x53, 0x43, 0x10, 0x01, 0x12, 0x11, - 0x0a, 0x0d, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x42, 0x59, 0x5f, 0x44, 0x45, 0x53, 0x43, 0x10, - 0x02, 0x2a, 0x7c, 0x0a, 0x0d, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x4d, 0x6f, - 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x5f, - 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x5f, - 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, - 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, - 0x59, 0x4e, 0x43, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, - 0x53, 0x54, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x41, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x03, 0x32, - 0x92, 0x05, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7b, 0x0a, 0x08, 0x53, - 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x6d, 0x75, - 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x69, 0x6d, - 0x75, 0x6c, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x71, 0x0a, 0x05, 0x47, 0x65, 0x74, 0x54, - 0x78, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x74, 0x78, 0x73, 0x2f, 0x7b, 0x68, 0x61, 0x73, 0x68, 0x7d, 0x12, 0x7f, 0x0a, 0x0b, 0x42, - 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, - 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, - 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1b, 0x22, 0x16, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x7c, 0x0a, 0x0b, - 0x47, 0x65, 0x74, 0x54, 0x78, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x54, 0x78, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x73, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x18, 0x12, 0x16, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x73, 0x12, 0x97, 0x01, 0x0a, 0x0f, 0x47, - 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x54, 0x78, 0x73, 0x12, 0x29, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x54, - 0x78, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x74, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x78, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, + 0x74, 0x68, 0x54, 0x78, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 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, 0xf0, 0x01, 0x0a, + 0x17, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x54, 0x78, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, + 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x52, 0x03, 0x74, 0x78, + 0x73, 0x12, 0x34, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x52, 0x07, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, + 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 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, 0x2a, + 0x48, 0x0a, 0x07, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, 0x18, 0x0a, 0x14, 0x4f, 0x52, + 0x44, 0x45, 0x52, 0x5f, 0x42, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x42, 0x59, + 0x5f, 0x41, 0x53, 0x43, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, + 0x42, 0x59, 0x5f, 0x44, 0x45, 0x53, 0x43, 0x10, 0x02, 0x2a, 0x7c, 0x0a, 0x0d, 0x42, 0x72, 0x6f, + 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x42, 0x52, + 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x42, 0x52, + 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x42, 0x4c, 0x4f, + 0x43, 0x4b, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, + 0x54, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x02, 0x12, 0x18, 0x0a, + 0x14, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, + 0x41, 0x53, 0x59, 0x4e, 0x43, 0x10, 0x03, 0x32, 0x92, 0x05, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x7b, 0x0a, 0x08, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x12, + 0x22, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, + 0x22, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, + 0x12, 0x71, 0x0a, 0x05, 0x47, 0x65, 0x74, 0x54, 0x78, 0x12, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x54, 0x78, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x74, 0x78, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x7b, 0x68, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x7d, 0x42, 0xb9, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2c, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x3b, 0x74, 0x78, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, - 0x54, 0x58, 0xaa, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x54, 0x78, 0x2e, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x54, 0x78, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1d, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x54, 0x78, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x54, 0x78, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x73, 0x2f, 0x7b, 0x68, 0x61, + 0x73, 0x68, 0x7d, 0x12, 0x7f, 0x0a, 0x0b, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, + 0x54, 0x78, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, + 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x42, 0x72, + 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x22, 0x16, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, + 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x7c, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x54, 0x78, 0x73, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x73, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x54, 0x78, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, + 0x78, 0x73, 0x12, 0x97, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, + 0x69, 0x74, 0x68, 0x54, 0x78, 0x73, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x74, 0x78, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x57, 0x69, 0x74, 0x68, 0x54, 0x78, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x57, 0x69, + 0x74, 0x68, 0x54, 0x78, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x74, + 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x73, 0x2f, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x2f, 0x7b, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x7d, 0x42, 0xb9, 0x01, 0x0a, + 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x74, 0x78, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, + 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, + 0x74, 0x78, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x74, 0x78, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x54, 0x58, 0xaa, 0x02, 0x11, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x54, 0x78, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, + 0x11, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x54, 0x78, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xe2, 0x02, 0x1d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x54, 0x78, 0x5c, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x54, 0x78, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/cosmos/tx/v1beta1/service.proto b/proto/cosmos/tx/v1beta1/service.proto index e7af15269bf..4b008ae7584 100644 --- a/proto/cosmos/tx/v1beta1/service.proto +++ b/proto/cosmos/tx/v1beta1/service.proto @@ -48,8 +48,14 @@ message GetTxsEventRequest { // events is the list of transaction event type. repeated string events = 1; // pagination defines a pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; + // Deprecated post v0.46.x: use page and limit instead. + cosmos.base.query.v1beta1.PageRequest pagination = 2 [deprecated = true];; OrderBy order_by = 3; + // page is the page number to query, starts at 1. If not provided, will default to first page. + uint64 page = 4; + // limit is the total number of results to be returned in the result page. + // If left empty it will default to a value to be set by each app. + uint64 limit = 5; } // OrderBy defines the sorting order @@ -70,7 +76,10 @@ message GetTxsEventResponse { // tx_responses is the list of queried TxResponses. repeated cosmos.base.abci.v1beta1.TxResponse tx_responses = 2; // pagination defines a pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 3; + // Deprecated post v0.46.x: use total instead. + cosmos.base.query.v1beta1.PageResponse pagination = 3 [deprecated = true]; + // total is total number of results available + uint64 total = 4; } // BroadcastTxRequest is the request type for the Service.BroadcastTxRequest diff --git a/types/tx/service.pb.go b/types/tx/service.pb.go index ee8ee8ac560..909bac30aca 100644 --- a/types/tx/service.pb.go +++ b/types/tx/service.pb.go @@ -108,8 +108,14 @@ type GetTxsEventRequest struct { // events is the list of transaction event type. Events []string `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` // pagination defines a pagination for the request. - Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + // Deprecated post v0.46.x: use page and limit instead. + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` // Deprecated: Do not use. OrderBy OrderBy `protobuf:"varint,3,opt,name=order_by,json=orderBy,proto3,enum=cosmos.tx.v1beta1.OrderBy" json:"order_by,omitempty"` + // page is the page number to query, starts at 1. If not provided, will default to first page. + Page uint64 `protobuf:"varint,4,opt,name=page,proto3" json:"page,omitempty"` + // limit is the total number of results to be returned in the result page. + // If left empty it will default to a value to be set by each app. + Limit uint64 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"` } func (m *GetTxsEventRequest) Reset() { *m = GetTxsEventRequest{} } @@ -152,6 +158,7 @@ func (m *GetTxsEventRequest) GetEvents() []string { return nil } +// Deprecated: Do not use. func (m *GetTxsEventRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination @@ -166,6 +173,20 @@ func (m *GetTxsEventRequest) GetOrderBy() OrderBy { return OrderBy_ORDER_BY_UNSPECIFIED } +func (m *GetTxsEventRequest) GetPage() uint64 { + if m != nil { + return m.Page + } + return 0 +} + +func (m *GetTxsEventRequest) GetLimit() uint64 { + if m != nil { + return m.Limit + } + return 0 +} + // GetTxsEventResponse is the response type for the Service.TxsByEvents // RPC method. type GetTxsEventResponse struct { @@ -174,7 +195,10 @@ type GetTxsEventResponse struct { // tx_responses is the list of queried TxResponses. TxResponses []*types.TxResponse `protobuf:"bytes,2,rep,name=tx_responses,json=txResponses,proto3" json:"tx_responses,omitempty"` // pagination defines a pagination for the response. - Pagination *query.PageResponse `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` + // Deprecated post v0.46.x: use total instead. + Pagination *query.PageResponse `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` // Deprecated: Do not use. + // total is total number of results available + Total uint64 `protobuf:"varint,4,opt,name=total,proto3" json:"total,omitempty"` } func (m *GetTxsEventResponse) Reset() { *m = GetTxsEventResponse{} } @@ -224,6 +248,7 @@ func (m *GetTxsEventResponse) GetTxResponses() []*types.TxResponse { return nil } +// Deprecated: Do not use. func (m *GetTxsEventResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination @@ -231,6 +256,13 @@ func (m *GetTxsEventResponse) GetPagination() *query.PageResponse { return nil } +func (m *GetTxsEventResponse) GetTotal() uint64 { + if m != nil { + return m.Total + } + return 0 +} + // BroadcastTxRequest is the request type for the Service.BroadcastTxRequest // RPC method. type BroadcastTxRequest struct { @@ -700,68 +732,70 @@ func init() { func init() { proto.RegisterFile("cosmos/tx/v1beta1/service.proto", fileDescriptor_e0b00a618705eca7) } var fileDescriptor_e0b00a618705eca7 = []byte{ - // 962 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xd1, 0x6e, 0x1a, 0x47, - 0x14, 0xf5, 0x2e, 0xb6, 0x21, 0x17, 0x3b, 0x21, 0xe3, 0xd4, 0x26, 0x24, 0xc5, 0x64, 0x53, 0x6c, - 0x07, 0xc9, 0xbb, 0x0a, 0x4d, 0xa5, 0xaa, 0xaa, 0x54, 0x79, 0x81, 0xb8, 0xa8, 0x4d, 0x88, 0x06, - 0x57, 0x51, 0xaa, 0x4a, 0x68, 0x81, 0x09, 0xac, 0x62, 0x76, 0xf0, 0xce, 0x60, 0x2d, 0x72, 0xac, - 0x4a, 0x7d, 0xec, 0x53, 0xd5, 0x3e, 0xf4, 0x23, 0xfa, 0x23, 0x7d, 0xb4, 0xd4, 0x97, 0x3e, 0x56, - 0x76, 0x3f, 0xa0, 0x9f, 0x50, 0xed, 0xec, 0x00, 0x0b, 0x5e, 0xe2, 0xd4, 0xea, 0x8b, 0x3d, 0xc3, - 0x9c, 0x7b, 0xef, 0x99, 0x33, 0x73, 0xee, 0x2c, 0x6c, 0xb6, 0x28, 0xeb, 0x51, 0x66, 0x70, 0xcf, - 0x38, 0x7e, 0xdc, 0x24, 0xdc, 0x7a, 0x6c, 0x30, 0xe2, 0x1e, 0xdb, 0x2d, 0xa2, 0xf7, 0x5d, 0xca, - 0x29, 0xba, 0x1d, 0x00, 0x74, 0xee, 0xe9, 0x12, 0x90, 0xb9, 0xdf, 0xa1, 0xb4, 0x73, 0x48, 0x0c, - 0xab, 0x6f, 0x1b, 0x96, 0xe3, 0x50, 0x6e, 0x71, 0x9b, 0x3a, 0x2c, 0x08, 0xc8, 0x3c, 0x94, 0x19, - 0x9b, 0x16, 0x23, 0x86, 0xd5, 0x6c, 0xd9, 0xe3, 0xc4, 0xfe, 0x44, 0x82, 0x32, 0x97, 0xcb, 0x72, - 0x4f, 0xae, 0x15, 0xc2, 0x09, 0x8e, 0x06, 0xc4, 0x1d, 0x8e, 0x31, 0x7d, 0xab, 0x63, 0x3b, 0xa2, - 0x9a, 0xc4, 0xde, 0xe7, 0xc4, 0x69, 0x13, 0xb7, 0x67, 0x3b, 0xdc, 0xe0, 0xc3, 0x3e, 0x61, 0x46, - 0xf3, 0x90, 0xb6, 0xde, 0xcc, 0x5d, 0x15, 0x7f, 0x83, 0x55, 0xed, 0x37, 0x05, 0xd0, 0x3e, 0xe1, - 0x07, 0x1e, 0xab, 0x1c, 0x13, 0x87, 0x63, 0x72, 0x34, 0x20, 0x8c, 0xa3, 0x75, 0x58, 0x26, 0xfe, - 0x9c, 0xa5, 0x95, 0x5c, 0x6c, 0xe7, 0x06, 0x96, 0x33, 0xf4, 0x14, 0x60, 0x52, 0x3e, 0xad, 0xe6, - 0x94, 0x9d, 0x64, 0x71, 0x4b, 0x97, 0xea, 0xf8, 0x5c, 0x75, 0xc1, 0x75, 0xa4, 0x92, 0xfe, 0xc2, - 0xea, 0x10, 0x99, 0x13, 0x87, 0x22, 0xd1, 0x27, 0x90, 0xa0, 0x6e, 0x9b, 0xb8, 0x8d, 0xe6, 0x30, - 0x1d, 0xcb, 0x29, 0x3b, 0x37, 0x8b, 0x19, 0xfd, 0x92, 0xc6, 0x7a, 0xcd, 0x87, 0x98, 0x43, 0x1c, - 0xa7, 0xc1, 0x40, 0x3b, 0x53, 0x60, 0x6d, 0x8a, 0x2d, 0xeb, 0x53, 0x87, 0x11, 0xb4, 0x0d, 0x31, - 0xee, 0x05, 0x5c, 0x93, 0xc5, 0x0f, 0x22, 0x32, 0x1d, 0x78, 0xd8, 0x47, 0xa0, 0x7d, 0x58, 0xe1, - 0x5e, 0xc3, 0x95, 0x71, 0x2c, 0xad, 0x8a, 0x88, 0x8f, 0xa6, 0x76, 0x20, 0x4e, 0x28, 0x14, 0x28, - 0xc1, 0x38, 0xc9, 0xc7, 0x63, 0x3f, 0x51, 0x58, 0x88, 0x98, 0x10, 0x62, 0xfb, 0x4a, 0x21, 0x64, - 0xa6, 0x50, 0xa8, 0x46, 0x00, 0x99, 0x2e, 0xb5, 0xda, 0x2d, 0x8b, 0x71, 0xbf, 0x58, 0xa0, 0xff, - 0x5d, 0x48, 0x70, 0xaf, 0xd1, 0x1c, 0x72, 0xe2, 0xef, 0x4a, 0xd9, 0x59, 0xc1, 0x71, 0xee, 0x99, - 0xfe, 0x14, 0x3d, 0x81, 0xc5, 0x1e, 0x6d, 0x13, 0x21, 0xfe, 0xcd, 0x62, 0x2e, 0x62, 0xb3, 0xe3, - 0x7c, 0xcf, 0x68, 0x9b, 0x60, 0x81, 0xd6, 0xbe, 0x83, 0xb5, 0xa9, 0x32, 0x52, 0xb8, 0x0a, 0x24, - 0x43, 0x7a, 0x88, 0x52, 0xef, 0x2b, 0x07, 0x4c, 0xe4, 0xd0, 0x5e, 0xc2, 0xad, 0xba, 0xdd, 0x1b, - 0x1c, 0x5a, 0x7c, 0x74, 0xda, 0xe8, 0x11, 0xa8, 0xdc, 0x93, 0x09, 0xa3, 0x4f, 0xc4, 0x54, 0xd3, - 0x0a, 0x56, 0xb9, 0x37, 0xb5, 0x59, 0x75, 0x6a, 0xb3, 0xda, 0x8f, 0x0a, 0xa4, 0x26, 0x99, 0x25, - 0xe9, 0xcf, 0x21, 0xd1, 0xb1, 0x58, 0xc3, 0x76, 0x5e, 0x53, 0x59, 0xe0, 0xc1, 0x7c, 0xc6, 0xfb, - 0x16, 0xab, 0x3a, 0xaf, 0x29, 0x8e, 0x77, 0x82, 0x01, 0xfa, 0x14, 0x96, 0x5d, 0xc2, 0x06, 0x87, - 0x5c, 0x5e, 0xdf, 0xdc, 0xfc, 0x58, 0x2c, 0x70, 0x58, 0xe2, 0x35, 0x0d, 0x56, 0xc4, 0xe5, 0x1b, - 0x6d, 0x11, 0xc1, 0x62, 0xd7, 0x62, 0x5d, 0xc1, 0xe1, 0x06, 0x16, 0x63, 0xed, 0x14, 0x56, 0x25, - 0x46, 0x92, 0xcd, 0x5f, 0xa9, 0x83, 0xd0, 0x60, 0xe6, 0x20, 0xd4, 0x6b, 0x1e, 0x84, 0x07, 0xeb, - 0xfb, 0x84, 0x9b, 0xbe, 0xfd, 0x5f, 0xda, 0xbc, 0x7b, 0xe0, 0xb1, 0x90, 0xa3, 0xbb, 0xc4, 0xee, - 0x74, 0xb9, 0xe0, 0x12, 0xc3, 0x72, 0xf6, 0x7f, 0x39, 0x5a, 0xfb, 0x47, 0x81, 0x8d, 0x4b, 0xa5, - 0xff, 0xab, 0x3d, 0x9f, 0x40, 0x42, 0xb4, 0xae, 0x86, 0xdd, 0x96, 0x54, 0xee, 0xea, 0x93, 0xf6, - 0xa5, 0x07, 0x8d, 0x4b, 0x94, 0xa8, 0x96, 0x71, 0x5c, 0x40, 0xab, 0x6d, 0xb4, 0x0b, 0x4b, 0x62, - 0x28, 0x6d, 0xb8, 0x31, 0x27, 0x04, 0x07, 0xa8, 0x19, 0xeb, 0x2e, 0x5e, 0xdb, 0xba, 0x85, 0x2f, - 0x21, 0x2e, 0x3b, 0x14, 0x4a, 0xc3, 0x9d, 0x1a, 0x2e, 0x57, 0x70, 0xc3, 0x7c, 0xd5, 0xf8, 0xe6, - 0x79, 0xfd, 0x45, 0xa5, 0x54, 0x7d, 0x5a, 0xad, 0x94, 0x53, 0x0b, 0x28, 0x05, 0x2b, 0xe3, 0x95, - 0xbd, 0x7a, 0x29, 0xa5, 0xa0, 0xdb, 0xb0, 0x3a, 0xfe, 0xa5, 0x5c, 0xa9, 0x97, 0x52, 0x6a, 0xe1, - 0x2d, 0xac, 0x4e, 0x99, 0x16, 0x65, 0x21, 0x63, 0xe2, 0xda, 0x5e, 0xb9, 0xb4, 0x57, 0x3f, 0x68, - 0x3c, 0xab, 0x95, 0x2b, 0x33, 0x59, 0xd3, 0x70, 0x67, 0x66, 0xdd, 0xfc, 0xba, 0x56, 0xfa, 0x2a, - 0xa5, 0xa0, 0x0d, 0x58, 0x9b, 0x59, 0xa9, 0xbf, 0x7a, 0x5e, 0x4a, 0xa9, 0x11, 0x21, 0x7b, 0x62, - 0x25, 0x56, 0xfc, 0x79, 0x09, 0xe2, 0xf5, 0xe0, 0xbd, 0x43, 0x27, 0x90, 0x18, 0xf9, 0x0d, 0x69, - 0x11, 0x27, 0x35, 0x63, 0xf3, 0xcc, 0xc3, 0x77, 0x62, 0xe4, 0xad, 0xdc, 0xfa, 0xe1, 0x8f, 0xbf, - 0x7f, 0x51, 0x73, 0xda, 0x3d, 0x23, 0xe2, 0xa1, 0x95, 0xe0, 0xcf, 0x94, 0x02, 0x3a, 0x82, 0x25, - 0x61, 0x1e, 0xb4, 0x19, 0x91, 0x35, 0x6c, 0xbd, 0x4c, 0x6e, 0x3e, 0x40, 0xd6, 0xcc, 0x8b, 0x9a, - 0x9b, 0xe8, 0x43, 0x23, 0xea, 0x95, 0x65, 0xc6, 0x89, 0x6f, 0xd7, 0x53, 0xf4, 0x3d, 0x24, 0x43, - 0x7d, 0x11, 0xe5, 0xdf, 0xd5, 0x4e, 0x27, 0xe5, 0xb7, 0xae, 0x82, 0x49, 0x12, 0x0f, 0x04, 0x89, - 0x7b, 0xda, 0x7a, 0x34, 0x09, 0x7f, 0xcf, 0x6f, 0x21, 0x19, 0x7a, 0xd1, 0x22, 0x09, 0x5c, 0x7e, - 0x9f, 0x23, 0x09, 0x44, 0x3c, 0x8c, 0x5a, 0x56, 0x10, 0x48, 0xa3, 0x39, 0x04, 0xd0, 0xaf, 0x0a, - 0xdc, 0x9a, 0x71, 0x2d, 0x7a, 0x14, 0x9d, 0x3b, 0xa2, 0xa9, 0x64, 0x0a, 0xef, 0x03, 0x95, 0x54, - 0x76, 0x05, 0x95, 0x6d, 0x94, 0x9f, 0x73, 0x20, 0xc2, 0x9c, 0xc6, 0x49, 0xd0, 0x96, 0x4e, 0xcd, - 0x2f, 0x7e, 0x3f, 0xcf, 0x2a, 0x67, 0xe7, 0x59, 0xe5, 0xaf, 0xf3, 0xac, 0xf2, 0xd3, 0x45, 0x76, - 0xe1, 0xec, 0x22, 0xbb, 0xf0, 0xe7, 0x45, 0x76, 0xe1, 0xdb, 0x7c, 0xc7, 0xe6, 0xdd, 0x41, 0x53, - 0x6f, 0xd1, 0xde, 0x28, 0x55, 0xf0, 0x6f, 0x97, 0xb5, 0xdf, 0x8c, 0x3e, 0x71, 0xbc, 0xe6, 0xb2, - 0xf8, 0xc0, 0xf9, 0xf8, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0e, 0x11, 0xc0, 0x8c, 0xdd, 0x09, - 0x00, 0x00, + // 1008 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x6f, 0x1a, 0xc7, + 0x17, 0xf7, 0x2e, 0x60, 0xc8, 0xc3, 0x4e, 0xc8, 0xd8, 0x5f, 0x7b, 0x43, 0xf2, 0xc5, 0x64, 0x53, + 0x6c, 0x82, 0xe4, 0x5d, 0x85, 0xa6, 0x52, 0x55, 0x55, 0xaa, 0xcc, 0x8f, 0x50, 0x9a, 0x26, 0x44, + 0x8b, 0xab, 0x28, 0x55, 0x25, 0xb4, 0xc0, 0x04, 0x56, 0x81, 0x1d, 0xcc, 0x0c, 0xd6, 0x22, 0xc7, + 0xaa, 0xd4, 0x63, 0x4f, 0x55, 0x7b, 0xe8, 0xbf, 0xd4, 0x63, 0xa4, 0x5e, 0xda, 0x5b, 0x65, 0xf7, + 0xd4, 0x53, 0xff, 0x84, 0x6a, 0x67, 0x07, 0x58, 0x60, 0x89, 0x93, 0x5c, 0xec, 0x19, 0xe6, 0xf3, + 0xde, 0xfb, 0xbc, 0xcf, 0x9b, 0xf7, 0x66, 0x61, 0xaf, 0x45, 0x68, 0x9f, 0x50, 0x9d, 0x39, 0xfa, + 0xe9, 0x83, 0x26, 0x66, 0xe6, 0x03, 0x9d, 0xe2, 0xe1, 0xa9, 0xd5, 0xc2, 0xda, 0x60, 0x48, 0x18, + 0x41, 0x37, 0x3d, 0x80, 0xc6, 0x1c, 0x4d, 0x00, 0x92, 0x77, 0x3a, 0x84, 0x74, 0x7a, 0x58, 0x37, + 0x07, 0x96, 0x6e, 0xda, 0x36, 0x61, 0x26, 0xb3, 0x88, 0x4d, 0x3d, 0x83, 0xe4, 0x3d, 0xe1, 0xb1, + 0x69, 0x52, 0xac, 0x9b, 0xcd, 0x96, 0x35, 0x75, 0xec, 0x6e, 0x04, 0x28, 0xb9, 0x1c, 0x96, 0x39, + 0xe2, 0x2c, 0xe7, 0x77, 0x70, 0x32, 0xc2, 0xc3, 0xf1, 0x14, 0x33, 0x30, 0x3b, 0x96, 0xcd, 0xa3, + 0x09, 0xec, 0x1d, 0x86, 0xed, 0x36, 0x1e, 0xf6, 0x2d, 0x9b, 0xe9, 0x6c, 0x3c, 0xc0, 0x54, 0x6f, + 0xf6, 0x48, 0xeb, 0xd5, 0xca, 0x53, 0xfe, 0xd7, 0x3b, 0x55, 0xff, 0x94, 0x00, 0x55, 0x30, 0x3b, + 0x76, 0x68, 0xf9, 0x14, 0xdb, 0xcc, 0xc0, 0x27, 0x23, 0x4c, 0x19, 0xda, 0x81, 0x75, 0xec, 0xee, + 0xa9, 0x22, 0xa5, 0x43, 0xd9, 0x6b, 0x86, 0xd8, 0xa1, 0xaf, 0x00, 0x66, 0xe1, 0x15, 0x39, 0x2d, + 0x65, 0xe3, 0xf9, 0x7d, 0x4d, 0xa8, 0xe3, 0x72, 0xd5, 0x38, 0xd7, 0x89, 0x4a, 0xda, 0x33, 0xb3, + 0x83, 0x85, 0xcf, 0x82, 0xac, 0x48, 0x86, 0xcf, 0x1a, 0x7d, 0x02, 0x31, 0x32, 0x6c, 0xe3, 0x61, + 0xa3, 0x39, 0x56, 0x42, 0x69, 0x29, 0x7b, 0x3d, 0x9f, 0xd4, 0x96, 0x74, 0xd6, 0x6a, 0x2e, 0xa4, + 0x30, 0x36, 0xa2, 0xc4, 0x5b, 0x20, 0x04, 0xe1, 0x81, 0xd9, 0xc1, 0x4a, 0x38, 0x2d, 0x65, 0xc3, + 0x06, 0x5f, 0xa3, 0x6d, 0x88, 0xf4, 0xac, 0xbe, 0xc5, 0x94, 0x08, 0xff, 0xd1, 0xdb, 0xa8, 0xff, + 0x48, 0xb0, 0x35, 0x97, 0x1b, 0x1d, 0x10, 0x9b, 0x62, 0x74, 0x00, 0x21, 0xe6, 0x78, 0x99, 0xc5, + 0xf3, 0xff, 0x0b, 0x88, 0x79, 0xec, 0x18, 0x2e, 0x02, 0x55, 0x60, 0x83, 0x39, 0x8d, 0xa1, 0xb0, + 0xa3, 0x8a, 0xcc, 0x2d, 0x3e, 0x9a, 0xcb, 0x97, 0xd7, 0xd3, 0x67, 0x28, 0xc0, 0x46, 0x9c, 0x4d, + 0xd7, 0x14, 0x3d, 0x9e, 0x93, 0x2d, 0xc4, 0x65, 0x3b, 0xb8, 0x52, 0x36, 0xcf, 0x7a, 0x49, 0xb7, + 0x6d, 0x88, 0x30, 0xc2, 0xcc, 0x9e, 0x50, 0xc0, 0xdb, 0xa8, 0x18, 0x50, 0x61, 0x48, 0xcc, 0x76, + 0xcb, 0xa4, 0xcc, 0xa5, 0xe1, 0xd5, 0xf1, 0x16, 0xc4, 0x98, 0xd3, 0x68, 0x8e, 0x19, 0x76, 0xf3, + 0x95, 0xb2, 0x1b, 0x46, 0x94, 0x39, 0x05, 0x77, 0x8b, 0x1e, 0x42, 0xb8, 0x4f, 0xda, 0x98, 0x17, + 0xf1, 0x7a, 0x3e, 0x1d, 0x20, 0xc3, 0xd4, 0xdf, 0x13, 0xd2, 0xc6, 0x06, 0x47, 0xab, 0xdf, 0xc1, + 0xd6, 0x5c, 0x18, 0x21, 0x69, 0x19, 0xe2, 0x3e, 0xa5, 0x78, 0xa8, 0x77, 0x15, 0x0a, 0x66, 0x42, + 0xa9, 0xcf, 0xe1, 0x46, 0xdd, 0xea, 0x8f, 0x7a, 0x26, 0x9b, 0xdc, 0x1a, 0x74, 0x1f, 0x64, 0xe6, + 0x08, 0x87, 0xc1, 0xb5, 0xe2, 0x02, 0xc9, 0xcc, 0x99, 0x4b, 0x56, 0x9e, 0x4b, 0x56, 0xfd, 0x51, + 0x82, 0xc4, 0xcc, 0xb3, 0x20, 0xfd, 0x39, 0xc4, 0x3a, 0x26, 0x6d, 0x58, 0xf6, 0x4b, 0x22, 0x02, + 0xdc, 0x5d, 0xcd, 0xb8, 0x62, 0xd2, 0xaa, 0xfd, 0x92, 0x18, 0xd1, 0x8e, 0xb7, 0x40, 0x9f, 0xc2, + 0xfa, 0x10, 0xd3, 0x51, 0x8f, 0x89, 0x36, 0x48, 0xaf, 0xb6, 0x35, 0x38, 0xce, 0x10, 0x78, 0x55, + 0x85, 0x0d, 0x7e, 0x2d, 0x27, 0x29, 0x22, 0x08, 0x77, 0x4d, 0xda, 0xe5, 0x1c, 0xae, 0x19, 0x7c, + 0xad, 0x9e, 0xc3, 0xa6, 0xc0, 0x08, 0xb2, 0x99, 0x2b, 0x75, 0xe0, 0x1a, 0x2c, 0x14, 0x42, 0xfe, + 0xc0, 0x42, 0x38, 0xb0, 0x53, 0xc1, 0xac, 0xe0, 0x8e, 0x91, 0xe7, 0x16, 0xeb, 0x1e, 0x3b, 0xd4, + 0x37, 0x19, 0xba, 0xd8, 0xea, 0x74, 0x19, 0xe7, 0x12, 0x32, 0xc4, 0x0e, 0x3d, 0xfa, 0xf0, 0xc9, + 0xe0, 0xbf, 0xdd, 0xea, 0xbf, 0x12, 0xec, 0x2e, 0x85, 0x7e, 0xdf, 0xc6, 0x7d, 0x08, 0x31, 0x3e, + 0x02, 0x1b, 0x56, 0x5b, 0x50, 0xb9, 0xa5, 0xcd, 0xc6, 0xa0, 0xe6, 0x0d, 0x40, 0x1e, 0xa2, 0x5a, + 0x32, 0xa2, 0x1c, 0x5a, 0x6d, 0xa3, 0x43, 0x88, 0xf0, 0xa5, 0x68, 0xd0, 0xdd, 0x15, 0x26, 0x86, + 0x87, 0x42, 0x95, 0xb9, 0x8c, 0xc3, 0xef, 0xd5, 0xd4, 0xfe, 0x94, 0x73, 0x5f, 0x42, 0x54, 0x4c, + 0x39, 0xa4, 0xc0, 0x76, 0xcd, 0x28, 0x95, 0x8d, 0x46, 0xe1, 0x45, 0xe3, 0x9b, 0xa7, 0xf5, 0x67, + 0xe5, 0x62, 0xf5, 0x51, 0xb5, 0x5c, 0x4a, 0xac, 0xa1, 0x04, 0x6c, 0x4c, 0x4f, 0x8e, 0xea, 0xc5, + 0x84, 0x84, 0x6e, 0xc2, 0xe6, 0xf4, 0x97, 0x52, 0xb9, 0x5e, 0x4c, 0xc8, 0xb9, 0xd7, 0xb0, 0x39, + 0xd7, 0xb4, 0x28, 0x05, 0xc9, 0x82, 0x51, 0x3b, 0x2a, 0x15, 0x8f, 0xea, 0xc7, 0x8d, 0x27, 0xb5, + 0x52, 0x79, 0xc1, 0xab, 0x02, 0xdb, 0x0b, 0xe7, 0x85, 0xaf, 0x6b, 0xc5, 0xc7, 0x09, 0x09, 0xed, + 0xc2, 0xd6, 0xc2, 0x49, 0xfd, 0xc5, 0xd3, 0x62, 0x42, 0x0e, 0x30, 0x39, 0xe2, 0x27, 0xa1, 0xfc, + 0xcf, 0x11, 0x88, 0xd6, 0xbd, 0x77, 0x13, 0x9d, 0x41, 0x6c, 0xd2, 0x6f, 0x48, 0x0d, 0xa8, 0xd4, + 0x42, 0x9b, 0x27, 0xef, 0xbd, 0x15, 0x23, 0x6e, 0xe5, 0xfe, 0x0f, 0xbf, 0xff, 0xfd, 0x8b, 0x9c, + 0x56, 0x6f, 0xeb, 0x01, 0x0f, 0xb6, 0x00, 0x7f, 0x26, 0xe5, 0xd0, 0x09, 0x44, 0x78, 0xf3, 0xa0, + 0xbd, 0x00, 0xaf, 0xfe, 0xd6, 0x4b, 0xa6, 0x57, 0x03, 0x44, 0xcc, 0x0c, 0x8f, 0xb9, 0x87, 0xfe, + 0xaf, 0x07, 0xbd, 0xd6, 0x54, 0x3f, 0x73, 0xdb, 0xf5, 0x1c, 0x7d, 0x0f, 0x71, 0xdf, 0x5c, 0x44, + 0x99, 0xb7, 0x8d, 0xd3, 0x59, 0xf8, 0xfd, 0xab, 0x60, 0x82, 0xc4, 0x5d, 0x4e, 0xe2, 0xb6, 0xba, + 0x13, 0x4c, 0xc2, 0xcd, 0xf9, 0x35, 0xc4, 0x7d, 0x6f, 0x5d, 0x20, 0x81, 0xe5, 0x77, 0x3e, 0x90, + 0x40, 0xc0, 0x93, 0xa9, 0xa6, 0x38, 0x01, 0x05, 0xad, 0x20, 0x80, 0x7e, 0x95, 0xe0, 0xc6, 0x42, + 0xd7, 0xa2, 0xfb, 0xc1, 0xbe, 0x03, 0x86, 0x4a, 0x32, 0xf7, 0x2e, 0x50, 0x41, 0xe5, 0x90, 0x53, + 0x39, 0x40, 0x99, 0x15, 0x05, 0xe1, 0xcd, 0xa9, 0x9f, 0x79, 0x63, 0xe9, 0xbc, 0xf0, 0xc5, 0x6f, + 0x17, 0x29, 0xe9, 0xcd, 0x45, 0x4a, 0xfa, 0xeb, 0x22, 0x25, 0xfd, 0x74, 0x99, 0x5a, 0x7b, 0x73, + 0x99, 0x5a, 0xfb, 0xe3, 0x32, 0xb5, 0xf6, 0x6d, 0xa6, 0x63, 0xb1, 0xee, 0xa8, 0xa9, 0xb5, 0x48, + 0x7f, 0xe2, 0xca, 0xfb, 0x77, 0x48, 0xdb, 0xaf, 0x26, 0x9f, 0x4a, 0x4e, 0x73, 0x9d, 0x7f, 0x28, + 0x7d, 0xfc, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd1, 0x12, 0x2b, 0xbc, 0x25, 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1022,6 +1056,16 @@ func (m *GetTxsEventRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Limit != 0 { + i = encodeVarintService(dAtA, i, uint64(m.Limit)) + i-- + dAtA[i] = 0x28 + } + if m.Page != 0 { + i = encodeVarintService(dAtA, i, uint64(m.Page)) + i-- + dAtA[i] = 0x20 + } if m.OrderBy != 0 { i = encodeVarintService(dAtA, i, uint64(m.OrderBy)) i-- @@ -1071,6 +1115,11 @@ func (m *GetTxsEventResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Total != 0 { + i = encodeVarintService(dAtA, i, uint64(m.Total)) + i-- + dAtA[i] = 0x20 + } if m.Pagination != nil { { size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) @@ -1493,6 +1542,12 @@ func (m *GetTxsEventRequest) Size() (n int) { if m.OrderBy != 0 { n += 1 + sovService(uint64(m.OrderBy)) } + if m.Page != 0 { + n += 1 + sovService(uint64(m.Page)) + } + if m.Limit != 0 { + n += 1 + sovService(uint64(m.Limit)) + } return n } @@ -1518,6 +1573,9 @@ func (m *GetTxsEventResponse) Size() (n int) { l = m.Pagination.Size() n += 1 + l + sovService(uint64(l)) } + if m.Total != 0 { + n += 1 + sovService(uint64(m.Total)) + } return n } @@ -1779,6 +1837,44 @@ func (m *GetTxsEventRequest) Unmarshal(dAtA []byte) error { break } } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Page", wireType) + } + m.Page = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Page |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + } + m.Limit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Limit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipService(dAtA[iNdEx:]) @@ -1933,6 +2029,25 @@ func (m *GetTxsEventResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + m.Total = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Total |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipService(dAtA[iNdEx:]) diff --git a/x/auth/tx/query.go b/x/auth/tx/query.go index 837170a3e20..d854f0c5799 100644 --- a/x/auth/tx/query.go +++ b/x/auth/tx/query.go @@ -27,11 +27,11 @@ func QueryTxsByEvents(clientCtx client.Context, events []string, page, limit int } if page <= 0 { - return nil, errors.New("page must greater than 0") + return nil, errors.New("page must be greater than 0") } if limit <= 0 { - return nil, errors.New("limit must greater than 0") + return nil, errors.New("limit must be greater than 0") } // XXX: implement ANY diff --git a/x/auth/tx/service.go b/x/auth/tx/service.go index 414ed31b200..41db19607fe 100644 --- a/x/auth/tx/service.go +++ b/x/auth/tx/service.go @@ -7,6 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/types/query" gogogrpc "github.com/gogo/protobuf/grpc" "github.com/golang/protobuf/proto" // nolint: staticcheck @@ -52,9 +53,16 @@ func (s txServer) GetTxsEvent(ctx context.Context, req *txtypes.GetTxsEventReque return nil, status.Error(codes.InvalidArgument, "request cannot be nil") } - page, limit, err := pagination.ParsePagination(req.Pagination) - if err != nil { - return nil, err + page := int(req.Page) + // Tendermint node.TxSearch that is used for querying txs defines pages starting from 1, + // so we default to 1 if not provided in the request. + if page == 0 { + page = 1 + } + + limit := int(req.Limit) + if limit == 0 { + limit = query.DefaultLimit } orderBy := parseOrderBy(req.OrderBy) @@ -88,9 +96,7 @@ func (s txServer) GetTxsEvent(ctx context.Context, req *txtypes.GetTxsEventReque return &txtypes.GetTxsEventResponse{ Txs: txsList, TxResponses: result.Txs, - Pagination: &pagination.PageResponse{ - Total: result.TotalCount, - }, + Total: result.TotalCount, }, nil } diff --git a/x/auth/tx/service_test.go b/x/auth/tx/service_test.go index d144cc406c2..39170c2e1cf 100644 --- a/x/auth/tx/service_test.go +++ b/x/auth/tx/service_test.go @@ -206,21 +206,22 @@ func (s IntegrationTestSuite) TestGetTxEvents_GRPC() { req *tx.GetTxsEventRequest expErr bool expErrMsg string + expLen int }{ { "nil request", nil, - true, "request cannot be nil", + true, "request cannot be nil", 0, }, { "empty request", &tx.GetTxsEventRequest{}, - true, "must declare at least one event to search", + true, "must declare at least one event to search", 0, }, { "request with dummy event", &tx.GetTxsEventRequest{Events: []string{"foobar"}}, - true, "event foobar should be of the format: {eventType}.{eventAttribute}={value}", + true, "event foobar should be of the format: {eventType}.{eventAttribute}={value}", 0, }, { "request with order-by", @@ -228,33 +229,30 @@ func (s IntegrationTestSuite) TestGetTxEvents_GRPC() { Events: []string{bankMsgSendEventAction}, OrderBy: tx.OrderBy_ORDER_BY_ASC, }, - false, "", + false, "", 3, }, { "without pagination", &tx.GetTxsEventRequest{ Events: []string{bankMsgSendEventAction}, }, - false, "", + false, "", 3, }, { "with pagination", &tx.GetTxsEventRequest{ Events: []string{bankMsgSendEventAction}, - Pagination: &query.PageRequest{ - CountTotal: false, - Offset: 0, - Limit: 1, - }, + Page: 2, + Limit: 2, }, - false, "", + false, "", 1, }, { "with multi events", &tx.GetTxsEventRequest{ Events: []string{bankMsgSendEventAction, "message.module='bank'"}, }, - false, "", + false, "", 3, }, } for _, tc := range testCases { @@ -268,7 +266,7 @@ func (s IntegrationTestSuite) TestGetTxEvents_GRPC() { s.Require().NoError(err) s.Require().GreaterOrEqual(len(grpcRes.Txs), 1) s.Require().Equal("foobar", grpcRes.Txs[0].Body.Memo) - + s.Require().Equal(len(grpcRes.Txs), tc.expLen) // Make sure fields are populated. // ref: https://github.com/cosmos/cosmos-sdk/issues/8680 // ref: https://github.com/cosmos/cosmos-sdk/issues/8681 @@ -286,54 +284,55 @@ func (s IntegrationTestSuite) TestGetTxEvents_GRPCGateway() { url string expErr bool expErrMsg string + expLen int }{ { "empty params", fmt.Sprintf("%s/cosmos/tx/v1beta1/txs", val.APIAddress), true, - "must declare at least one event to search", + "must declare at least one event to search", 0, }, { "without pagination", fmt.Sprintf("%s/cosmos/tx/v1beta1/txs?events=%s", val.APIAddress, bankMsgSendEventAction), false, - "", + "", 3, }, { "with pagination", - fmt.Sprintf("%s/cosmos/tx/v1beta1/txs?events=%s&pagination.offset=%d&pagination.limit=%d", val.APIAddress, bankMsgSendEventAction, 0, 10), + fmt.Sprintf("%s/cosmos/tx/v1beta1/txs?events=%s&page=%d&limit=%d", val.APIAddress, bankMsgSendEventAction, 2, 2), false, - "", + "", 1, }, { "valid request: order by asc", fmt.Sprintf("%s/cosmos/tx/v1beta1/txs?events=%s&events=%s&order_by=ORDER_BY_ASC", val.APIAddress, bankMsgSendEventAction, "message.module='bank'"), false, - "", + "", 3, }, { "valid request: order by desc", fmt.Sprintf("%s/cosmos/tx/v1beta1/txs?events=%s&events=%s&order_by=ORDER_BY_DESC", val.APIAddress, bankMsgSendEventAction, "message.module='bank'"), false, - "", + "", 3, }, { "invalid request: invalid order by", fmt.Sprintf("%s/cosmos/tx/v1beta1/txs?events=%s&events=%s&order_by=invalid_order", val.APIAddress, bankMsgSendEventAction, "message.module='bank'"), true, - "is not a valid tx.OrderBy", + "is not a valid tx.OrderBy", 0, }, { "expect pass with multiple-events", fmt.Sprintf("%s/cosmos/tx/v1beta1/txs?events=%s&events=%s", val.APIAddress, bankMsgSendEventAction, "message.module='bank'"), false, - "", + "", 3, }, { "expect pass with escape event", fmt.Sprintf("%s/cosmos/tx/v1beta1/txs?events=%s", val.APIAddress, "message.action%3D'/cosmos.bank.v1beta1.MsgSend'"), false, - "", + "", 3, }, } for _, tc := range testCases { @@ -349,6 +348,7 @@ func (s IntegrationTestSuite) TestGetTxEvents_GRPCGateway() { s.Require().GreaterOrEqual(len(result.Txs), 1) s.Require().Equal("foobar", result.Txs[0].Body.Memo) s.Require().NotZero(result.TxResponses[0].Height) + s.Require().Equal(len(result.Txs), tc.expLen) } }) }