// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: cheqd/resource/v2/query.proto

package types

import (
	context "context"
	fmt "fmt"
	query "github.com/cosmos/cosmos-sdk/types/query"
	_ "github.com/cosmos/cosmos-sdk/types/tx/amino"
	_ "github.com/cosmos/gogoproto/gogoproto"
	grpc1 "github.com/cosmos/gogoproto/grpc"
	proto "github.com/cosmos/gogoproto/proto"
	_ "google.golang.org/genproto/googleapis/api/annotations"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	io "io"
	math "math"
	math_bits "math/bits"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package

// QueryResourceRequest is the request type for the Query/Resource RPC method
type QueryResourceRequest struct {
	// collection_id is an identifier of the DidDocument the resource belongs to.
	// Format: <unique-identifier>
	//
	// Examples:
	// - c82f2b02-bdab-4dd7-b833-3e143745d612
	// - wGHEXrZvJxR8vw5P3UWH1j
	CollectionId string `protobuf:"bytes,1,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
	// id is a unique id of the resource.
	// Format: <uuid>
	Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
}

func (m *QueryResourceRequest) Reset()         { *m = QueryResourceRequest{} }
func (m *QueryResourceRequest) String() string { return proto.CompactTextString(m) }
func (*QueryResourceRequest) ProtoMessage()    {}
func (*QueryResourceRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_14284472e64722d9, []int{0}
}
func (m *QueryResourceRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryResourceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryResourceRequest.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryResourceRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryResourceRequest.Merge(m, src)
}
func (m *QueryResourceRequest) XXX_Size() int {
	return m.Size()
}
func (m *QueryResourceRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryResourceRequest.DiscardUnknown(m)
}

var xxx_messageInfo_QueryResourceRequest proto.InternalMessageInfo

func (m *QueryResourceRequest) GetCollectionId() string {
	if m != nil {
		return m.CollectionId
	}
	return ""
}

func (m *QueryResourceRequest) GetId() string {
	if m != nil {
		return m.Id
	}
	return ""
}

// QueryResourceResponse is the response type for the Query/Resource RPC method
type QueryResourceResponse struct {
	// Successful resolution of the resource returns the following:
	// - resource is the requested resource
	// - metadata is the resource metadata associated with the requested resource
	Resource *ResourceWithMetadata `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
}

func (m *QueryResourceResponse) Reset()         { *m = QueryResourceResponse{} }
func (m *QueryResourceResponse) String() string { return proto.CompactTextString(m) }
func (*QueryResourceResponse) ProtoMessage()    {}
func (*QueryResourceResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_14284472e64722d9, []int{1}
}
func (m *QueryResourceResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryResourceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryResourceResponse.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryResourceResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryResourceResponse.Merge(m, src)
}
func (m *QueryResourceResponse) XXX_Size() int {
	return m.Size()
}
func (m *QueryResourceResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryResourceResponse.DiscardUnknown(m)
}

var xxx_messageInfo_QueryResourceResponse proto.InternalMessageInfo

func (m *QueryResourceResponse) GetResource() *ResourceWithMetadata {
	if m != nil {
		return m.Resource
	}
	return nil
}

// QueryResourceMetadataRequest is the request type for the Query/ResourceMetadata RPC method
type QueryResourceMetadataRequest struct {
	// collection_id is an identifier of the DidDocument the resource belongs to.
	// Format: <unique-identifier>
	//
	// Examples:
	// - c82f2b02-bdab-4dd7-b833-3e143745d612
	// - wGHEXrZvJxR8vw5P3UWH1j
	CollectionId string `protobuf:"bytes,1,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
	// id is a unique id of the resource.
	// Format: <uuid>
	Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
}

func (m *QueryResourceMetadataRequest) Reset()         { *m = QueryResourceMetadataRequest{} }
func (m *QueryResourceMetadataRequest) String() string { return proto.CompactTextString(m) }
func (*QueryResourceMetadataRequest) ProtoMessage()    {}
func (*QueryResourceMetadataRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_14284472e64722d9, []int{2}
}
func (m *QueryResourceMetadataRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryResourceMetadataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryResourceMetadataRequest.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryResourceMetadataRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryResourceMetadataRequest.Merge(m, src)
}
func (m *QueryResourceMetadataRequest) XXX_Size() int {
	return m.Size()
}
func (m *QueryResourceMetadataRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryResourceMetadataRequest.DiscardUnknown(m)
}

var xxx_messageInfo_QueryResourceMetadataRequest proto.InternalMessageInfo

func (m *QueryResourceMetadataRequest) GetCollectionId() string {
	if m != nil {
		return m.CollectionId
	}
	return ""
}

func (m *QueryResourceMetadataRequest) GetId() string {
	if m != nil {
		return m.Id
	}
	return ""
}

// QueryResourceMetadataResponse is the response type for the Query/ResourceMetadata RPC method
type QueryResourceMetadataResponse struct {
	// resource is the requested resource metadata
	Resource *Metadata `protobuf:"bytes,1,opt,name=resource,proto3" json:"linkedResourceMetadata"`
}

func (m *QueryResourceMetadataResponse) Reset()         { *m = QueryResourceMetadataResponse{} }
func (m *QueryResourceMetadataResponse) String() string { return proto.CompactTextString(m) }
func (*QueryResourceMetadataResponse) ProtoMessage()    {}
func (*QueryResourceMetadataResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_14284472e64722d9, []int{3}
}
func (m *QueryResourceMetadataResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryResourceMetadataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryResourceMetadataResponse.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryResourceMetadataResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryResourceMetadataResponse.Merge(m, src)
}
func (m *QueryResourceMetadataResponse) XXX_Size() int {
	return m.Size()
}
func (m *QueryResourceMetadataResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryResourceMetadataResponse.DiscardUnknown(m)
}

var xxx_messageInfo_QueryResourceMetadataResponse proto.InternalMessageInfo

func (m *QueryResourceMetadataResponse) GetResource() *Metadata {
	if m != nil {
		return m.Resource
	}
	return nil
}

// QueryLatestResourceVersionRequest is the request type for the Query/Resource RPC method
type QueryLatestResourceVersionRequest struct {
	// collection_id is an identifier of the DidDocument the resource belongs to.
	// Format: <unique-identifier>
	//
	// Examples:
	// - c82f2b02-bdab-4dd7-b833-3e143745d612
	// - wGHEXrZvJxR8vw5P3UWH1j
	CollectionId string `protobuf:"bytes,1,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
	// name is a human-readable name for the Resource. Defined client-side.
	// Does not change between different versions.
	// Example: PassportSchema, EducationTrustRegistry
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"resourceName"`
	// resource_type is a Resource type that identifies what the Resource is. Defined client-side.
	// This is NOT the same as the resource's media type.
	// Example: AnonCredsSchema, StatusList2021
	ResourceType string `protobuf:"bytes,3,opt,name=resource_type,json=resourceType,proto3" json:"resourceType"`
}

func (m *QueryLatestResourceVersionRequest) Reset()         { *m = QueryLatestResourceVersionRequest{} }
func (m *QueryLatestResourceVersionRequest) String() string { return proto.CompactTextString(m) }
func (*QueryLatestResourceVersionRequest) ProtoMessage()    {}
func (*QueryLatestResourceVersionRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_14284472e64722d9, []int{4}
}
func (m *QueryLatestResourceVersionRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryLatestResourceVersionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryLatestResourceVersionRequest.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryLatestResourceVersionRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryLatestResourceVersionRequest.Merge(m, src)
}
func (m *QueryLatestResourceVersionRequest) XXX_Size() int {
	return m.Size()
}
func (m *QueryLatestResourceVersionRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryLatestResourceVersionRequest.DiscardUnknown(m)
}

var xxx_messageInfo_QueryLatestResourceVersionRequest proto.InternalMessageInfo

func (m *QueryLatestResourceVersionRequest) GetCollectionId() string {
	if m != nil {
		return m.CollectionId
	}
	return ""
}

func (m *QueryLatestResourceVersionRequest) GetName() string {
	if m != nil {
		return m.Name
	}
	return ""
}

func (m *QueryLatestResourceVersionRequest) GetResourceType() string {
	if m != nil {
		return m.ResourceType
	}
	return ""
}

// QueryLatestResourceVersionResponse is the response type for the Query/Resource RPC method
type QueryLatestResourceVersionResponse struct {
	// Successful resolution of the resource returns the following:
	// - resource is the requested resource
	// - metadata is the resource metadata associated with the requested resource
	Resource *ResourceWithMetadata `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
}

func (m *QueryLatestResourceVersionResponse) Reset()         { *m = QueryLatestResourceVersionResponse{} }
func (m *QueryLatestResourceVersionResponse) String() string { return proto.CompactTextString(m) }
func (*QueryLatestResourceVersionResponse) ProtoMessage()    {}
func (*QueryLatestResourceVersionResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_14284472e64722d9, []int{5}
}
func (m *QueryLatestResourceVersionResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryLatestResourceVersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryLatestResourceVersionResponse.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryLatestResourceVersionResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryLatestResourceVersionResponse.Merge(m, src)
}
func (m *QueryLatestResourceVersionResponse) XXX_Size() int {
	return m.Size()
}
func (m *QueryLatestResourceVersionResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryLatestResourceVersionResponse.DiscardUnknown(m)
}

var xxx_messageInfo_QueryLatestResourceVersionResponse proto.InternalMessageInfo

func (m *QueryLatestResourceVersionResponse) GetResource() *ResourceWithMetadata {
	if m != nil {
		return m.Resource
	}
	return nil
}

// QueryLatestResourceVersionMetadataRequest is the request type for the Query/ResourceMetadata RPC method
type QueryLatestResourceVersionMetadataRequest struct {
	// collection_id is an identifier of the DidDocument the resource belongs to.
	// Format: <unique-identifier>
	//
	// Examples:
	// - c82f2b02-bdab-4dd7-b833-3e143745d612
	// - wGHEXrZvJxR8vw5P3UWH1j
	CollectionId string `protobuf:"bytes,1,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
	// name is a human-readable name for the Resource. Defined client-side.
	// Does not change between different versions.
	// Example: PassportSchema, EducationTrustRegistry
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"resourceName"`
	// resource_type is a Resource type that identifies what the Resource is. Defined client-side.
	// This is NOT the same as the resource's media type.
	// Example: AnonCredsSchema, StatusList2021
	ResourceType string `protobuf:"bytes,3,opt,name=resource_type,json=resourceType,proto3" json:"resourceType"`
}

func (m *QueryLatestResourceVersionMetadataRequest) Reset() {
	*m = QueryLatestResourceVersionMetadataRequest{}
}
func (m *QueryLatestResourceVersionMetadataRequest) String() string {
	return proto.CompactTextString(m)
}
func (*QueryLatestResourceVersionMetadataRequest) ProtoMessage() {}
func (*QueryLatestResourceVersionMetadataRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_14284472e64722d9, []int{6}
}
func (m *QueryLatestResourceVersionMetadataRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryLatestResourceVersionMetadataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryLatestResourceVersionMetadataRequest.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryLatestResourceVersionMetadataRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryLatestResourceVersionMetadataRequest.Merge(m, src)
}
func (m *QueryLatestResourceVersionMetadataRequest) XXX_Size() int {
	return m.Size()
}
func (m *QueryLatestResourceVersionMetadataRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryLatestResourceVersionMetadataRequest.DiscardUnknown(m)
}

var xxx_messageInfo_QueryLatestResourceVersionMetadataRequest proto.InternalMessageInfo

func (m *QueryLatestResourceVersionMetadataRequest) GetCollectionId() string {
	if m != nil {
		return m.CollectionId
	}
	return ""
}

func (m *QueryLatestResourceVersionMetadataRequest) GetName() string {
	if m != nil {
		return m.Name
	}
	return ""
}

func (m *QueryLatestResourceVersionMetadataRequest) GetResourceType() string {
	if m != nil {
		return m.ResourceType
	}
	return ""
}

// QueryLatestResourceVersionMetadataResponse is the response type for the Query/ResourceMetadata RPC method
type QueryLatestResourceVersionMetadataResponse struct {
	// resource is the requested resource metadata
	Resource *Metadata `protobuf:"bytes,1,opt,name=resource,proto3" json:"linkedResourceMetadata"`
}

func (m *QueryLatestResourceVersionMetadataResponse) Reset() {
	*m = QueryLatestResourceVersionMetadataResponse{}
}
func (m *QueryLatestResourceVersionMetadataResponse) String() string {
	return proto.CompactTextString(m)
}
func (*QueryLatestResourceVersionMetadataResponse) ProtoMessage() {}
func (*QueryLatestResourceVersionMetadataResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_14284472e64722d9, []int{7}
}
func (m *QueryLatestResourceVersionMetadataResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryLatestResourceVersionMetadataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryLatestResourceVersionMetadataResponse.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryLatestResourceVersionMetadataResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryLatestResourceVersionMetadataResponse.Merge(m, src)
}
func (m *QueryLatestResourceVersionMetadataResponse) XXX_Size() int {
	return m.Size()
}
func (m *QueryLatestResourceVersionMetadataResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryLatestResourceVersionMetadataResponse.DiscardUnknown(m)
}

var xxx_messageInfo_QueryLatestResourceVersionMetadataResponse proto.InternalMessageInfo

func (m *QueryLatestResourceVersionMetadataResponse) GetResource() *Metadata {
	if m != nil {
		return m.Resource
	}
	return nil
}

// QueryCollectionResourcesRequest is the request type for the Query/CollectionResources RPC method
type QueryCollectionResourcesRequest struct {
	// collection_id is an identifier of the DidDocument the resource belongs to.
	// Format: <unique-identifier>
	//
	// Examples:
	// - c82f2b02-bdab-4dd7-b833-3e143745d612
	// - wGHEXrZvJxR8vw5P3UWH1j
	CollectionId string `protobuf:"bytes,1,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (m *QueryCollectionResourcesRequest) Reset()         { *m = QueryCollectionResourcesRequest{} }
func (m *QueryCollectionResourcesRequest) String() string { return proto.CompactTextString(m) }
func (*QueryCollectionResourcesRequest) ProtoMessage()    {}
func (*QueryCollectionResourcesRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_14284472e64722d9, []int{8}
}
func (m *QueryCollectionResourcesRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryCollectionResourcesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryCollectionResourcesRequest.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryCollectionResourcesRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryCollectionResourcesRequest.Merge(m, src)
}
func (m *QueryCollectionResourcesRequest) XXX_Size() int {
	return m.Size()
}
func (m *QueryCollectionResourcesRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryCollectionResourcesRequest.DiscardUnknown(m)
}

var xxx_messageInfo_QueryCollectionResourcesRequest proto.InternalMessageInfo

func (m *QueryCollectionResourcesRequest) GetCollectionId() string {
	if m != nil {
		return m.CollectionId
	}
	return ""
}

func (m *QueryCollectionResourcesRequest) GetPagination() *query.PageRequest {
	if m != nil {
		return m.Pagination
	}
	return nil
}

// QueryCollectionResourcesResponse is the response type for the Query/CollectionResources RPC method
type QueryCollectionResourcesResponse struct {
	// resources is the requested collection of resource metadata
	Resources []*Metadata `protobuf:"bytes,1,rep,name=resources,proto3" json:"linkedResourceMetadata"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (m *QueryCollectionResourcesResponse) Reset()         { *m = QueryCollectionResourcesResponse{} }
func (m *QueryCollectionResourcesResponse) String() string { return proto.CompactTextString(m) }
func (*QueryCollectionResourcesResponse) ProtoMessage()    {}
func (*QueryCollectionResourcesResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_14284472e64722d9, []int{9}
}
func (m *QueryCollectionResourcesResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryCollectionResourcesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryCollectionResourcesResponse.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryCollectionResourcesResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryCollectionResourcesResponse.Merge(m, src)
}
func (m *QueryCollectionResourcesResponse) XXX_Size() int {
	return m.Size()
}
func (m *QueryCollectionResourcesResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryCollectionResourcesResponse.DiscardUnknown(m)
}

var xxx_messageInfo_QueryCollectionResourcesResponse proto.InternalMessageInfo

func (m *QueryCollectionResourcesResponse) GetResources() []*Metadata {
	if m != nil {
		return m.Resources
	}
	return nil
}

func (m *QueryCollectionResourcesResponse) GetPagination() *query.PageResponse {
	if m != nil {
		return m.Pagination
	}
	return nil
}

// QueryParamsRequest is the request type for the Query/Params RPC method.
type QueryParamsRequest struct {
}

func (m *QueryParamsRequest) Reset()         { *m = QueryParamsRequest{} }
func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) }
func (*QueryParamsRequest) ProtoMessage()    {}
func (*QueryParamsRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_14284472e64722d9, []int{10}
}
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryParamsRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryParamsRequest.Merge(m, src)
}
func (m *QueryParamsRequest) XXX_Size() int {
	return m.Size()
}
func (m *QueryParamsRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m)
}

