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

package types

import (
	context "context"
	fmt "fmt"
	types1 "git.cw.tr/mukan-network/mukan-sdk/codec/types"
	query "git.cw.tr/mukan-network/mukan-sdk/types/query"
	_ "github.com/cosmos/gogoproto/gogoproto"
	grpc1 "github.com/cosmos/gogoproto/grpc"
	proto "github.com/cosmos/gogoproto/proto"
	types "git.cw.tr/mukan-network/mukan-ibc/modules/core/02-client/types"
	_ "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

// QueryConnectionRequest is the request type for the Query/Connection RPC
// method
type QueryConnectionRequest struct {
	// connection unique identifier
	ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
}

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

var xxx_messageInfo_QueryConnectionRequest proto.InternalMessageInfo

func (m *QueryConnectionRequest) GetConnectionId() string {
	if m != nil {
		return m.ConnectionId
	}
	return ""
}

// QueryConnectionResponse is the response type for the Query/Connection RPC
// method. Besides the connection end, it includes a proof and the height from
// which the proof was retrieved.
type QueryConnectionResponse struct {
	// connection associated with the request identifier
	Connection *ConnectionEnd `protobuf:"bytes,1,opt,name=connection,proto3" json:"connection,omitempty"`
	// merkle proof of existence
	Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"`
	// height at which the proof was retrieved
	ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"`
}

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

var xxx_messageInfo_QueryConnectionResponse proto.InternalMessageInfo

func (m *QueryConnectionResponse) GetConnection() *ConnectionEnd {
	if m != nil {
		return m.Connection
	}
	return nil
}

func (m *QueryConnectionResponse) GetProof() []byte {
	if m != nil {
		return m.Proof
	}
	return nil
}

func (m *QueryConnectionResponse) GetProofHeight() types.Height {
	if m != nil {
		return m.ProofHeight
	}
	return types.Height{}
}

// QueryConnectionsRequest is the request type for the Query/Connections RPC
// method
type QueryConnectionsRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

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

var xxx_messageInfo_QueryConnectionsRequest proto.InternalMessageInfo

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

// QueryConnectionsResponse is the response type for the Query/Connections RPC
// method.
type QueryConnectionsResponse struct {
	// list of stored connections of the chain.
	Connections []*IdentifiedConnection `protobuf:"bytes,1,rep,name=connections,proto3" json:"connections,omitempty"`
	// pagination response
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
	// query block height
	Height types.Height `protobuf:"bytes,3,opt,name=height,proto3" json:"height"`
}

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

var xxx_messageInfo_QueryConnectionsResponse proto.InternalMessageInfo

func (m *QueryConnectionsResponse) GetConnections() []*IdentifiedConnection {
	if m != nil {
		return m.Connections
	}
	return nil
}

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

func (m *QueryConnectionsResponse) GetHeight() types.Height {
	if m != nil {
		return m.Height
	}
	return types.Height{}
}

// QueryClientConnectionsRequest is the request type for the
// Query/ClientConnections RPC method
type QueryClientConnectionsRequest struct {
	// client identifier associated with a connection
	ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
}

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

var xxx_messageInfo_QueryClientConnectionsRequest proto.InternalMessageInfo

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

// QueryClientConnectionsResponse is the response type for the
// Query/ClientConnections RPC method
type QueryClientConnectionsResponse struct {
	// slice of all the connection paths associated with a client.
	ConnectionPaths []string `protobuf:"bytes,1,rep,name=connection_paths,json=connectionPaths,proto3" json:"connection_paths,omitempty"`
	// merkle proof of existence
	Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"`
	// height at which the proof was generated
	ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"`
}

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

var xxx_messageInfo_QueryClientConnectionsResponse proto.InternalMessageInfo

func (m *QueryClientConnectionsResponse) GetConnectionPaths() []string {
	if m != nil {
		return m.ConnectionPaths
	}
	return nil
}

func (m *QueryClientConnectionsResponse) GetProof() []byte {
	if m != nil {
		return m.Proof
	}
	return nil
}

func (m *QueryClientConnectionsResponse) GetProofHeight() types.Height {
	if m != nil {
		return m.ProofHeight
	}
	return types.Height{}
}

// QueryConnectionClientStateRequest is the request type for the
// Query/ConnectionClientState RPC method
type QueryConnectionClientStateRequest struct {
	// connection identifier
	ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
}

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

var xxx_messageInfo_QueryConnectionClientStateRequest proto.InternalMessageInfo

func (m *QueryConnectionClientStateRequest) GetConnectionId() string {
	if m != nil {
		return m.ConnectionId
	}
	return ""
}

// QueryConnectionClientStateResponse is the response type for the
// Query/ConnectionClientState RPC method
type QueryConnectionClientStateResponse struct {
	// client state associated with the channel
	IdentifiedClientState *types.IdentifiedClientState `protobuf:"bytes,1,opt,name=identified_client_state,json=identifiedClientState,proto3" json:"identified_client_state,omitempty"`
	// merkle proof of existence
	Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"`
	// height at which the proof was retrieved
	ProofHeight types.Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"`
}

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

var xxx_messageInfo_QueryConnectionClientStateResponse proto.InternalMessageInfo

func (m *QueryConnectionClientStateResponse) GetIdentifiedClientState() *types.IdentifiedClientState {
	if m != nil {
		return m.IdentifiedClientState
	}
	return nil
}

func (m *QueryConnectionClientStateResponse) GetProof() []byte {
	if m != nil {
		return m.Proof
	}
	return nil
}

func (m *QueryConnectionClientStateResponse) GetProofHeight() types.Height {
	if m != nil {
		return m.ProofHeight
	}
	return types.Height{}
}

// QueryConnectionConsensusStateRequest is the request type for the
// Query/ConnectionConsensusState RPC method
type QueryConnectionConsensusStateRequest struct {
	// connection identifier
	ConnectionId   string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
	RevisionNumber uint64 `protobuf:"varint,2,opt,name=revision_number,json=revisionNumber,proto3" json:"revision_number,omitempty"`
	RevisionHeight uint64 `protobuf:"varint,3,opt,name=revision_height,json=revisionHeight,proto3" json:"revision_height,omitempty"`
}

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

var xxx_messageInfo_QueryConnectionConsensusStateRequest proto.InternalMessageInfo

func (m *QueryConnectionConsensusStateRequest) GetConnectionId() string {
	if m != nil {
		return m.ConnectionId
	}
	return ""
}

func (m *QueryConnectionConsensusStateRequest) GetRevisionNumber() uint64 {
	if m != nil {
		return m.RevisionNumber
	}
	return 0
}

func (m *QueryConnectionConsensusStateRequest) GetRevisionHeight() uint64 {
	if m != nil {
		return m.RevisionHeight
	}
	return 0
}

// QueryConnectionConsensusStateResponse is the response type for the
// Query/ConnectionConsensusState RPC method
type QueryConnectionConsensusStateResponse struct {
	// consensus state associated with the channel
	ConsensusState *types1.Any `protobuf:"bytes,1,opt,name=consensus_state,json=consensusState,proto3" json:"consensus_state,omitempty"`
	// client ID associated with the consensus state
	ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	// merkle proof of existence
	Proof []byte `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"`
	// height at which the proof was retrieved
	ProofHeight types.Height `protobuf:"bytes,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"`
}

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

var xxx_messageInfo_QueryConnectionConsensusStateResponse proto.InternalMessageInfo

func (m *QueryConnectionConsensusStateResponse) GetConsensusState() *types1.Any {
	if m != nil {
		return m.ConsensusState
	}
	return nil
}

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

func (m *QueryConnectionConsensusStateResponse) GetProof() []byte {
	if m != nil {
		return m.Proof
	}
	return nil
}

func (m *QueryConnectionConsensusStateResponse) GetProofHeight() types.Height {
	if m != nil {
		return m.ProofHeight
	}
	return types.Height{}
}

// QueryConnectionParamsRequest is the request type for the Query/ConnectionParams RPC method.
type QueryConnectionParamsRequest struct {
}

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

var xxx_messageInfo_QueryConnectionParamsRequest proto.InternalMessageInfo

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

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

var xxx_messageInfo_QueryConnectionParamsResponse proto.InternalMessageInfo

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

func init() {
	proto.RegisterType((*QueryConnectionRequest)(nil), "ibc.core.connection.v1.QueryConnectionRequest")
	proto.RegisterType((*QueryConnectionResponse)(nil), "ibc.core.connection.v1.QueryConnectionResponse")
	proto.RegisterType((*QueryConnectionsRequest)(nil), "ibc.core.connection.v1.QueryConnectionsRequest")
	proto.RegisterType((*QueryConnectionsResponse)(nil), "ibc.core.connection.v1.QueryConnectionsResponse")
	proto.RegisterType((*QueryClientConnectionsRequest)(nil), "ibc.core.connection.v1.QueryClientConnectionsRequest")
	proto.RegisterType((*QueryClientConnectionsResponse)(nil), "ibc.core.connection.v1.QueryClientConnectionsResponse")
	proto.RegisterType((*QueryConnectionClientStateRequest)(nil), "ibc.core.connection.v1.QueryConnectionClientStateRequest")
	proto.RegisterType((*QueryConnectionClientStateResponse)(nil), "ibc.core.connection.v1.QueryConnectionClientStateResponse")
	proto.RegisterType((*QueryConnectionConsensusStateRequest)(nil), "ibc.core.connection.v1.QueryConnectionConsensusStateRequest")
	proto.RegisterType((*QueryConnectionConsensusStateResponse)(nil), "ibc.core.connection.v1.QueryConnectionConsensusStateResponse")
	proto.RegisterType((*QueryConnectionParamsRequest)(nil), "ibc.core.connection.v1.QueryConnectionParamsRequest")
	proto.RegisterType((*QueryConnectionParamsResponse)(nil), "ibc.core.connection.v1.QueryConnectionParamsResponse")
}

func init() {
	proto.RegisterFile("ibc/core/connection/v1/query.proto", fileDescriptor_cd8d529f8c7cd06b)
}

var fileDescriptor_cd8d529f8c7cd06b = []byte{
	// 935 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x41, 0x6f, 0x1b, 0x45,
	0x14, 0xce, 0x38, 0x69, 0x44, 0x9e, 0x43, 0x5b, 0x46, 0x69, 0x6b, 0x96, 0xb2, 0x0d, 0x5b, 0xd2,
	0xa4, 0x40, 0x67, 0xe2, 0x84, 0x44, 0x05, 0x1a, 0x04, 0xa9, 0x0a, 0xc9, 0xa5, 0x0a, 0xcb, 0xa1,
	0x12, 0x97, 0x68, 0x77, 0x3d, 0xd9, 0xac, 0x14, 0xef, 0xb8, 0x9e, 0xb5, 0x51, 0x54, 0x45, 0x48,
	0xfc, 0x02, 0x24, 0x2e, 0x5c, 0x7a, 0x05, 0x89, 0x7f, 0x80, 0xb8, 0x71, 0xea, 0xb1, 0x12, 0x97,
	0x9e, 0x2a, 0xe4, 0x70, 0xe5, 0x3f, 0xa0, 0x9d, 0x99, 0xed, 0xce, 0xda, 0xde, 0xc4, 0xb6, 0xd4,
	0xdb, 0xfa, 0xcd, 0x7b, 0x6f, 0xbe, 0xef, 0x7b, 0x6f, 0xbf, 0x35, 0x38, 0x91, 0x1f, 0xd0, 0x80,
	0xb7, 0x19, 0x0d, 0x78, 0x1c, 0xb3, 0x20, 0x89, 0x78, 0x4c, 0xbb, 0x75, 0xfa, 0xb8, 0xc3, 0xda,
	0xc7, 0xa4, 0xd5, 0xe6, 0x09, 0xc7, 0x57, 0x23, 0x3f, 0x20, 0x69, 0x0e, 0xc9, 0x73, 0x48, 0xb7,
	0x6e, 0x2d, 0x84, 0x3c, 0xe4, 0x32, 0x85, 0xa6, 0x4f, 0x2a, 0xdb, 0xfa, 0x20, 0xe0, 0xa2, 0xc9,
	0x05, 0xf5, 0x3d, 0xc1, 0x54, 0x1b, 0xda, 0xad, 0xfb, 0x2c, 0xf1, 0xea, 0xb4, 0xe5, 0x85, 0x51,
	0xec, 0xc9, 0x72, 0x95, 0x7b, 0x23, 0xbf, 0xfd, 0x28, 0x62, 0x71, 0x92, 0xde, 0xac, 0x9e, 0x74,
	0xc2, 0x72, 0x09, 0x3c, 0x03, 0x88, 0x4a, 0xbc, 0x1e, 0x72, 0x1e, 0x1e, 0x31, 0xea, 0xb5, 0x22,
	0xea, 0xc5, 0x31, 0x4f, 0xe4, 0x35, 0x42, 0x9f, 0xbe, 0xad, 0x4f, 0xe5, 0x2f, 0xbf, 0x73, 0x40,
	0xbd, 0x58, 0x93, 0x73, 0xb6, 0xe0, 0xea, 0x37, 0x29, 0xc8, 0xfb, 0xaf, 0x3a, 0xba, 0xec, 0x71,
	0x87, 0x89, 0x04, 0xdf, 0x84, 0x37, 0xf3, 0x6b, 0xf6, 0xa3, 0x46, 0x0d, 0x2d, 0xa2, 0x95, 0x39,
	0x77, 0x3e, 0x0f, 0xee, 0x36, 0x9c, 0x3f, 0x11, 0x5c, 0x1b, 0xa8, 0x17, 0x2d, 0x1e, 0x0b, 0x86,
	0x1f, 0x00, 0xe4, 0xb9, 0xb2, 0xba, 0xba, 0xb6, 0x44, 0x86, 0x8b, 0x49, 0xf2, 0xfa, 0x07, 0x71,
	0xc3, 0x35, 0x0a, 0xf1, 0x02, 0x5c, 0x68, 0xb5, 0x39, 0x3f, 0xa8, 0x55, 0x16, 0xd1, 0xca, 0xbc,
	0xab, 0x7e, 0xe0, 0xfb, 0x30, 0x2f, 0x1f, 0xf6, 0x0f, 0x59, 0x14, 0x1e, 0x26, 0xb5, 0x69, 0xd9,
	0xde, 0x32, 0xda, 0x2b, 0x1d, 0xbb, 0x75, 0xb2, 0x23, 0x33, 0xb6, 0x67, 0x9e, 0xbd, 0xbc, 0x31,
	0xe5, 0x56, 0x65, 0x95, 0x0a, 0x39, 0xde, 0x00, 0x78, 0x91, 0xb1, 0xff, 0x0a, 0x20, 0x1f, 0x97,
	0x06, 0x7f, 0x8b, 0xa8, 0xd9, 0x92, 0x74, 0xb6, 0x44, 0xad, 0x88, 0x9e, 0x2d, 0xd9, 0xf3, 0x42,
	0xa6, 0x6b, 0x5d, 0xa3, 0xd2, 0xf9, 0x0f, 0x41, 0x6d, 0xf0, 0x0e, 0xad, 0xd0, 0x43, 0xa8, 0xe6,
	0x44, 0x45, 0x0d, 0x2d, 0x4e, 0xaf, 0x54, 0xd7, 0x3e, 0x2a, 0x93, 0x68, 0xb7, 0xc1, 0xe2, 0x24,
	0x3a, 0x88, 0x58, 0xc3, 0x10, 0xdb, 0x6c, 0x80, 0xbf, 0x2e, 0x80, 0xae, 0x48, 0xd0, 0xcb, 0xe7,
	0x82, 0x56, 0x60, 0x4c, 0xd4, 0xf8, 0x2e, 0xcc, 0x8e, 0xa9, 0xab, 0xce, 0x77, 0xee, 0xc1, 0xbb,
	0x8a, 0xae, 0x4c, 0x1b, 0x22, 0xec, 0x3b, 0x30, 0xa7, 0x5a, 0xe4, 0x2b, 0xf5, 0x86, 0x0a, 0xec,
	0x36, 0x9c, 0x5f, 0x11, 0xd8, 0x65, 0xe5, 0x5a, 0xb3, 0xdb, 0x70, 0xd9, 0x58, 0xcb, 0x96, 0x97,
	0x1c, 0x2a, 0xe1, 0xe6, 0xdc, 0x4b, 0x79, 0x7c, 0x2f, 0x0d, 0xbf, 0xce, 0xcd, 0xd9, 0x81, 0xf7,
	0xfa, 0xa6, 0xaa, 0x10, 0x7f, 0x9b, 0x78, 0x09, 0x1b, 0xeb, 0x0d, 0xea, 0x21, 0x70, 0xce, 0x6a,
	0xa5, 0x69, 0x7b, 0x70, 0x2d, 0x7a, 0x35, 0xff, 0x7d, 0xad, 0xa0, 0x48, 0x53, 0xf4, 0x72, 0xde,
	0x1e, 0x46, 0xc0, 0x58, 0x19, 0xa3, 0xe7, 0x95, 0x68, 0x58, 0xf8, 0x75, 0xca, 0xf5, 0x14, 0xc1,
	0xfb, 0xfd, 0x24, 0x53, 0x5a, 0xb1, 0xe8, 0x88, 0xb1, 0x25, 0xc3, 0xcb, 0x70, 0xa9, 0xcd, 0xba,
	0x91, 0x48, 0x53, 0xe2, 0x4e, 0xd3, 0x67, 0x6d, 0x09, 0x79, 0xc6, 0xbd, 0x98, 0x85, 0x1f, 0xca,
	0x68, 0x21, 0xd1, 0x80, 0x6f, 0x24, 0x6a, 0x7c, 0x2f, 0x11, 0x2c, 0x9d, 0x83, 0x4f, 0xcf, 0x61,
	0x0b, 0xd2, 0x35, 0x53, 0x27, 0x05, 0xfd, 0x17, 0x88, 0x32, 0x59, 0x92, 0x99, 0x2c, 0xf9, 0x32,
	0x3e, 0x76, 0x2f, 0x06, 0x85, 0x36, 0xc5, 0xed, 0xaf, 0x14, 0xb7, 0x3f, 0x1f, 0xc0, 0xf4, 0x59,
	0x03, 0x98, 0x99, 0x64, 0x00, 0x36, 0x5c, 0xef, 0xe3, 0xb7, 0xe7, 0xb5, 0xbd, 0x66, 0xf6, 0x56,
	0x3a, 0x8f, 0xb2, 0xd7, 0x76, 0xe0, 0x5c, 0xf3, 0xde, 0x84, 0xd9, 0x96, 0x8c, 0x68, 0xba, 0x76,
	0x99, 0x4b, 0xe9, 0x3a, 0x9d, 0xbd, 0xf6, 0xc7, 0x1c, 0x5c, 0x90, 0x9d, 0xf1, 0xef, 0x08, 0x20,
	0x6f, 0x8f, 0x49, 0x59, 0x83, 0xe1, 0x9f, 0x23, 0x8b, 0x8e, 0x9c, 0xaf, 0x10, 0x3b, 0x9f, 0xfd,
	0xf8, 0xf7, 0xbf, 0x3f, 0x57, 0x36, 0xf0, 0x3a, 0x3d, 0xf7, 0x23, 0x2a, 0xe8, 0x93, 0xc2, 0xd6,
	0x9d, 0xe0, 0xa7, 0x08, 0xaa, 0x86, 0xfb, 0xe0, 0x51, 0x6f, 0xcf, 0x04, 0xb5, 0x56, 0x47, 0x2f,
	0xd0, 0x78, 0x3f, 0x94, 0x78, 0x97, 0xf0, 0xcd, 0x11, 0xf0, 0xe2, 0xbf, 0x10, 0xbc, 0x35, 0xe0,
	0x91, 0x78, 0xe3, 0xec, 0x4b, 0x4b, 0x2c, 0xd9, 0xda, 0x1c, 0xb7, 0x4c, 0x23, 0xfe, 0x5c, 0x22,
	0xbe, 0x8b, 0x37, 0x4b, 0x11, 0xab, 0x55, 0x2f, 0x0a, 0x9d, 0xad, 0xff, 0x09, 0x7e, 0x81, 0xe0,
	0xca, 0x50, 0xd7, 0xc3, 0x9f, 0x8c, 0xa8, 0xde, 0xa0, 0xe9, 0x5a, 0x9f, 0x4e, 0x52, 0xaa, 0x09,
	0xed, 0x48, 0x42, 0xdb, 0xf8, 0x8b, 0x09, 0x56, 0x86, 0x9a, 0x9e, 0x8c, 0x7f, 0xa9, 0x40, 0xad,
	0xcc, 0x4b, 0xf0, 0xbd, 0x51, 0x21, 0x0e, 0xb3, 0x48, 0x6b, 0x6b, 0xc2, 0x6a, 0xcd, 0xf1, 0x07,
	0xc9, 0xf1, 0x18, 0x7f, 0x3f, 0x11, 0xc7, 0xa2, 0xf5, 0xd1, 0xcc, 0x46, 0xe9, 0x93, 0x3e, 0x43,
	0x3e, 0xa1, 0xca, 0xad, 0x8c, 0x03, 0x15, 0x38, 0xc1, 0xbf, 0x21, 0xb8, 0xdc, 0x6f, 0x33, 0xf8,
	0xe3, 0x11, 0x49, 0x15, 0x5c, 0xcb, 0xda, 0x18, 0xb3, 0x4a, 0x4b, 0x70, 0x4b, 0x4a, 0xb0, 0x88,
	0xed, 0x32, 0x09, 0x94, 0x77, 0x6d, 0x3f, 0x7a, 0xd6, 0xb3, 0xd1, 0xf3, 0x9e, 0x8d, 0xfe, 0xe9,
	0xd9, 0xe8, 0xa7, 0x53, 0x7b, 0xea, 0xf9, 0xa9, 0x3d, 0xf5, 0xe2, 0xd4, 0x9e, 0xfa, 0x6e, 0x2b,
	0x8c, 0x92, 0xc3, 0x8e, 0x4f, 0x02, 0xde, 0xa4, 0xfa, 0xff, 0x7e, 0xe4, 0x07, 0x77, 0x42, 0x4e,
	0xbb, 0xf5, 0x55, 0xda, 0xe4, 0x8d, 0xce, 0x11, 0x13, 0xaa, 0xf3, 0xea, 0xfa, 0x1d, 0xa3, 0x79,
	0x72, 0xdc, 0x62, 0xc2, 0x9f, 0x95, 0xdf, 0x88, 0xf5, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x1f,
	0x4f, 0x5d, 0x8e, 0x7e, 0x0c, 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 {
	// Connection queries an IBC connection end.
	Connection(ctx context.Context, in *QueryConnectionRequest, opts ...grpc.CallOption) (*QueryConnectionResponse, error)
	// Connections queries all the IBC connections of a chain.
	Connections(ctx context.Context, in *QueryConnectionsRequest, opts ...grpc.CallOption) (*QueryConnectionsResponse, error)
	// ClientConnections queries the connection paths associated with a client
	// state.
	ClientConnections(ctx context.Context, in *QueryClientConnectionsRequest, opts ...grpc.CallOption) (*QueryClientConnectionsResponse, error)
	// ConnectionClientState queries the client state associated with the
	// connection.
	ConnectionClientState(ctx context.Context, in *QueryConnectionClientStateRequest, opts ...grpc.CallOption) (*QueryConnectionClientStateResponse, error)
	// ConnectionConsensusState queries the consensus state associated with the
	// connection.
	ConnectionConsensusState(ctx context.Context, in *QueryConnectionConsensusStateRequest, opts ...grpc.CallOption) (*QueryConnectionConsensusStateResponse, error)
	// ConnectionParams queries all parameters of the ibc connection submodule.
	ConnectionParams(ctx context.Context, in *QueryConnectionParamsRequest, opts ...grpc.CallOption) (*QueryConnectionParamsResponse, error)
}

type queryClient struct {
	cc grpc1.ClientConn
}

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

func (c *queryClient) Connection(ctx context.Context, in *QueryConnectionRequest, opts ...grpc.CallOption) (*QueryConnectionResponse, error) {
	out := new(QueryConnectionResponse)
	err := c.cc.Invoke(ctx, "/ibc.core.connection.v1.Query/Connection", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *queryClient) Connections(ctx context.Context, in *QueryConnectionsRequest, opts ...grpc.CallOption) (*QueryConnectionsResponse, error) {
	out := new(QueryConnectionsResponse)
	err := c.cc.Invoke(ctx, "/ibc.core.connection.v1.Query/Connections", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *queryClient) ClientConnections(ctx context.Context, in *QueryClientConnectionsRequest, opts ...grpc.CallOption) (*QueryClientConnectionsResponse, error) {
	out := new(QueryClientConnectionsResponse)
	err := c.cc.Invoke(ctx, "/ibc.core.connection.v1.Query/ClientConnections", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *queryClient) ConnectionClientState(ctx context.Context, in *QueryConnectionClientStateRequest, opts ...grpc.CallOption) (*QueryConnectionClientStateResponse, error) {
	out := new(QueryConnectionClientStateResponse)
	err := c.cc.Invoke(ctx, "/ibc.core.connection.v1.Query/ConnectionClientState", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *queryClient) ConnectionConsensusState(ctx context.Context, in *QueryConnectionConsensusStateRequest, opts ...grpc.CallOption) (*QueryConnectionConsensusStateResponse, error) {
	out := new(QueryConnectionConsensusStateResponse)
	err := c.cc.Invoke(ctx, "/ibc.core.connection.v1.Query/ConnectionConsensusState", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *queryClient) ConnectionParams(ctx context.Context, in *QueryConnectionParamsRequest, opts ...grpc.CallOption) (*QueryConnectionParamsResponse, error) {
	out := new(QueryConnectionParamsResponse)
	err := c.cc.Invoke(ctx, "/ibc.core.connection.v1.Query/ConnectionParams", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// QueryServer is the server API for Query service.
type QueryServer interface {
	// Connection queries an IBC connection end.
	Connection(context.Context, *QueryConnectionRequest) (*QueryConnectionResponse, error)
	// Connections queries all the IBC connections of a chain.
	Connections(context.Context, *QueryConnectionsRequest) (*QueryConnectionsResponse, error)
	// ClientConnections queries the connection paths associated with a client
	// state.
	ClientConnections(context.Context, *QueryClientConnectionsRequest) (*QueryClientConnectionsResponse, error)
	// ConnectionClientState queries the client state associated with the
	// connection.
	ConnectionClientState(context.Context, *QueryConnectionClientStateRequest) (*QueryConnectionClientStateResponse, error)
	// ConnectionConsensusState queries the consensus state associated with the
	// connection.
	ConnectionConsensusState(context.Context, *QueryConnectionConsensusStateRequest) (*QueryConnectionConsensusStateResponse, error)
	// ConnectionParams queries all parameters of the ibc connection submodule.
	ConnectionParams(context.Context, *QueryConnectionParamsRequest) (*QueryConnectionParamsResponse, error)
}

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

func (*UnimplementedQueryServer) Connection(ctx context.Context, req *QueryConnectionRequest) (*QueryConnectionResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Connection not implemented")
}
func (*UnimplementedQueryServer) Connections(ctx context.Context, req *QueryConnectionsRequest) (*QueryConnectionsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Connections not implemented")
}
func (*UnimplementedQueryServer) ClientConnections(ctx context.Context, req *QueryClientConnectionsRequest) (*QueryClientConnectionsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ClientConnections not implemented")
}
func (*UnimplementedQueryServer) ConnectionClientState(ctx context.Context, req *QueryConnectionClientStateRequest) (*QueryConnectionClientStateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ConnectionClientState not implemented")
}
func (*UnimplementedQueryServer) ConnectionConsensusState(ctx context.Context, req *QueryConnectionConsensusStateRequest) (*QueryConnectionConsensusStateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ConnectionConsensusState not implemented")
}
func (*UnimplementedQueryServer) ConnectionParams(ctx context.Context, req *QueryConnectionParamsRequest) (*QueryConnectionParamsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ConnectionParams not implemented")
}

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

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

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

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

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

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

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

var _Query_serviceDesc = grpc.ServiceDesc{
	ServiceName: "ibc.core.connection.v1.Query",
	HandlerType: (*QueryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Connection",
			Handler:    _Query_Connection_Handler,
		},
		{
			MethodName: "Connections",
			Handler:    _Query_Connections_Handler,
		},
		{
			MethodName: "ClientConnections",
			Handler:    _Query_ClientConnections_Handler,
		},
		{
			MethodName: "ConnectionClientState",
			Handler:    _Query_ConnectionClientState_Handler,
		},
		{
			MethodName: "ConnectionConsensusState",
			Handler:    _Query_ConnectionConsensusState_Handler,
		},
		{
			MethodName: "ConnectionParams",
			Handler:    _Query_ConnectionParams_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "ibc/core/connection/v1/query.proto",
}

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

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

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

func (m *QueryConnectionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	{
		size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintQuery(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x1a
	if len(m.Proof) > 0 {
		i -= len(m.Proof)
		copy(dAtA[i:], m.Proof)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.Proof)))
		i--
		dAtA[i] = 0x12
	}
	if m.Connection != nil {
		{
			size, err := m.Connection.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 *QueryConnectionsRequest) 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 *QueryConnectionsRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryConnectionsRequest) 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] = 0xa
	}
	return len(dAtA) - i, nil
}

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

func (m *QueryConnectionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	{
		size, err := m.Height.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintQuery(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x1a
	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.Connections) > 0 {
		for iNdEx := len(m.Connections) - 1; iNdEx >= 0; iNdEx-- {
			{
				size, err := m.Connections[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 *QueryClientConnectionsRequest) 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 *QueryClientConnectionsRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

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

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

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

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

func (m *QueryConnectionClientStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	{
		size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintQuery(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x1a
	if len(m.Proof) > 0 {
		i -= len(m.Proof)
		copy(dAtA[i:], m.Proof)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.Proof)))
		i--
		dAtA[i] = 0x12
	}
	if m.IdentifiedClientState != nil {
		{
			size, err := m.IdentifiedClientState.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 *QueryConnectionConsensusStateRequest) 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 *QueryConnectionConsensusStateRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryConnectionConsensusStateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.RevisionHeight != 0 {
		i = encodeVarintQuery(dAtA, i, uint64(m.RevisionHeight))
		i--
		dAtA[i] = 0x18
	}
	if m.RevisionNumber != 0 {
		i = encodeVarintQuery(dAtA, i, uint64(m.RevisionNumber))
		i--
		dAtA[i] = 0x10
	}
	if len(m.ConnectionId) > 0 {
		i -= len(m.ConnectionId)
		copy(dAtA[i:], m.ConnectionId)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.ConnectionId)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

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

func (m *QueryConnectionConsensusStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	{
		size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintQuery(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x22
	if len(m.Proof) > 0 {
		i -= len(m.Proof)
		copy(dAtA[i:], m.Proof)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.Proof)))
		i--
		dAtA[i] = 0x1a
	}
	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] = 0x12
	}
	if m.ConsensusState != nil {
		{
			size, err := m.ConsensusState.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 *QueryConnectionParamsRequest) 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 *QueryConnectionParamsRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

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

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

func (m *QueryConnectionResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Connection != nil {
		l = m.Connection.Size()
		n += 1 + l + sovQuery(uint64(l))
	}
	l = len(m.Proof)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	l = m.ProofHeight.Size()
	n += 1 + l + sovQuery(uint64(l))
	return n
}

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

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

func (m *QueryClientConnectionsRequest) 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 *QueryClientConnectionsResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if len(m.ConnectionPaths) > 0 {
		for _, s := range m.ConnectionPaths {
			l = len(s)
			n += 1 + l + sovQuery(uint64(l))
		}
	}
	l = len(m.Proof)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	l = m.ProofHeight.Size()
	n += 1 + l + sovQuery(uint64(l))
	return n
}

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

func (m *QueryConnectionClientStateResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.IdentifiedClientState != nil {
		l = m.IdentifiedClientState.Size()
		n += 1 + l + sovQuery(uint64(l))
	}
	l = len(m.Proof)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	l = m.ProofHeight.Size()
	n += 1 + l + sovQuery(uint64(l))
	return n
}

func (m *QueryConnectionConsensusStateRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.ConnectionId)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	if m.RevisionNumber != 0 {
		n += 1 + sovQuery(uint64(m.RevisionNumber))
	}
	if m.RevisionHeight != 0 {
		n += 1 + sovQuery(uint64(m.RevisionHeight))
	}
	return n
}

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

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

func (m *QueryConnectionParamsResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Params != nil {
		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 *QueryConnectionRequest) 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: QueryConnectionRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryConnectionRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", 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.ConnectionId = 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 *QueryConnectionResponse) 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: QueryConnectionResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryConnectionResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Connection", 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.Connection == nil {
				m.Connection = &ConnectionEnd{}
			}
			if err := m.Connection.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Proof = append(m.Proof[:0], dAtA[iNdEx:postIndex]...)
			if m.Proof == nil {
				m.Proof = []byte{}
			}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", 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.ProofHeight.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 *QueryConnectionsRequest) 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: QueryConnectionsRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryConnectionsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			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 *QueryConnectionsResponse) 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: QueryConnectionsResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryConnectionsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Connections", 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.Connections = append(m.Connections, &IdentifiedConnection{})
			if err := m.Connections[len(m.Connections)-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
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Height", 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.Height.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 *QueryClientConnectionsRequest) 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: QueryClientConnectionsRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryClientConnectionsRequest: 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 *QueryClientConnectionsResponse) 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: QueryClientConnectionsResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryClientConnectionsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ConnectionPaths", 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.ConnectionPaths = append(m.ConnectionPaths, string(dAtA[iNdEx:postIndex]))
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Proof = append(m.Proof[:0], dAtA[iNdEx:postIndex]...)
			if m.Proof == nil {
				m.Proof = []byte{}
			}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", 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.ProofHeight.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 *QueryConnectionClientStateRequest) 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: QueryConnectionClientStateRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryConnectionClientStateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", 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.ConnectionId = 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 *QueryConnectionClientStateResponse) 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: QueryConnectionClientStateResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryConnectionClientStateResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field IdentifiedClientState", 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.IdentifiedClientState == nil {
				m.IdentifiedClientState = &types.IdentifiedClientState{}
			}
			if err := m.IdentifiedClientState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Proof = append(m.Proof[:0], dAtA[iNdEx:postIndex]...)
			if m.Proof == nil {
				m.Proof = []byte{}
			}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", 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.ProofHeight.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 *QueryConnectionConsensusStateRequest) 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: QueryConnectionConsensusStateRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryConnectionConsensusStateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", 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.ConnectionId = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field RevisionNumber", wireType)
			}
			m.RevisionNumber = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.RevisionNumber |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 3:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field RevisionHeight", wireType)
			}
			m.RevisionHeight = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.RevisionHeight |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		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 *QueryConnectionConsensusStateResponse) 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: QueryConnectionConsensusStateResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryConnectionConsensusStateResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ConsensusState", 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.ConsensusState == nil {
				m.ConsensusState = &types1.Any{}
			}
			if err := m.ConsensusState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			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
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Proof = append(m.Proof[:0], dAtA[iNdEx:postIndex]...)
			if m.Proof == nil {
				m.Proof = []byte{}
			}
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", 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.ProofHeight.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 *QueryConnectionParamsRequest) 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: QueryConnectionParamsRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryConnectionParamsRequest: 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 *QueryConnectionParamsResponse) 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: QueryConnectionParamsResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryConnectionParamsResponse: 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 m.Params == nil {
				m.Params = &Params{}
			}
			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")
)
