// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: ibc/core/client/v2/query.proto

package types

import (
	context "context"
	fmt "fmt"
	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

// QueryCounterpartyInfoRequest is the request type for the Query/CounterpartyInfo RPC
// method
type QueryCounterpartyInfoRequest struct {
	// client state unique identifier
	ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
}

func (m *QueryCounterpartyInfoRequest) Reset()         { *m = QueryCounterpartyInfoRequest{} }
func (m *QueryCounterpartyInfoRequest) String() string { return proto.CompactTextString(m) }
func (*QueryCounterpartyInfoRequest) ProtoMessage()    {}
func (*QueryCounterpartyInfoRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_ce2f0dd58f99aaa6, []int{0}
}
func (m *QueryCounterpartyInfoRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryCounterpartyInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryCounterpartyInfoRequest.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 *QueryCounterpartyInfoRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryCounterpartyInfoRequest.Merge(m, src)
}
func (m *QueryCounterpartyInfoRequest) XXX_Size() int {
	return m.Size()
}
func (m *QueryCounterpartyInfoRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryCounterpartyInfoRequest.DiscardUnknown(m)
}

var xxx_messageInfo_QueryCounterpartyInfoRequest proto.InternalMessageInfo

func (m *QueryCounterpartyInfoRequest) GetClientId() string {
	if m != nil {
		return m.ClientId
	}
	return ""
}

// QueryCounterpartyInfoResponse is the response type for the
// Query/CounterpartyInfo RPC method.
type QueryCounterpartyInfoResponse struct {
	CounterpartyInfo *CounterpartyInfo `protobuf:"bytes,1,opt,name=counterparty_info,json=counterpartyInfo,proto3" json:"counterparty_info,omitempty"`
}

func (m *QueryCounterpartyInfoResponse) Reset()         { *m = QueryCounterpartyInfoResponse{} }
func (m *QueryCounterpartyInfoResponse) String() string { return proto.CompactTextString(m) }
func (*QueryCounterpartyInfoResponse) ProtoMessage()    {}
func (*QueryCounterpartyInfoResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_ce2f0dd58f99aaa6, []int{1}
}
func (m *QueryCounterpartyInfoResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryCounterpartyInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryCounterpartyInfoResponse.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 *QueryCounterpartyInfoResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryCounterpartyInfoResponse.Merge(m, src)
}
func (m *QueryCounterpartyInfoResponse) XXX_Size() int {
	return m.Size()
}
func (m *QueryCounterpartyInfoResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryCounterpartyInfoResponse.DiscardUnknown(m)
}

var xxx_messageInfo_QueryCounterpartyInfoResponse proto.InternalMessageInfo

func (m *QueryCounterpartyInfoResponse) GetCounterpartyInfo() *CounterpartyInfo {
	if m != nil {
		return m.CounterpartyInfo
	}
	return nil
}

// QueryConfigRequest is the request type for the Query/Config RPC method
type QueryConfigRequest struct {
	// client state unique identifier
	ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
}

func (m *QueryConfigRequest) Reset()         { *m = QueryConfigRequest{} }
func (m *QueryConfigRequest) String() string { return proto.CompactTextString(m) }
func (*QueryConfigRequest) ProtoMessage()    {}
func (*QueryConfigRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_ce2f0dd58f99aaa6, []int{2}
}
func (m *QueryConfigRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryConfigRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryConfigRequest.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 *QueryConfigRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryConfigRequest.Merge(m, src)
}
func (m *QueryConfigRequest) XXX_Size() int {
	return m.Size()
}
func (m *QueryConfigRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryConfigRequest.DiscardUnknown(m)
}

var xxx_messageInfo_QueryConfigRequest proto.InternalMessageInfo

func (m *QueryConfigRequest) GetClientId() string {
	if m != nil {
		return m.ClientId
	}
	return ""
}

// QueryConfigResponse is the response type for the Query/Config RPC method
type QueryConfigResponse struct {
	Config *Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
}

func (m *QueryConfigResponse) Reset()         { *m = QueryConfigResponse{} }
func (m *QueryConfigResponse) String() string { return proto.CompactTextString(m) }
func (*QueryConfigResponse) ProtoMessage()    {}
func (*QueryConfigResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_ce2f0dd58f99aaa6, []int{3}
}
func (m *QueryConfigResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryConfigResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryConfigResponse.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 *QueryConfigResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryConfigResponse.Merge(m, src)
}
func (m *QueryConfigResponse) XXX_Size() int {
	return m.Size()
}
func (m *QueryConfigResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryConfigResponse.DiscardUnknown(m)
}

var xxx_messageInfo_QueryConfigResponse proto.InternalMessageInfo

func (m *QueryConfigResponse) GetConfig() *Config {
	if m != nil {
		return m.Config
	}
	return nil
}

func init() {
	proto.RegisterType((*QueryCounterpartyInfoRequest)(nil), "ibc.core.client.v2.QueryCounterpartyInfoRequest")
	proto.RegisterType((*QueryCounterpartyInfoResponse)(nil), "ibc.core.client.v2.QueryCounterpartyInfoResponse")
	proto.RegisterType((*QueryConfigRequest)(nil), "ibc.core.client.v2.QueryConfigRequest")
	proto.RegisterType((*QueryConfigResponse)(nil), "ibc.core.client.v2.QueryConfigResponse")
}

func init() { proto.RegisterFile("ibc/core/client/v2/query.proto", fileDescriptor_ce2f0dd58f99aaa6) }

var fileDescriptor_ce2f0dd58f99aaa6 = []byte{
	// 396 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x31, 0xaf, 0x12, 0x41,
	0x10, 0xc7, 0x39, 0x12, 0x89, 0xac, 0x0d, 0xae, 0x8d, 0x39, 0xf1, 0x34, 0x17, 0x45, 0x1a, 0x76,
	0xb9, 0xa3, 0x32, 0x5a, 0x69, 0x45, 0x09, 0x85, 0x85, 0x0d, 0xb9, 0x5b, 0x96, 0x73, 0x13, 0xd8,
	0x39, 0x6e, 0xf7, 0x48, 0x88, 0xb1, 0xb1, 0xb3, 0x33, 0xf1, 0x9b, 0xf8, 0x29, 0x28, 0x49, 0x6c,
	0x2c, 0x0d, 0xf8, 0x41, 0x5e, 0xee, 0xf6, 0xf2, 0xde, 0x3d, 0x38, 0xe0, 0xbd, 0x76, 0x66, 0xfe,
	0xff, 0xf9, 0xcd, 0x3f, 0x83, 0x1c, 0x11, 0x32, 0xca, 0x20, 0xe1, 0x94, 0xcd, 0x05, 0x97, 0x9a,
	0xae, 0x7c, 0xba, 0x4c, 0x79, 0xb2, 0x26, 0x71, 0x02, 0x1a, 0x30, 0x16, 0x21, 0x23, 0x59, 0x9f,
	0x98, 0x3e, 0x59, 0xf9, 0xf6, 0xeb, 0x0a, 0x0d, 0x83, 0x54, 0x6a, 0x9e, 0xc4, 0x41, 0xa2, 0x0b,
	0xa9, 0xfd, 0xa2, 0x72, 0x4c, 0xce, 0x44, 0x54, 0x0c, 0xb4, 0x23, 0x80, 0x68, 0xce, 0x69, 0x10,
	0x0b, 0x1a, 0x48, 0x09, 0x3a, 0xd0, 0x02, 0xa4, 0x32, 0x5d, 0xf7, 0x1d, 0x6a, 0x8f, 0x32, 0x90,
	0x8f, 0x25, 0xe7, 0xa1, 0x9c, 0xc1, 0x98, 0x2f, 0x53, 0xae, 0x34, 0x7e, 0x86, 0x9a, 0xc6, 0x77,
	0x22, 0xa6, 0x4f, 0xad, 0x97, 0x56, 0xb7, 0x39, 0x7e, 0x68, 0x0a, 0xc3, 0xa9, 0x9b, 0xa0, 0xe7,
	0x27, 0xc4, 0x2a, 0x06, 0xa9, 0x38, 0x1e, 0xa1, 0xc7, 0x65, 0xe4, 0x89, 0x90, 0x33, 0xc8, 0x5d,
	0x1e, 0xf9, 0xaf, 0xc8, 0xf1, 0xcd, 0xe4, 0xc8, 0xa8, 0xc5, 0x0e, 0x2a, 0xae, 0x87, 0x70, 0xb1,
	0x33, 0xbb, 0xf1, 0x4e, 0x98, 0x43, 0xf4, 0xe4, 0x96, 0xa4, 0x80, 0xf3, 0x51, 0xc3, 0x04, 0x55,
	0x10, 0xd9, 0xd5, 0x44, 0xb9, 0xa6, 0x98, 0xf4, 0x37, 0x75, 0xf4, 0x20, 0xf7, 0xc2, 0xbf, 0x2d,
	0xd4, 0x3a, 0xc4, 0xc5, 0xfd, 0x2a, 0x8b, 0x73, 0xf9, 0xda, 0xde, 0x3d, 0x14, 0x86, 0xdb, 0x7d,
	0xfb, 0xfd, 0xcf, 0xff, 0x5f, 0xf5, 0x01, 0xf6, 0xe8, 0x85, 0x0f, 0xc9, 0xe3, 0xa6, 0x5f, 0xaf,
	0x83, 0xf9, 0x86, 0x7f, 0x58, 0xa8, 0x61, 0x2e, 0xc2, 0x9d, 0x33, 0x8b, 0x4b, 0xc9, 0xda, 0x6f,
	0x2e, 0xce, 0x15, 0x58, 0x24, 0xc7, 0xea, 0xe2, 0x0e, 0x3d, 0xf9, 0x91, 0x65, 0x96, 0x0f, 0x9f,
	0x36, 0x3b, 0xc7, 0xda, 0xee, 0x1c, 0xeb, 0xdf, 0xce, 0xb1, 0x7e, 0xee, 0x9d, 0xda, 0x76, 0xef,
	0xd4, 0xfe, 0xee, 0x9d, 0xda, 0xe7, 0xf7, 0x91, 0xd0, 0x5f, 0xd2, 0x90, 0x30, 0x58, 0x50, 0x06,
	0x6a, 0x01, 0x2a, 0xb3, 0xec, 0x45, 0x40, 0x57, 0x5e, 0x9f, 0x2e, 0x60, 0x9a, 0xce, 0xb9, 0x32,
	0x1b, 0xfa, 0x7e, 0xef, 0x66, 0x89, 0x5e, 0xc7, 0x5c, 0x85, 0x8d, 0xfc, 0xb1, 0x07, 0x57, 0x01,
	0x00, 0x00, 0xff, 0xff, 0xc6, 0x3b, 0x7a, 0x22, 0x74, 0x03, 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 {
	// CounterpartyInfo queries an IBC light counter party info.
	CounterpartyInfo(ctx context.Context, in *QueryCounterpartyInfoRequest, opts ...grpc.CallOption) (*QueryCounterpartyInfoResponse, error)
	// Config queries the IBC client v2 configuration for a given client.
	Config(ctx context.Context, in *QueryConfigRequest, opts ...grpc.CallOption) (*QueryConfigResponse, error)
}

type queryClient struct {
	cc grpc1.ClientConn
}

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

func (c *queryClient) CounterpartyInfo(ctx context.Context, in *QueryCounterpartyInfoRequest, opts ...grpc.CallOption) (*QueryCounterpartyInfoResponse, error) {
	out := new(QueryCounterpartyInfoResponse)
	err := c.cc.Invoke(ctx, "/ibc.core.client.v2.Query/CounterpartyInfo", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *queryClient) Config(ctx context.Context, in *QueryConfigRequest, opts ...grpc.CallOption) (*QueryConfigResponse, error) {
	out := new(QueryConfigResponse)
	err := c.cc.Invoke(ctx, "/ibc.core.client.v2.Query/Config", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// QueryServer is the server API for Query service.
type QueryServer interface {
	// CounterpartyInfo queries an IBC light counter party info.
	CounterpartyInfo(context.Context, *QueryCounterpartyInfoRequest) (*QueryCounterpartyInfoResponse, error)
	// Config queries the IBC client v2 configuration for a given client.
	Config(context.Context, *QueryConfigRequest) (*QueryConfigResponse, error)
}

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

func (*UnimplementedQueryServer) CounterpartyInfo(ctx context.Context, req *QueryCounterpartyInfoRequest) (*QueryCounterpartyInfoResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CounterpartyInfo not implemented")
}
func (*UnimplementedQueryServer) Config(ctx context.Context, req *QueryConfigRequest) (*QueryConfigResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Config not implemented")
}

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

func _Query_CounterpartyInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryCounterpartyInfoRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(QueryServer).CounterpartyInfo(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ibc.core.client.v2.Query/CounterpartyInfo",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(QueryServer).CounterpartyInfo(ctx, req.(*QueryCounterpartyInfoRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Query_Config_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryConfigRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(QueryServer).Config(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ibc.core.client.v2.Query/Config",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(QueryServer).Config(ctx, req.(*QueryConfigRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _Query_serviceDesc = grpc.ServiceDesc{
	ServiceName: "ibc.core.client.v2.Query",
	HandlerType: (*QueryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CounterpartyInfo",
			Handler:    _Query_CounterpartyInfo_Handler,
		},
		{
			MethodName: "Config",
			Handler:    _Query_Config_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "ibc/core/client/v2/query.proto",
}

func (m *QueryCounterpartyInfoRequest) 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 *QueryCounterpartyInfoRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *QueryCounterpartyInfoResponse) 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 *QueryCounterpartyInfoResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryCounterpartyInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.CounterpartyInfo != nil {
		{
			size, err := m.CounterpartyInfo.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 *QueryConfigRequest) 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 *QueryConfigRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *QueryConfigResponse) 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 *QueryConfigResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryConfigResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Config != nil {
		{
			size, err := m.Config.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 *QueryCounterpartyInfoRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.ClientId)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

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

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

func (m *QueryConfigResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Config != nil {
		l = m.Config.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 *QueryCounterpartyInfoRequest) 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: QueryCounterpartyInfoRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryCounterpartyInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ClientId", 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.ClientId = 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 *QueryCounterpartyInfoResponse) 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: QueryCounterpartyInfoResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryCounterpartyInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field CounterpartyInfo", 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.CounterpartyInfo == nil {
				m.CounterpartyInfo = &CounterpartyInfo{}
			}
			if err := m.CounterpartyInfo.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 *QueryConfigRequest) 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: QueryConfigRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryConfigRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ClientId", 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.ClientId = 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 *QueryConfigResponse) 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: QueryConfigResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryConfigResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Config", 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.Config == nil {
				m.Config = &Config{}
			}
			if err := m.Config.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")
)