var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo

// QueryParamsResponse is the response type for the Query/Params RPC method.
type QueryParamsResponse struct {
	// params defines the parameters of the module.
	Params FeeParams `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

func (m *QueryParamsResponse) Reset()         { *m = QueryParamsResponse{} }
func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) }
func (*QueryParamsResponse) ProtoMessage()    {}
func (*QueryParamsResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_14284472e64722d9, []int{11}
}
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryParamsResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryParamsResponse.Merge(m, src)
}
func (m *QueryParamsResponse) XXX_Size() int {
	return m.Size()
}
func (m *QueryParamsResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m)
}

var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo

func (m *QueryParamsResponse) GetParams() FeeParams {
	if m != nil {
		return m.Params
	}
	return FeeParams{}
}

func init() {
	proto.RegisterType((*QueryResourceRequest)(nil), "cheqd.resource.v2.QueryResourceRequest")
	proto.RegisterType((*QueryResourceResponse)(nil), "cheqd.resource.v2.QueryResourceResponse")
	proto.RegisterType((*QueryResourceMetadataRequest)(nil), "cheqd.resource.v2.QueryResourceMetadataRequest")
	proto.RegisterType((*QueryResourceMetadataResponse)(nil), "cheqd.resource.v2.QueryResourceMetadataResponse")
	proto.RegisterType((*QueryLatestResourceVersionRequest)(nil), "cheqd.resource.v2.QueryLatestResourceVersionRequest")
	proto.RegisterType((*QueryLatestResourceVersionResponse)(nil), "cheqd.resource.v2.QueryLatestResourceVersionResponse")
	proto.RegisterType((*QueryLatestResourceVersionMetadataRequest)(nil), "cheqd.resource.v2.QueryLatestResourceVersionMetadataRequest")
	proto.RegisterType((*QueryLatestResourceVersionMetadataResponse)(nil), "cheqd.resource.v2.QueryLatestResourceVersionMetadataResponse")
	proto.RegisterType((*QueryCollectionResourcesRequest)(nil), "cheqd.resource.v2.QueryCollectionResourcesRequest")
	proto.RegisterType((*QueryCollectionResourcesResponse)(nil), "cheqd.resource.v2.QueryCollectionResourcesResponse")
	proto.RegisterType((*QueryParamsRequest)(nil), "cheqd.resource.v2.QueryParamsRequest")
	proto.RegisterType((*QueryParamsResponse)(nil), "cheqd.resource.v2.QueryParamsResponse")
}

func init() { proto.RegisterFile("cheqd/resource/v2/query.proto", fileDescriptor_14284472e64722d9) }

var fileDescriptor_14284472e64722d9 = []byte{
	// 812 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x4f, 0x13, 0x4f,
	0x18, 0xee, 0x94, 0xdf, 0x8f, 0xc0, 0x00, 0x06, 0x06, 0x30, 0xcd, 0x02, 0x6d, 0x5d, 0x15, 0x10,
	0x65, 0x47, 0x5a, 0x39, 0x68, 0x30, 0x26, 0x25, 0x62, 0x0c, 0x48, 0x70, 0x41, 0x4c, 0x8c, 0x09,
	0x99, 0x76, 0xc7, 0xb2, 0xb1, 0xbb, 0x53, 0xba, 0x5b, 0x22, 0x21, 0x3d, 0xe0, 0x07, 0x30, 0x26,
	0x5e, 0xfc, 0x02, 0x26, 0x5e, 0x4c, 0x4c, 0x3c, 0x79, 0xf5, 0xc4, 0x11, 0xe3, 0xc5, 0x13, 0x51,
	0x30, 0x31, 0xe1, 0xe8, 0x27, 0x30, 0x9d, 0x9d, 0x69, 0x6d, 0xbb, 0xa5, 0x94, 0x3f, 0x97, 0xcd,
	0x32, 0xef, 0xfb, 0xbc, 0xef, 0xf3, 0xbc, 0xef, 0xce, 0x43, 0xe1, 0x50, 0x6a, 0x95, 0xae, 0x19,
	0x38, 0x47, 0x1d, 0x96, 0xcf, 0xa5, 0x28, 0x5e, 0x8f, 0xe1, 0xb5, 0x3c, 0xcd, 0x6d, 0x68, 0xd9,
	0x1c, 0x73, 0x19, 0xea, 0xe1, 0x61, 0x4d, 0x86, 0xb5, 0xf5, 0x98, 0x12, 0xad, 0x45, 0x94, 0xc2,
	0x1c, 0xa4, 0x0c, 0xd4, 0x66, 0x3c, 0xa3, 0x32, 0x38, 0x96, 0x62, 0x8e, 0xc5, 0x1c, 0x9c, 0x24,
	0x0e, 0xf5, 0x5a, 0xe1, 0xf5, 0x89, 0x24, 0x75, 0xc9, 0x04, 0xce, 0x92, 0xb4, 0x69, 0x13, 0xd7,
	0x64, 0xb6, 0xc8, 0xed, 0x4b, 0xb3, 0x34, 0xe3, 0xaf, 0xb8, 0xf8, 0x26, 0x4e, 0x07, 0xd3, 0x8c,
	0xa5, 0x33, 0x14, 0x93, 0xac, 0x89, 0x89, 0x6d, 0x33, 0x97, 0x43, 0x1c, 0x11, 0xed, 0x21, 0x96,
	0x69, 0x33, 0xcc, 0x9f, 0xde, 0x91, 0x3a, 0x0b, 0xfb, 0x1e, 0x16, 0x1b, 0xe9, 0x82, 0x90, 0x4e,
	0xd7, 0xf2, 0xd4, 0x71, 0xd1, 0x45, 0xd8, 0x95, 0x62, 0x99, 0x0c, 0x4d, 0x15, 0xf1, 0x2b, 0xa6,
	0x11, 0x02, 0x51, 0x30, 0xda, 0xae, 0x77, 0x96, 0x0f, 0xef, 0x1b, 0xe8, 0x1c, 0x0c, 0x9a, 0x46,
	0x28, 0xc8, 0x23, 0x41, 0xd3, 0x50, 0x9f, 0xc2, 0xfe, 0xaa, 0x62, 0x4e, 0x96, 0xd9, 0x0e, 0x45,
	0xd3, 0xb0, 0x4d, 0x2a, 0xe6, 0x85, 0x3a, 0x62, 0x23, 0x5a, 0xcd, 0xf4, 0x34, 0x09, 0x7b, 0x6c,
	0xba, 0xab, 0x0f, 0xa8, 0x4b, 0x0c, 0xe2, 0x12, 0xbd, 0x04, 0x54, 0x17, 0xe1, 0x60, 0x45, 0xf5,
	0x52, 0xca, 0x49, 0x28, 0xbb, 0x70, 0xa8, 0x4e, 0x51, 0x41, 0x7d, 0xb1, 0x86, 0xfa, 0x80, 0x0f,
	0x75, 0x09, 0x4b, 0x28, 0x07, 0xbb, 0x91, 0xf3, 0x19, 0xd3, 0x7e, 0x4e, 0x8d, 0x9a, 0x92, 0x65,
	0x29, 0xef, 0x00, 0xbc, 0xc0, 0xdb, 0xce, 0x11, 0x97, 0x3a, 0xae, 0xcc, 0x5c, 0xa6, 0x39, 0xc7,
	0x64, 0x76, 0x53, 0x82, 0x2e, 0xc1, 0xff, 0x6c, 0x62, 0x51, 0x4f, 0x52, 0xa2, 0xfb, 0x60, 0x37,
	0xd2, 0x29, 0xdb, 0xcc, 0x13, 0x8b, 0xea, 0x3c, 0x8a, 0x26, 0x61, 0x97, 0x3c, 0x5d, 0x71, 0x37,
	0xb2, 0x34, 0xd4, 0x52, 0x9b, 0xbe, 0xb4, 0x91, 0xa5, 0x7a, 0xc5, 0x5f, 0xaa, 0x09, 0xd5, 0xc3,
	0x68, 0x9e, 0xe6, 0x76, 0x3f, 0x00, 0x78, 0xa5, 0x7e, 0xaf, 0x63, 0xed, 0xfa, 0x4c, 0x47, 0xb3,
	0x05, 0xe0, 0xd8, 0x51, 0xf8, 0x9e, 0xe5, 0x67, 0xf4, 0x0a, 0xc0, 0x08, 0xe7, 0x30, 0x5d, 0x92,
	0x2d, 0xb3, 0x9d, 0xa6, 0x26, 0x35, 0x03, 0x61, 0xd9, 0x60, 0xf8, 0xbc, 0x3a, 0x62, 0xc3, 0x9a,
	0xe7, 0x46, 0x5a, 0xd1, 0x8d, 0x34, 0xcf, 0xf8, 0x84, 0x1b, 0x69, 0x0b, 0x24, 0x2d, 0x9d, 0x42,
	0xff, 0x07, 0xa9, 0x7e, 0x01, 0x30, 0x5a, 0x9f, 0x90, 0x18, 0xc5, 0x23, 0xd8, 0x2e, 0x15, 0x38,
	0x21, 0x10, 0x6d, 0x39, 0xc9, 0x2c, 0xca, 0x95, 0xd0, 0x3d, 0x1f, 0x0d, 0x23, 0x0d, 0x35, 0x78,
	0x9c, 0x2a, 0x44, 0xf4, 0x41, 0xc4, 0x35, 0x2c, 0x90, 0x1c, 0xb1, 0xe4, 0x1c, 0xd5, 0x65, 0xd8,
	0x5b, 0x71, 0x2a, 0xc4, 0xdc, 0x81, 0xad, 0x59, 0x7e, 0x22, 0xb6, 0x3a, 0xe8, 0xa3, 0x64, 0x86,
	0x52, 0x0f, 0x95, 0x68, 0xdf, 0xde, 0x8d, 0x04, 0xde, 0xff, 0xfe, 0x38, 0x06, 0x74, 0x01, 0x8b,
	0xfd, 0x6c, 0x83, 0xff, 0xf3, 0xc2, 0xe8, 0x2d, 0x80, 0x6d, 0x52, 0x20, 0xf2, 0xbb, 0x41, 0x7e,
	0x46, 0xad, 0x8c, 0x36, 0x4e, 0xf4, 0xa8, 0xaa, 0x37, 0x5f, 0x7e, 0xfb, 0xf5, 0x26, 0x18, 0x47,
	0x13, 0xb8, 0xf6, 0x7f, 0xd0, 0x66, 0xc5, 0x37, 0x52, 0x28, 0xc5, 0x1c, 0xbc, 0x69, 0x1a, 0x05,
	0xf4, 0x19, 0xc0, 0xee, 0xea, 0xd9, 0x23, 0xdc, 0xa8, 0x73, 0xd5, 0xa5, 0x55, 0xae, 0x1f, 0x1d,
	0x20, 0x28, 0x27, 0x38, 0xe5, 0x29, 0x74, 0xab, 0x69, 0xca, 0xd8, 0x92, 0x34, 0xbf, 0x02, 0xd8,
	0xef, 0x7b, 0x47, 0xd1, 0x8d, 0x7a, 0x7c, 0x0e, 0x73, 0x65, 0x65, 0xb2, 0x49, 0x94, 0x90, 0x32,
	0xcb, 0xa5, 0xdc, 0x45, 0xd3, 0xcd, 0x49, 0x29, 0x5a, 0x54, 0x01, 0x6f, 0x56, 0x38, 0x54, 0x01,
	0xfd, 0x01, 0x70, 0xe8, 0x50, 0xdf, 0x41, 0x53, 0x4d, 0xb1, 0xac, 0xde, 0xd4, 0xed, 0x63, 0xa2,
	0x85, 0xd6, 0x25, 0xae, 0x75, 0x1e, 0xcd, 0x9d, 0x82, 0xd6, 0xf2, 0x22, 0x3f, 0x01, 0xd8, 0xeb,
	0xe3, 0x2b, 0x28, 0x56, 0x8f, 0x6c, 0x7d, 0x57, 0x54, 0xe2, 0x4d, 0x61, 0x84, 0xac, 0x38, 0x97,
	0x35, 0x8e, 0xae, 0x1e, 0x41, 0x56, 0x89, 0xf5, 0x16, 0x80, 0xad, 0xde, 0xed, 0x47, 0x97, 0xeb,
	0x35, 0xad, 0x70, 0x1a, 0x65, 0xb8, 0x51, 0x9a, 0xa0, 0x33, 0xca, 0xe9, 0xa8, 0x28, 0xea, 0x43,
	0xc7, 0x62, 0x46, 0x3e, 0x43, 0xb1, 0xe7, 0x31, 0x89, 0x99, 0xed, 0xbd, 0x30, 0xd8, 0xd9, 0x0b,
	0x83, 0x1f, 0x7b, 0x61, 0xf0, 0x7a, 0x3f, 0x1c, 0xd8, 0xd9, 0x0f, 0x07, 0xbe, 0xef, 0x87, 0x03,
	0x4f, 0xae, 0xa5, 0x4d, 0x77, 0x35, 0x9f, 0xd4, 0x52, 0xcc, 0x12, 0x55, 0xf8, 0x73, 0xdc, 0x66,
	0x06, 0xc5, 0x2f, 0xca, 0x25, 0x8b, 0xab, 0x70, 0x92, 0xad, 0xfc, 0x37, 0x63, 0xfc, 0x6f, 0x00,
	0x00, 0x00, 0xff, 0xff, 0xda, 0xc2, 0xc9, 0x3d, 0x19, 0x0b, 0x00, 0x00,
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4

// QueryClient is the client API for Query service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type QueryClient interface {
	// Fetch data/payload for a specific resource (without metadata)
	Resource(ctx context.Context, in *QueryResourceRequest, opts ...grpc.CallOption) (*QueryResourceResponse, error)
	// Fetch only metadata for a specific resource
	ResourceMetadata(ctx context.Context, in *QueryResourceMetadataRequest, opts ...grpc.CallOption) (*QueryResourceMetadataResponse, error)
	// Fetch latest version for a specific resource (without metadata)
	LatestResourceVersion(ctx context.Context, in *QueryLatestResourceVersionRequest, opts ...grpc.CallOption) (*QueryLatestResourceVersionResponse, error)
	// Fetch metadata of the latest version for a specific resource
	LatestResourceVersionMetadata(ctx context.Context, in *QueryLatestResourceVersionMetadataRequest, opts ...grpc.CallOption) (*QueryLatestResourceVersionMetadataResponse, error)
	// Fetch metadata for all resources in a collection
	CollectionResources(ctx context.Context, in *QueryCollectionResourcesRequest, opts ...grpc.CallOption) (*QueryCollectionResourcesResponse, error)
	// Params queries params of the resource module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
}

type queryClient struct {
	cc grpc1.ClientConn
}

func NewQueryClient(cc grpc1.ClientConn) QueryClient {
	return &queryClient{cc}
}

func (c *queryClient) Resource(ctx context.Context, in *QueryResourceRequest, opts ...grpc.CallOption) (*QueryResourceResponse, error) {
	out := new(QueryResourceResponse)
	err := c.cc.Invoke(ctx, "/cheqd.resource.v2.Query/Resource", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *queryClient) ResourceMetadata(ctx context.Context, in *QueryResourceMetadataRequest, opts ...grpc.CallOption) (*QueryResourceMetadataResponse, error) {
	out := new(QueryResourceMetadataResponse)
	err := c.cc.Invoke(ctx, "/cheqd.resource.v2.Query/ResourceMetadata", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *queryClient) LatestResourceVersion(ctx context.Context, in *QueryLatestResourceVersionRequest, opts ...grpc.CallOption) (*QueryLatestResourceVersionResponse, error) {
	out := new(QueryLatestResourceVersionResponse)
	err := c.cc.Invoke(ctx, "/cheqd.resource.v2.Query/LatestResourceVersion", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *queryClient) LatestResourceVersionMetadata(ctx context.Context, in *QueryLatestResourceVersionMetadataRequest, opts ...grpc.CallOption) (*QueryLatestResourceVersionMetadataResponse, error) {
	out := new(QueryLatestResourceVersionMetadataResponse)
	err := c.cc.Invoke(ctx, "/cheqd.resource.v2.Query/LatestResourceVersionMetadata", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *queryClient) CollectionResources(ctx context.Context, in *QueryCollectionResourcesRequest, opts ...grpc.CallOption) (*QueryCollectionResourcesResponse, error) {
	out := new(QueryCollectionResourcesResponse)
	err := c.cc.Invoke(ctx, "/cheqd.resource.v2.Query/CollectionResources", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
	out := new(QueryParamsResponse)
	err := c.cc.Invoke(ctx, "/cheqd.resource.v2.Query/Params", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// QueryServer is the server API for Query service.
type QueryServer interface {
	// Fetch data/payload for a specific resource (without metadata)
	Resource(context.Context, *QueryResourceRequest) (*QueryResourceResponse, error)
	// Fetch only metadata for a specific resource
	ResourceMetadata(context.Context, *QueryResourceMetadataRequest) (*QueryResourceMetadataResponse, error)
	// Fetch latest version for a specific resource (without metadata)
	LatestResourceVersion(context.Context, *QueryLatestResourceVersionRequest) (*QueryLatestResourceVersionResponse, error)
	// Fetch metadata of the latest version for a specific resource
	LatestResourceVersionMetadata(context.Context, *QueryLatestResourceVersionMetadataRequest) (*QueryLatestResourceVersionMetadataResponse, error)
	// Fetch metadata for all resources in a collection
	CollectionResources(context.Context, *QueryCollectionResourcesRequest) (*QueryCollectionResourcesResponse, error)
	// Params queries params of the resource module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
}

// UnimplementedQueryServer can be embedded to have forward compatible implementations.
type UnimplementedQueryServer struct {
}

func (*UnimplementedQueryServer) Resource(ctx context.Context, req *QueryResourceRequest) (*QueryResourceResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Resource not implemented")
}
func (*UnimplementedQueryServer) ResourceMetadata(ctx context.Context, req *QueryResourceMetadataRequest) (*QueryResourceMetadataResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ResourceMetadata not implemented")
}
func (*UnimplementedQueryServer) LatestResourceVersion(ctx context.Context, req *QueryLatestResourceVersionRequest) (*QueryLatestResourceVersionResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method LatestResourceVersion not implemented")
}
func (*UnimplementedQueryServer) LatestResourceVersionMetadata(ctx context.Context, req *QueryLatestResourceVersionMetadataRequest) (*QueryLatestResourceVersionMetadataResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method LatestResourceVersionMetadata not implemented")
}
func (*UnimplementedQueryServer) CollectionResources(ctx context.Context, req *QueryCollectionResourcesRequest) (*QueryCollectionResourcesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CollectionResources not implemented")
}
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
}

func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
	s.RegisterService(&_Query_serviceDesc, srv)
}

func _Query_Resource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryResourceRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(QueryServer).Resource(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/cheqd.resource.v2.Query/Resource",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(QueryServer).Resource(ctx, req.(*QueryResourceRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Query_ResourceMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryResourceMetadataRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(QueryServer).ResourceMetadata(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/cheqd.resource.v2.Query/ResourceMetadata",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(QueryServer).ResourceMetadata(ctx, req.(*QueryResourceMetadataRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Query_LatestResourceVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryLatestResourceVersionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(QueryServer).LatestResourceVersion(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/cheqd.resource.v2.Query/LatestResourceVersion",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(QueryServer).LatestResourceVersion(ctx, req.(*QueryLatestResourceVersionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Query_LatestResourceVersionMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryLatestResourceVersionMetadataRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(QueryServer).LatestResourceVersionMetadata(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/cheqd.resource.v2.Query/LatestResourceVersionMetadata",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(QueryServer).LatestResourceVersionMetadata(ctx, req.(*QueryLatestResourceVersionMetadataRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Query_CollectionResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryCollectionResourcesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(QueryServer).CollectionResources(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/cheqd.resource.v2.Query/CollectionResources",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(QueryServer).CollectionResources(ctx, req.(*QueryCollectionResourcesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryParamsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(QueryServer).Params(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/cheqd.resource.v2.Query/Params",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _Query_serviceDesc = grpc.ServiceDesc{
	ServiceName: "cheqd.resource.v2.Query",
	HandlerType: (*QueryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Resource",
			Handler:    _Query_Resource_Handler,
		},
		{
			MethodName: "ResourceMetadata",
			Handler:    _Query_ResourceMetadata_Handler,
		},
		{
			MethodName: "LatestResourceVersion",
			Handler:    _Query_LatestResourceVersion_Handler,
		},
		{
			MethodName: "LatestResourceVersionMetadata",
			Handler:    _Query_LatestResourceVersionMetadata_Handler,
		},
		{
			MethodName: "CollectionResources",
			Handler:    _Query_CollectionResources_Handler,
		},
		{
			MethodName: "Params",
			Handler:    _Query_Params_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "cheqd/resource/v2/query.proto",
}

func (m *QueryResourceRequest) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryResourceRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryResourceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Id) > 0 {
		i -= len(m.Id)
		copy(dAtA[i:], m.Id)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.Id)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.CollectionId) > 0 {
		i -= len(m.CollectionId)
		copy(dAtA[i:], m.CollectionId)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.CollectionId)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *QueryResourceResponse) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryResourceResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryResourceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Resource != nil {
		{
			size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintQuery(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *QueryResourceMetadataRequest) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryResourceMetadataRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryResourceMetadataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Id) > 0 {
		i -= len(m.Id)
		copy(dAtA[i:], m.Id)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.Id)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.CollectionId) > 0 {
		i -= len(m.CollectionId)
		copy(dAtA[i:], m.CollectionId)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.CollectionId)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *QueryResourceMetadataResponse) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryResourceMetadataResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryResourceMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Resource != nil {
		{
			size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintQuery(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *QueryLatestResourceVersionRequest) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryLatestResourceVersionRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryLatestResourceVersionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.ResourceType) > 0 {
		i -= len(m.ResourceType)
		copy(dAtA[i:], m.ResourceType)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.ResourceType)))
		i--
		dAtA[i] = 0x1a
	}
	if len(m.Name) > 0 {
		i -= len(m.Name)
		copy(dAtA[i:], m.Name)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.Name)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.CollectionId) > 0 {
		i -= len(m.CollectionId)
		copy(dAtA[i:], m.CollectionId)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.CollectionId)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *QueryLatestResourceVersionResponse) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryLatestResourceVersionResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryLatestResourceVersionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Resource != nil {
		{
			size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintQuery(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *QueryLatestResourceVersionMetadataRequest) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryLatestResourceVersionMetadataRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryLatestResourceVersionMetadataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.ResourceType) > 0 {
		i -= len(m.ResourceType)
		copy(dAtA[i:], m.ResourceType)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.ResourceType)))
		i--
		dAtA[i] = 0x1a
	}
	if len(m.Name) > 0 {
		i -= len(m.Name)
		copy(dAtA[i:], m.Name)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.Name)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.CollectionId) > 0 {
		i -= len(m.CollectionId)
		copy(dAtA[i:], m.CollectionId)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.CollectionId)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *QueryLatestResourceVersionMetadataResponse) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryLatestResourceVersionMetadataResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryLatestResourceVersionMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Resource != nil {
		{
			size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintQuery(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *QueryCollectionResourcesRequest) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryCollectionResourcesRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryCollectionResourcesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Pagination != nil {
		{
			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintQuery(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x12
	}
	if len(m.CollectionId) > 0 {
		i -= len(m.CollectionId)
		copy(dAtA[i:], m.CollectionId)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.CollectionId)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *QueryCollectionResourcesResponse) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryCollectionResourcesResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryCollectionResourcesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Pagination != nil {
		{
			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintQuery(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x12
	}
	if len(m.Resources) > 0 {
		for iNdEx := len(m.Resources) - 1; iNdEx >= 0; iNdEx-- {
			{
				size, err := m.Resources[iNdEx].MarshalToSizedBuffer(dAtA[:i])
				if err != nil {
					return 0, err
				}
				i -= size
				i = encodeVarintQuery(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0xa
		}
	}
	return len(dAtA) - i, nil
}

func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	return len(dAtA) - i, nil
}

func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	{
		size, err := m.Params.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintQuery(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0xa
	return len(dAtA) - i, nil
}

func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
	offset -= sovQuery(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *QueryResourceRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.CollectionId)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	l = len(m.Id)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

func (m *QueryResourceResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Resource != nil {
		l = m.Resource.Size()
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

func (m *QueryResourceMetadataRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.CollectionId)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	l = len(m.Id)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

func (m *QueryResourceMetadataResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Resource != nil {
		l = m.Resource.Size()
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

func (m *QueryLatestResourceVersionRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.CollectionId)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	l = len(m.Name)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	l = len(m.ResourceType)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

func (m *QueryLatestResourceVersionResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Resource != nil {
		l = m.Resource.Size()
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

func (m *QueryLatestResourceVersionMetadataRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.CollectionId)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	l = len(m.Name)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	l = len(m.ResourceType)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

func (m *QueryLatestResourceVersionMetadataResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Resource != nil {
		l = m.Resource.Size()
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

func (m *QueryCollectionResourcesRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.CollectionId)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	if m.Pagination != nil {
		l = m.Pagination.Size()
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

func (m *QueryCollectionResourcesResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if len(m.Resources) > 0 {
		for _, e := range m.Resources {
			l = e.Size()
			n += 1 + l + sovQuery(uint64(l))
		}
	}
	if m.Pagination != nil {
		l = m.Pagination.Size()
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

func (m *QueryParamsRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	return n
}

func (m *QueryParamsResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = m.Params.Size()
	n += 1 + l + sovQuery(uint64(l))
	return n
}

func sovQuery(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozQuery(x uint64) (n int) {
	return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *QueryResourceRequest) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryResourceRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryResourceRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field CollectionId", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.CollectionId = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Id = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryResourceResponse) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryResourceResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryResourceResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Resource == nil {
				m.Resource = &ResourceWithMetadata{}
			}
			if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryResourceMetadataRequest) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryResourceMetadataRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryResourceMetadataRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field CollectionId", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.CollectionId = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Id = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryResourceMetadataResponse) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryResourceMetadataResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryResourceMetadataResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Resource == nil {
				m.Resource = &Metadata{}
			}
			if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryLatestResourceVersionRequest) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryLatestResourceVersionRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryLatestResourceVersionRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field CollectionId", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.CollectionId = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Name = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ResourceType", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ResourceType = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryLatestResourceVersionResponse) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryLatestResourceVersionResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryLatestResourceVersionResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Resource == nil {
				m.Resource = &ResourceWithMetadata{}
			}
			if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryLatestResourceVersionMetadataRequest) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryLatestResourceVersionMetadataRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryLatestResourceVersionMetadataRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field CollectionId", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.CollectionId = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Name = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ResourceType", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ResourceType = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryLatestResourceVersionMetadataResponse) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryLatestResourceVersionMetadataResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryLatestResourceVersionMetadataResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Resource == nil {
				m.Resource = &Metadata{}
			}
			if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryCollectionResourcesRequest) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryCollectionResourcesRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryCollectionResourcesRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field CollectionId", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.CollectionId = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Pagination == nil {
				m.Pagination = &query.PageRequest{}
			}
			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryCollectionResourcesResponse) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryCollectionResourcesResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryCollectionResourcesResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Resources = append(m.Resources, &Metadata{})
			if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Pagination == nil {
				m.Pagination = &query.PageResponse{}
			}
			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipQuery(dAtA []byte) (n int, err error) {
	l := len(dAtA)
	iNdEx := 0
	depth := 0
	for iNdEx < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return 0, ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return 0, io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		wireType := int(wire & 0x7)
		switch wireType {
		case 0:
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				iNdEx++
				if dAtA[iNdEx-1] < 0x80 {
					break
				}
			}
		case 1:
			iNdEx += 8
		case 2:
			var length int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				length |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if length < 0 {
				return 0, ErrInvalidLengthQuery
			}
			iNdEx += length
		case 3:
			depth++
		case 4:
			if depth == 0 {
				return 0, ErrUnexpectedEndOfGroupQuery
			}
			depth--
		case 5:
			iNdEx += 4
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
		if iNdEx < 0 {
			return 0, ErrInvalidLengthQuery
		}
		if depth == 0 {
			return iNdEx, nil
		}
	}
	return 0, io.ErrUnexpectedEOF
}

var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
