github.com/cosmos/cosmos-sdk@v0.50.10/x/authz/query.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: cosmos/authz/v1beta1/query.proto
     3  
     4  package authz
     5  
     6  import (
     7  	context "context"
     8  	fmt "fmt"
     9  	_ "github.com/cosmos/cosmos-proto"
    10  	query "github.com/cosmos/cosmos-sdk/types/query"
    11  	grpc1 "github.com/cosmos/gogoproto/grpc"
    12  	proto "github.com/cosmos/gogoproto/proto"
    13  	_ "google.golang.org/genproto/googleapis/api/annotations"
    14  	grpc "google.golang.org/grpc"
    15  	codes "google.golang.org/grpc/codes"
    16  	status "google.golang.org/grpc/status"
    17  	io "io"
    18  	math "math"
    19  	math_bits "math/bits"
    20  )
    21  
    22  // Reference imports to suppress errors if they are not otherwise used.
    23  var _ = proto.Marshal
    24  var _ = fmt.Errorf
    25  var _ = math.Inf
    26  
    27  // This is a compile-time assertion to ensure that this generated file
    28  // is compatible with the proto package it is being compiled against.
    29  // A compilation error at this line likely means your copy of the
    30  // proto package needs to be updated.
    31  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    32  
    33  // QueryGrantsRequest is the request type for the Query/Grants RPC method.
    34  type QueryGrantsRequest struct {
    35  	Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"`
    36  	Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"`
    37  	// Optional, msg_type_url, when set, will query only grants matching given msg type.
    38  	MsgTypeUrl string `protobuf:"bytes,3,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"`
    39  	// pagination defines an pagination for the request.
    40  	Pagination *query.PageRequest `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination,omitempty"`
    41  }
    42  
    43  func (m *QueryGrantsRequest) Reset()         { *m = QueryGrantsRequest{} }
    44  func (m *QueryGrantsRequest) String() string { return proto.CompactTextString(m) }
    45  func (*QueryGrantsRequest) ProtoMessage()    {}
    46  func (*QueryGrantsRequest) Descriptor() ([]byte, []int) {
    47  	return fileDescriptor_376d714ffdeb1545, []int{0}
    48  }
    49  func (m *QueryGrantsRequest) XXX_Unmarshal(b []byte) error {
    50  	return m.Unmarshal(b)
    51  }
    52  func (m *QueryGrantsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    53  	if deterministic {
    54  		return xxx_messageInfo_QueryGrantsRequest.Marshal(b, m, deterministic)
    55  	} else {
    56  		b = b[:cap(b)]
    57  		n, err := m.MarshalToSizedBuffer(b)
    58  		if err != nil {
    59  			return nil, err
    60  		}
    61  		return b[:n], nil
    62  	}
    63  }
    64  func (m *QueryGrantsRequest) XXX_Merge(src proto.Message) {
    65  	xxx_messageInfo_QueryGrantsRequest.Merge(m, src)
    66  }
    67  func (m *QueryGrantsRequest) XXX_Size() int {
    68  	return m.Size()
    69  }
    70  func (m *QueryGrantsRequest) XXX_DiscardUnknown() {
    71  	xxx_messageInfo_QueryGrantsRequest.DiscardUnknown(m)
    72  }
    73  
    74  var xxx_messageInfo_QueryGrantsRequest proto.InternalMessageInfo
    75  
    76  func (m *QueryGrantsRequest) GetGranter() string {
    77  	if m != nil {
    78  		return m.Granter
    79  	}
    80  	return ""
    81  }
    82  
    83  func (m *QueryGrantsRequest) GetGrantee() string {
    84  	if m != nil {
    85  		return m.Grantee
    86  	}
    87  	return ""
    88  }
    89  
    90  func (m *QueryGrantsRequest) GetMsgTypeUrl() string {
    91  	if m != nil {
    92  		return m.MsgTypeUrl
    93  	}
    94  	return ""
    95  }
    96  
    97  func (m *QueryGrantsRequest) GetPagination() *query.PageRequest {
    98  	if m != nil {
    99  		return m.Pagination
   100  	}
   101  	return nil
   102  }
   103  
   104  // QueryGrantsResponse is the response type for the Query/Authorizations RPC method.
   105  type QueryGrantsResponse struct {
   106  	// authorizations is a list of grants granted for grantee by granter.
   107  	Grants []*Grant `protobuf:"bytes,1,rep,name=grants,proto3" json:"grants,omitempty"`
   108  	// pagination defines an pagination for the response.
   109  	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
   110  }
   111  
   112  func (m *QueryGrantsResponse) Reset()         { *m = QueryGrantsResponse{} }
   113  func (m *QueryGrantsResponse) String() string { return proto.CompactTextString(m) }
   114  func (*QueryGrantsResponse) ProtoMessage()    {}
   115  func (*QueryGrantsResponse) Descriptor() ([]byte, []int) {
   116  	return fileDescriptor_376d714ffdeb1545, []int{1}
   117  }
   118  func (m *QueryGrantsResponse) XXX_Unmarshal(b []byte) error {
   119  	return m.Unmarshal(b)
   120  }
   121  func (m *QueryGrantsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   122  	if deterministic {
   123  		return xxx_messageInfo_QueryGrantsResponse.Marshal(b, m, deterministic)
   124  	} else {
   125  		b = b[:cap(b)]
   126  		n, err := m.MarshalToSizedBuffer(b)
   127  		if err != nil {
   128  			return nil, err
   129  		}
   130  		return b[:n], nil
   131  	}
   132  }
   133  func (m *QueryGrantsResponse) XXX_Merge(src proto.Message) {
   134  	xxx_messageInfo_QueryGrantsResponse.Merge(m, src)
   135  }
   136  func (m *QueryGrantsResponse) XXX_Size() int {
   137  	return m.Size()
   138  }
   139  func (m *QueryGrantsResponse) XXX_DiscardUnknown() {
   140  	xxx_messageInfo_QueryGrantsResponse.DiscardUnknown(m)
   141  }
   142  
   143  var xxx_messageInfo_QueryGrantsResponse proto.InternalMessageInfo
   144  
   145  func (m *QueryGrantsResponse) GetGrants() []*Grant {
   146  	if m != nil {
   147  		return m.Grants
   148  	}
   149  	return nil
   150  }
   151  
   152  func (m *QueryGrantsResponse) GetPagination() *query.PageResponse {
   153  	if m != nil {
   154  		return m.Pagination
   155  	}
   156  	return nil
   157  }
   158  
   159  // QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method.
   160  type QueryGranterGrantsRequest struct {
   161  	Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"`
   162  	// pagination defines an pagination for the request.
   163  	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
   164  }
   165  
   166  func (m *QueryGranterGrantsRequest) Reset()         { *m = QueryGranterGrantsRequest{} }
   167  func (m *QueryGranterGrantsRequest) String() string { return proto.CompactTextString(m) }
   168  func (*QueryGranterGrantsRequest) ProtoMessage()    {}
   169  func (*QueryGranterGrantsRequest) Descriptor() ([]byte, []int) {
   170  	return fileDescriptor_376d714ffdeb1545, []int{2}
   171  }
   172  func (m *QueryGranterGrantsRequest) XXX_Unmarshal(b []byte) error {
   173  	return m.Unmarshal(b)
   174  }
   175  func (m *QueryGranterGrantsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   176  	if deterministic {
   177  		return xxx_messageInfo_QueryGranterGrantsRequest.Marshal(b, m, deterministic)
   178  	} else {
   179  		b = b[:cap(b)]
   180  		n, err := m.MarshalToSizedBuffer(b)
   181  		if err != nil {
   182  			return nil, err
   183  		}
   184  		return b[:n], nil
   185  	}
   186  }
   187  func (m *QueryGranterGrantsRequest) XXX_Merge(src proto.Message) {
   188  	xxx_messageInfo_QueryGranterGrantsRequest.Merge(m, src)
   189  }
   190  func (m *QueryGranterGrantsRequest) XXX_Size() int {
   191  	return m.Size()
   192  }
   193  func (m *QueryGranterGrantsRequest) XXX_DiscardUnknown() {
   194  	xxx_messageInfo_QueryGranterGrantsRequest.DiscardUnknown(m)
   195  }
   196  
   197  var xxx_messageInfo_QueryGranterGrantsRequest proto.InternalMessageInfo
   198  
   199  func (m *QueryGranterGrantsRequest) GetGranter() string {
   200  	if m != nil {
   201  		return m.Granter
   202  	}
   203  	return ""
   204  }
   205  
   206  func (m *QueryGranterGrantsRequest) GetPagination() *query.PageRequest {
   207  	if m != nil {
   208  		return m.Pagination
   209  	}
   210  	return nil
   211  }
   212  
   213  // QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method.
   214  type QueryGranterGrantsResponse struct {
   215  	// grants is a list of grants granted by the granter.
   216  	Grants []*GrantAuthorization `protobuf:"bytes,1,rep,name=grants,proto3" json:"grants,omitempty"`
   217  	// pagination defines an pagination for the response.
   218  	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
   219  }
   220  
   221  func (m *QueryGranterGrantsResponse) Reset()         { *m = QueryGranterGrantsResponse{} }
   222  func (m *QueryGranterGrantsResponse) String() string { return proto.CompactTextString(m) }
   223  func (*QueryGranterGrantsResponse) ProtoMessage()    {}
   224  func (*QueryGranterGrantsResponse) Descriptor() ([]byte, []int) {
   225  	return fileDescriptor_376d714ffdeb1545, []int{3}
   226  }
   227  func (m *QueryGranterGrantsResponse) XXX_Unmarshal(b []byte) error {
   228  	return m.Unmarshal(b)
   229  }
   230  func (m *QueryGranterGrantsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   231  	if deterministic {
   232  		return xxx_messageInfo_QueryGranterGrantsResponse.Marshal(b, m, deterministic)
   233  	} else {
   234  		b = b[:cap(b)]
   235  		n, err := m.MarshalToSizedBuffer(b)
   236  		if err != nil {
   237  			return nil, err
   238  		}
   239  		return b[:n], nil
   240  	}
   241  }
   242  func (m *QueryGranterGrantsResponse) XXX_Merge(src proto.Message) {
   243  	xxx_messageInfo_QueryGranterGrantsResponse.Merge(m, src)
   244  }
   245  func (m *QueryGranterGrantsResponse) XXX_Size() int {
   246  	return m.Size()
   247  }
   248  func (m *QueryGranterGrantsResponse) XXX_DiscardUnknown() {
   249  	xxx_messageInfo_QueryGranterGrantsResponse.DiscardUnknown(m)
   250  }
   251  
   252  var xxx_messageInfo_QueryGranterGrantsResponse proto.InternalMessageInfo
   253  
   254  func (m *QueryGranterGrantsResponse) GetGrants() []*GrantAuthorization {
   255  	if m != nil {
   256  		return m.Grants
   257  	}
   258  	return nil
   259  }
   260  
   261  func (m *QueryGranterGrantsResponse) GetPagination() *query.PageResponse {
   262  	if m != nil {
   263  		return m.Pagination
   264  	}
   265  	return nil
   266  }
   267  
   268  // QueryGranteeGrantsRequest is the request type for the Query/GranteeGrants RPC method.
   269  type QueryGranteeGrantsRequest struct {
   270  	Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"`
   271  	// pagination defines an pagination for the request.
   272  	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
   273  }
   274  
   275  func (m *QueryGranteeGrantsRequest) Reset()         { *m = QueryGranteeGrantsRequest{} }
   276  func (m *QueryGranteeGrantsRequest) String() string { return proto.CompactTextString(m) }
   277  func (*QueryGranteeGrantsRequest) ProtoMessage()    {}
   278  func (*QueryGranteeGrantsRequest) Descriptor() ([]byte, []int) {
   279  	return fileDescriptor_376d714ffdeb1545, []int{4}
   280  }
   281  func (m *QueryGranteeGrantsRequest) XXX_Unmarshal(b []byte) error {
   282  	return m.Unmarshal(b)
   283  }
   284  func (m *QueryGranteeGrantsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   285  	if deterministic {
   286  		return xxx_messageInfo_QueryGranteeGrantsRequest.Marshal(b, m, deterministic)
   287  	} else {
   288  		b = b[:cap(b)]
   289  		n, err := m.MarshalToSizedBuffer(b)
   290  		if err != nil {
   291  			return nil, err
   292  		}
   293  		return b[:n], nil
   294  	}
   295  }
   296  func (m *QueryGranteeGrantsRequest) XXX_Merge(src proto.Message) {
   297  	xxx_messageInfo_QueryGranteeGrantsRequest.Merge(m, src)
   298  }
   299  func (m *QueryGranteeGrantsRequest) XXX_Size() int {
   300  	return m.Size()
   301  }
   302  func (m *QueryGranteeGrantsRequest) XXX_DiscardUnknown() {
   303  	xxx_messageInfo_QueryGranteeGrantsRequest.DiscardUnknown(m)
   304  }
   305  
   306  var xxx_messageInfo_QueryGranteeGrantsRequest proto.InternalMessageInfo
   307  
   308  func (m *QueryGranteeGrantsRequest) GetGrantee() string {
   309  	if m != nil {
   310  		return m.Grantee
   311  	}
   312  	return ""
   313  }
   314  
   315  func (m *QueryGranteeGrantsRequest) GetPagination() *query.PageRequest {
   316  	if m != nil {
   317  		return m.Pagination
   318  	}
   319  	return nil
   320  }
   321  
   322  // QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method.
   323  type QueryGranteeGrantsResponse struct {
   324  	// grants is a list of grants granted to the grantee.
   325  	Grants []*GrantAuthorization `protobuf:"bytes,1,rep,name=grants,proto3" json:"grants,omitempty"`
   326  	// pagination defines an pagination for the response.
   327  	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
   328  }
   329  
   330  func (m *QueryGranteeGrantsResponse) Reset()         { *m = QueryGranteeGrantsResponse{} }
   331  func (m *QueryGranteeGrantsResponse) String() string { return proto.CompactTextString(m) }
   332  func (*QueryGranteeGrantsResponse) ProtoMessage()    {}
   333  func (*QueryGranteeGrantsResponse) Descriptor() ([]byte, []int) {
   334  	return fileDescriptor_376d714ffdeb1545, []int{5}
   335  }
   336  func (m *QueryGranteeGrantsResponse) XXX_Unmarshal(b []byte) error {
   337  	return m.Unmarshal(b)
   338  }
   339  func (m *QueryGranteeGrantsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   340  	if deterministic {
   341  		return xxx_messageInfo_QueryGranteeGrantsResponse.Marshal(b, m, deterministic)
   342  	} else {
   343  		b = b[:cap(b)]
   344  		n, err := m.MarshalToSizedBuffer(b)
   345  		if err != nil {
   346  			return nil, err
   347  		}
   348  		return b[:n], nil
   349  	}
   350  }
   351  func (m *QueryGranteeGrantsResponse) XXX_Merge(src proto.Message) {
   352  	xxx_messageInfo_QueryGranteeGrantsResponse.Merge(m, src)
   353  }
   354  func (m *QueryGranteeGrantsResponse) XXX_Size() int {
   355  	return m.Size()
   356  }
   357  func (m *QueryGranteeGrantsResponse) XXX_DiscardUnknown() {
   358  	xxx_messageInfo_QueryGranteeGrantsResponse.DiscardUnknown(m)
   359  }
   360  
   361  var xxx_messageInfo_QueryGranteeGrantsResponse proto.InternalMessageInfo
   362  
   363  func (m *QueryGranteeGrantsResponse) GetGrants() []*GrantAuthorization {
   364  	if m != nil {
   365  		return m.Grants
   366  	}
   367  	return nil
   368  }
   369  
   370  func (m *QueryGranteeGrantsResponse) GetPagination() *query.PageResponse {
   371  	if m != nil {
   372  		return m.Pagination
   373  	}
   374  	return nil
   375  }
   376  
   377  func init() {
   378  	proto.RegisterType((*QueryGrantsRequest)(nil), "cosmos.authz.v1beta1.QueryGrantsRequest")
   379  	proto.RegisterType((*QueryGrantsResponse)(nil), "cosmos.authz.v1beta1.QueryGrantsResponse")
   380  	proto.RegisterType((*QueryGranterGrantsRequest)(nil), "cosmos.authz.v1beta1.QueryGranterGrantsRequest")
   381  	proto.RegisterType((*QueryGranterGrantsResponse)(nil), "cosmos.authz.v1beta1.QueryGranterGrantsResponse")
   382  	proto.RegisterType((*QueryGranteeGrantsRequest)(nil), "cosmos.authz.v1beta1.QueryGranteeGrantsRequest")
   383  	proto.RegisterType((*QueryGranteeGrantsResponse)(nil), "cosmos.authz.v1beta1.QueryGranteeGrantsResponse")
   384  }
   385  
   386  func init() { proto.RegisterFile("cosmos/authz/v1beta1/query.proto", fileDescriptor_376d714ffdeb1545) }
   387  
   388  var fileDescriptor_376d714ffdeb1545 = []byte{
   389  	// 529 bytes of a gzipped FileDescriptorProto
   390  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x95, 0x41, 0x6f, 0xd3, 0x3e,
   391  	0x18, 0xc6, 0xeb, 0xf6, 0xff, 0x2f, 0xc2, 0x83, 0x8b, 0xe1, 0x90, 0x85, 0x29, 0x8a, 0xaa, 0x09,
   392  	0x0a, 0xd2, 0xec, 0xad, 0x93, 0x38, 0x22, 0xb6, 0xc3, 0x76, 0x85, 0x00, 0x17, 0x2e, 0x55, 0xba,
   393  	0xbe, 0x72, 0x23, 0xda, 0x38, 0xb3, 0x1d, 0x44, 0x87, 0x76, 0x81, 0x2f, 0x80, 0xb4, 0x03, 0x1f,
   394  	0x01, 0x89, 0x33, 0x1f, 0x82, 0xe3, 0x04, 0x17, 0x8e, 0xa8, 0x45, 0xf0, 0x35, 0x50, 0x6d, 0x97,
   395  	0xae, 0x23, 0xdb, 0x02, 0xd3, 0x24, 0x4e, 0xad, 0xa3, 0xe7, 0x7d, 0xde, 0xdf, 0xfb, 0x38, 0x76,
   396  	0x70, 0xb8, 0x23, 0xd4, 0x40, 0x28, 0x16, 0xe7, 0xba, 0xb7, 0xc7, 0x9e, 0xaf, 0x75, 0x40, 0xc7,
   397  	0x6b, 0x6c, 0x37, 0x07, 0x39, 0xa4, 0x99, 0x14, 0x5a, 0x90, 0xeb, 0x56, 0x41, 0x8d, 0x82, 0x3a,
   398  	0x85, 0xbf, 0xc4, 0x85, 0xe0, 0x7d, 0x60, 0x71, 0x96, 0xb0, 0x38, 0x4d, 0x85, 0x8e, 0x75, 0x22,
   399  	0x52, 0x65, 0x6b, 0xfc, 0x3b, 0xce, 0xb5, 0x13, 0x2b, 0xb0, 0x66, 0xbf, 0xac, 0xb3, 0x98, 0x27,
   400  	0xa9, 0x11, 0x3b, 0x6d, 0x31, 0x81, 0xed, 0x66, 0x15, 0x8b, 0x56, 0xd1, 0x36, 0x2b, 0xe6, 0x70,
   401  	0xcc, 0xa2, 0xf1, 0x1d, 0x61, 0xf2, 0x70, 0xe2, 0xbf, 0x2d, 0xe3, 0x54, 0xab, 0x08, 0x76, 0x73,
   402  	0x50, 0x9a, 0xb4, 0xf0, 0x25, 0x3e, 0x79, 0x00, 0xd2, 0x43, 0x21, 0x6a, 0x5e, 0xde, 0xf4, 0x3e,
   403  	0x7d, 0x58, 0x99, 0x0e, 0xb2, 0xd1, 0xed, 0x4a, 0x50, 0xea, 0x91, 0x96, 0x49, 0xca, 0xa3, 0xa9,
   404  	0x70, 0x56, 0x03, 0x5e, 0xb5, 0x5c, 0x0d, 0x90, 0x10, 0x5f, 0x19, 0x28, 0xde, 0xd6, 0xc3, 0x0c,
   405  	0xda, 0xb9, 0xec, 0x7b, 0xb5, 0x49, 0x61, 0x84, 0x07, 0x8a, 0x3f, 0x1e, 0x66, 0xf0, 0x44, 0xf6,
   406  	0xc9, 0x16, 0xc6, 0xb3, 0x89, 0xbd, 0xff, 0x42, 0xd4, 0x5c, 0x68, 0xdd, 0xa4, 0xce, 0x75, 0x12,
   407  	0x0f, 0xb5, 0x59, 0xbb, 0xb9, 0xe9, 0x83, 0x98, 0x83, 0x9b, 0x22, 0x3a, 0x52, 0xd9, 0x38, 0x40,
   408  	0xf8, 0xda, 0xdc, 0xa0, 0x2a, 0x13, 0xa9, 0x02, 0xb2, 0x8e, 0xeb, 0x06, 0x46, 0x79, 0x28, 0xac,
   409  	0x35, 0x17, 0x5a, 0x37, 0x68, 0xd1, 0x76, 0x51, 0x53, 0x15, 0x39, 0x29, 0xd9, 0x9e, 0x83, 0xaa,
   410  	0x1a, 0xa8, 0x5b, 0x67, 0x42, 0xd9, 0x8e, 0x73, 0x54, 0x6f, 0x11, 0x5e, 0x9c, 0x51, 0x81, 0x3c,
   411  	0xff, 0x2e, 0x6c, 0x15, 0xa0, 0xfd, 0x4d, 0x5e, 0xef, 0x10, 0xf6, 0x8b, 0xc8, 0x5c, 0x6c, 0xf7,
   412  	0x8f, 0xc5, 0xd6, 0x3c, 0x25, 0xb6, 0x8d, 0x5c, 0xf7, 0x84, 0x4c, 0xf6, 0x8c, 0xf1, 0x85, 0x67,
   413  	0x08, 0x27, 0x64, 0x08, 0x65, 0x33, 0x84, 0x8b, 0xca, 0x10, 0xfe, 0xd9, 0x0c, 0x5b, 0x3f, 0x6a,
   414  	0xf8, 0x7f, 0x43, 0x4a, 0x5e, 0x23, 0x5c, 0xb7, 0x9c, 0xe4, 0x04, 0x9e, 0xdf, 0xaf, 0x0b, 0xff,
   415  	0x76, 0x09, 0xa5, 0xed, 0xda, 0x58, 0x7e, 0xf5, 0xf9, 0xdb, 0x41, 0x35, 0x20, 0x4b, 0xac, 0xf0,
   416  	0xda, 0x72, 0x83, 0xbd, 0x47, 0xf8, 0xea, 0xdc, 0x8b, 0x47, 0xd8, 0x59, 0x2d, 0x8e, 0x1d, 0x1e,
   417  	0x7f, 0xb5, 0x7c, 0x81, 0x43, 0xbb, 0x6b, 0xd0, 0x56, 0x09, 0x3d, 0x0d, 0x8d, 0xb9, 0x83, 0xc6,
   418  	0x5e, 0xba, 0x3f, 0xfb, 0x47, 0x60, 0xa1, 0x34, 0x2c, 0xfc, 0x29, 0x2c, 0x9c, 0x03, 0x16, 0xa6,
   419  	0xb0, 0xb0, 0xbf, 0x79, 0xef, 0xe3, 0x28, 0x40, 0x87, 0xa3, 0x00, 0x7d, 0x1d, 0x05, 0xe8, 0xcd,
   420  	0x38, 0xa8, 0x1c, 0x8e, 0x83, 0xca, 0x97, 0x71, 0x50, 0x79, 0xba, 0xcc, 0x13, 0xdd, 0xcb, 0x3b,
   421  	0x74, 0x47, 0x0c, 0xa6, 0x9e, 0xf6, 0x67, 0x45, 0x75, 0x9f, 0xb1, 0x17, 0xb6, 0x41, 0xa7, 0x6e,
   422  	0xbe, 0x1b, 0xeb, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x3e, 0x8b, 0x47, 0x69, 0xf8, 0x06, 0x00,
   423  	0x00,
   424  }
   425  
   426  // Reference imports to suppress errors if they are not otherwise used.
   427  var _ context.Context
   428  var _ grpc.ClientConn
   429  
   430  // This is a compile-time assertion to ensure that this generated file
   431  // is compatible with the grpc package it is being compiled against.
   432  const _ = grpc.SupportPackageIsVersion4
   433  
   434  // QueryClient is the client API for Query service.
   435  //
   436  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   437  type QueryClient interface {
   438  	// Returns list of `Authorization`, granted to the grantee by the granter.
   439  	Grants(ctx context.Context, in *QueryGrantsRequest, opts ...grpc.CallOption) (*QueryGrantsResponse, error)
   440  	// GranterGrants returns list of `GrantAuthorization`, granted by granter.
   441  	//
   442  	// Since: cosmos-sdk 0.46
   443  	GranterGrants(ctx context.Context, in *QueryGranterGrantsRequest, opts ...grpc.CallOption) (*QueryGranterGrantsResponse, error)
   444  	// GranteeGrants returns a list of `GrantAuthorization` by grantee.
   445  	//
   446  	// Since: cosmos-sdk 0.46
   447  	GranteeGrants(ctx context.Context, in *QueryGranteeGrantsRequest, opts ...grpc.CallOption) (*QueryGranteeGrantsResponse, error)
   448  }
   449  
   450  type queryClient struct {
   451  	cc grpc1.ClientConn
   452  }
   453  
   454  func NewQueryClient(cc grpc1.ClientConn) QueryClient {
   455  	return &queryClient{cc}
   456  }
   457  
   458  func (c *queryClient) Grants(ctx context.Context, in *QueryGrantsRequest, opts ...grpc.CallOption) (*QueryGrantsResponse, error) {
   459  	out := new(QueryGrantsResponse)
   460  	err := c.cc.Invoke(ctx, "/cosmos.authz.v1beta1.Query/Grants", in, out, opts...)
   461  	if err != nil {
   462  		return nil, err
   463  	}
   464  	return out, nil
   465  }
   466  
   467  func (c *queryClient) GranterGrants(ctx context.Context, in *QueryGranterGrantsRequest, opts ...grpc.CallOption) (*QueryGranterGrantsResponse, error) {
   468  	out := new(QueryGranterGrantsResponse)
   469  	err := c.cc.Invoke(ctx, "/cosmos.authz.v1beta1.Query/GranterGrants", in, out, opts...)
   470  	if err != nil {
   471  		return nil, err
   472  	}
   473  	return out, nil
   474  }
   475  
   476  func (c *queryClient) GranteeGrants(ctx context.Context, in *QueryGranteeGrantsRequest, opts ...grpc.CallOption) (*QueryGranteeGrantsResponse, error) {
   477  	out := new(QueryGranteeGrantsResponse)
   478  	err := c.cc.Invoke(ctx, "/cosmos.authz.v1beta1.Query/GranteeGrants", in, out, opts...)
   479  	if err != nil {
   480  		return nil, err
   481  	}
   482  	return out, nil
   483  }
   484  
   485  // QueryServer is the server API for Query service.
   486  type QueryServer interface {
   487  	// Returns list of `Authorization`, granted to the grantee by the granter.
   488  	Grants(context.Context, *QueryGrantsRequest) (*QueryGrantsResponse, error)
   489  	// GranterGrants returns list of `GrantAuthorization`, granted by granter.
   490  	//
   491  	// Since: cosmos-sdk 0.46
   492  	GranterGrants(context.Context, *QueryGranterGrantsRequest) (*QueryGranterGrantsResponse, error)
   493  	// GranteeGrants returns a list of `GrantAuthorization` by grantee.
   494  	//
   495  	// Since: cosmos-sdk 0.46
   496  	GranteeGrants(context.Context, *QueryGranteeGrantsRequest) (*QueryGranteeGrantsResponse, error)
   497  }
   498  
   499  // UnimplementedQueryServer can be embedded to have forward compatible implementations.
   500  type UnimplementedQueryServer struct {
   501  }
   502  
   503  func (*UnimplementedQueryServer) Grants(ctx context.Context, req *QueryGrantsRequest) (*QueryGrantsResponse, error) {
   504  	return nil, status.Errorf(codes.Unimplemented, "method Grants not implemented")
   505  }
   506  func (*UnimplementedQueryServer) GranterGrants(ctx context.Context, req *QueryGranterGrantsRequest) (*QueryGranterGrantsResponse, error) {
   507  	return nil, status.Errorf(codes.Unimplemented, "method GranterGrants not implemented")
   508  }
   509  func (*UnimplementedQueryServer) GranteeGrants(ctx context.Context, req *QueryGranteeGrantsRequest) (*QueryGranteeGrantsResponse, error) {
   510  	return nil, status.Errorf(codes.Unimplemented, "method GranteeGrants not implemented")
   511  }
   512  
   513  func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
   514  	s.RegisterService(&_Query_serviceDesc, srv)
   515  }
   516  
   517  func _Query_Grants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   518  	in := new(QueryGrantsRequest)
   519  	if err := dec(in); err != nil {
   520  		return nil, err
   521  	}
   522  	if interceptor == nil {
   523  		return srv.(QueryServer).Grants(ctx, in)
   524  	}
   525  	info := &grpc.UnaryServerInfo{
   526  		Server:     srv,
   527  		FullMethod: "/cosmos.authz.v1beta1.Query/Grants",
   528  	}
   529  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   530  		return srv.(QueryServer).Grants(ctx, req.(*QueryGrantsRequest))
   531  	}
   532  	return interceptor(ctx, in, info, handler)
   533  }
   534  
   535  func _Query_GranterGrants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   536  	in := new(QueryGranterGrantsRequest)
   537  	if err := dec(in); err != nil {
   538  		return nil, err
   539  	}
   540  	if interceptor == nil {
   541  		return srv.(QueryServer).GranterGrants(ctx, in)
   542  	}
   543  	info := &grpc.UnaryServerInfo{
   544  		Server:     srv,
   545  		FullMethod: "/cosmos.authz.v1beta1.Query/GranterGrants",
   546  	}
   547  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   548  		return srv.(QueryServer).GranterGrants(ctx, req.(*QueryGranterGrantsRequest))
   549  	}
   550  	return interceptor(ctx, in, info, handler)
   551  }
   552  
   553  func _Query_GranteeGrants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   554  	in := new(QueryGranteeGrantsRequest)
   555  	if err := dec(in); err != nil {
   556  		return nil, err
   557  	}
   558  	if interceptor == nil {
   559  		return srv.(QueryServer).GranteeGrants(ctx, in)
   560  	}
   561  	info := &grpc.UnaryServerInfo{
   562  		Server:     srv,
   563  		FullMethod: "/cosmos.authz.v1beta1.Query/GranteeGrants",
   564  	}
   565  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   566  		return srv.(QueryServer).GranteeGrants(ctx, req.(*QueryGranteeGrantsRequest))
   567  	}
   568  	return interceptor(ctx, in, info, handler)
   569  }
   570  
   571  var _Query_serviceDesc = grpc.ServiceDesc{
   572  	ServiceName: "cosmos.authz.v1beta1.Query",
   573  	HandlerType: (*QueryServer)(nil),
   574  	Methods: []grpc.MethodDesc{
   575  		{
   576  			MethodName: "Grants",
   577  			Handler:    _Query_Grants_Handler,
   578  		},
   579  		{
   580  			MethodName: "GranterGrants",
   581  			Handler:    _Query_GranterGrants_Handler,
   582  		},
   583  		{
   584  			MethodName: "GranteeGrants",
   585  			Handler:    _Query_GranteeGrants_Handler,
   586  		},
   587  	},
   588  	Streams:  []grpc.StreamDesc{},
   589  	Metadata: "cosmos/authz/v1beta1/query.proto",
   590  }
   591  
   592  func (m *QueryGrantsRequest) Marshal() (dAtA []byte, err error) {
   593  	size := m.Size()
   594  	dAtA = make([]byte, size)
   595  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   596  	if err != nil {
   597  		return nil, err
   598  	}
   599  	return dAtA[:n], nil
   600  }
   601  
   602  func (m *QueryGrantsRequest) MarshalTo(dAtA []byte) (int, error) {
   603  	size := m.Size()
   604  	return m.MarshalToSizedBuffer(dAtA[:size])
   605  }
   606  
   607  func (m *QueryGrantsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   608  	i := len(dAtA)
   609  	_ = i
   610  	var l int
   611  	_ = l
   612  	if m.Pagination != nil {
   613  		{
   614  			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
   615  			if err != nil {
   616  				return 0, err
   617  			}
   618  			i -= size
   619  			i = encodeVarintQuery(dAtA, i, uint64(size))
   620  		}
   621  		i--
   622  		dAtA[i] = 0x22
   623  	}
   624  	if len(m.MsgTypeUrl) > 0 {
   625  		i -= len(m.MsgTypeUrl)
   626  		copy(dAtA[i:], m.MsgTypeUrl)
   627  		i = encodeVarintQuery(dAtA, i, uint64(len(m.MsgTypeUrl)))
   628  		i--
   629  		dAtA[i] = 0x1a
   630  	}
   631  	if len(m.Grantee) > 0 {
   632  		i -= len(m.Grantee)
   633  		copy(dAtA[i:], m.Grantee)
   634  		i = encodeVarintQuery(dAtA, i, uint64(len(m.Grantee)))
   635  		i--
   636  		dAtA[i] = 0x12
   637  	}
   638  	if len(m.Granter) > 0 {
   639  		i -= len(m.Granter)
   640  		copy(dAtA[i:], m.Granter)
   641  		i = encodeVarintQuery(dAtA, i, uint64(len(m.Granter)))
   642  		i--
   643  		dAtA[i] = 0xa
   644  	}
   645  	return len(dAtA) - i, nil
   646  }
   647  
   648  func (m *QueryGrantsResponse) Marshal() (dAtA []byte, err error) {
   649  	size := m.Size()
   650  	dAtA = make([]byte, size)
   651  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   652  	if err != nil {
   653  		return nil, err
   654  	}
   655  	return dAtA[:n], nil
   656  }
   657  
   658  func (m *QueryGrantsResponse) MarshalTo(dAtA []byte) (int, error) {
   659  	size := m.Size()
   660  	return m.MarshalToSizedBuffer(dAtA[:size])
   661  }
   662  
   663  func (m *QueryGrantsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   664  	i := len(dAtA)
   665  	_ = i
   666  	var l int
   667  	_ = l
   668  	if m.Pagination != nil {
   669  		{
   670  			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
   671  			if err != nil {
   672  				return 0, err
   673  			}
   674  			i -= size
   675  			i = encodeVarintQuery(dAtA, i, uint64(size))
   676  		}
   677  		i--
   678  		dAtA[i] = 0x12
   679  	}
   680  	if len(m.Grants) > 0 {
   681  		for iNdEx := len(m.Grants) - 1; iNdEx >= 0; iNdEx-- {
   682  			{
   683  				size, err := m.Grants[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   684  				if err != nil {
   685  					return 0, err
   686  				}
   687  				i -= size
   688  				i = encodeVarintQuery(dAtA, i, uint64(size))
   689  			}
   690  			i--
   691  			dAtA[i] = 0xa
   692  		}
   693  	}
   694  	return len(dAtA) - i, nil
   695  }
   696  
   697  func (m *QueryGranterGrantsRequest) Marshal() (dAtA []byte, err error) {
   698  	size := m.Size()
   699  	dAtA = make([]byte, size)
   700  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   701  	if err != nil {
   702  		return nil, err
   703  	}
   704  	return dAtA[:n], nil
   705  }
   706  
   707  func (m *QueryGranterGrantsRequest) MarshalTo(dAtA []byte) (int, error) {
   708  	size := m.Size()
   709  	return m.MarshalToSizedBuffer(dAtA[:size])
   710  }
   711  
   712  func (m *QueryGranterGrantsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   713  	i := len(dAtA)
   714  	_ = i
   715  	var l int
   716  	_ = l
   717  	if m.Pagination != nil {
   718  		{
   719  			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
   720  			if err != nil {
   721  				return 0, err
   722  			}
   723  			i -= size
   724  			i = encodeVarintQuery(dAtA, i, uint64(size))
   725  		}
   726  		i--
   727  		dAtA[i] = 0x12
   728  	}
   729  	if len(m.Granter) > 0 {
   730  		i -= len(m.Granter)
   731  		copy(dAtA[i:], m.Granter)
   732  		i = encodeVarintQuery(dAtA, i, uint64(len(m.Granter)))
   733  		i--
   734  		dAtA[i] = 0xa
   735  	}
   736  	return len(dAtA) - i, nil
   737  }
   738  
   739  func (m *QueryGranterGrantsResponse) Marshal() (dAtA []byte, err error) {
   740  	size := m.Size()
   741  	dAtA = make([]byte, size)
   742  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   743  	if err != nil {
   744  		return nil, err
   745  	}
   746  	return dAtA[:n], nil
   747  }
   748  
   749  func (m *QueryGranterGrantsResponse) MarshalTo(dAtA []byte) (int, error) {
   750  	size := m.Size()
   751  	return m.MarshalToSizedBuffer(dAtA[:size])
   752  }
   753  
   754  func (m *QueryGranterGrantsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   755  	i := len(dAtA)
   756  	_ = i
   757  	var l int
   758  	_ = l
   759  	if m.Pagination != nil {
   760  		{
   761  			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
   762  			if err != nil {
   763  				return 0, err
   764  			}
   765  			i -= size
   766  			i = encodeVarintQuery(dAtA, i, uint64(size))
   767  		}
   768  		i--
   769  		dAtA[i] = 0x12
   770  	}
   771  	if len(m.Grants) > 0 {
   772  		for iNdEx := len(m.Grants) - 1; iNdEx >= 0; iNdEx-- {
   773  			{
   774  				size, err := m.Grants[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   775  				if err != nil {
   776  					return 0, err
   777  				}
   778  				i -= size
   779  				i = encodeVarintQuery(dAtA, i, uint64(size))
   780  			}
   781  			i--
   782  			dAtA[i] = 0xa
   783  		}
   784  	}
   785  	return len(dAtA) - i, nil
   786  }
   787  
   788  func (m *QueryGranteeGrantsRequest) Marshal() (dAtA []byte, err error) {
   789  	size := m.Size()
   790  	dAtA = make([]byte, size)
   791  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   792  	if err != nil {
   793  		return nil, err
   794  	}
   795  	return dAtA[:n], nil
   796  }
   797  
   798  func (m *QueryGranteeGrantsRequest) MarshalTo(dAtA []byte) (int, error) {
   799  	size := m.Size()
   800  	return m.MarshalToSizedBuffer(dAtA[:size])
   801  }
   802  
   803  func (m *QueryGranteeGrantsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   804  	i := len(dAtA)
   805  	_ = i
   806  	var l int
   807  	_ = l
   808  	if m.Pagination != nil {
   809  		{
   810  			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
   811  			if err != nil {
   812  				return 0, err
   813  			}
   814  			i -= size
   815  			i = encodeVarintQuery(dAtA, i, uint64(size))
   816  		}
   817  		i--
   818  		dAtA[i] = 0x12
   819  	}
   820  	if len(m.Grantee) > 0 {
   821  		i -= len(m.Grantee)
   822  		copy(dAtA[i:], m.Grantee)
   823  		i = encodeVarintQuery(dAtA, i, uint64(len(m.Grantee)))
   824  		i--
   825  		dAtA[i] = 0xa
   826  	}
   827  	return len(dAtA) - i, nil
   828  }
   829  
   830  func (m *QueryGranteeGrantsResponse) Marshal() (dAtA []byte, err error) {
   831  	size := m.Size()
   832  	dAtA = make([]byte, size)
   833  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   834  	if err != nil {
   835  		return nil, err
   836  	}
   837  	return dAtA[:n], nil
   838  }
   839  
   840  func (m *QueryGranteeGrantsResponse) MarshalTo(dAtA []byte) (int, error) {
   841  	size := m.Size()
   842  	return m.MarshalToSizedBuffer(dAtA[:size])
   843  }
   844  
   845  func (m *QueryGranteeGrantsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   846  	i := len(dAtA)
   847  	_ = i
   848  	var l int
   849  	_ = l
   850  	if m.Pagination != nil {
   851  		{
   852  			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
   853  			if err != nil {
   854  				return 0, err
   855  			}
   856  			i -= size
   857  			i = encodeVarintQuery(dAtA, i, uint64(size))
   858  		}
   859  		i--
   860  		dAtA[i] = 0x12
   861  	}
   862  	if len(m.Grants) > 0 {
   863  		for iNdEx := len(m.Grants) - 1; iNdEx >= 0; iNdEx-- {
   864  			{
   865  				size, err := m.Grants[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   866  				if err != nil {
   867  					return 0, err
   868  				}
   869  				i -= size
   870  				i = encodeVarintQuery(dAtA, i, uint64(size))
   871  			}
   872  			i--
   873  			dAtA[i] = 0xa
   874  		}
   875  	}
   876  	return len(dAtA) - i, nil
   877  }
   878  
   879  func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
   880  	offset -= sovQuery(v)
   881  	base := offset
   882  	for v >= 1<<7 {
   883  		dAtA[offset] = uint8(v&0x7f | 0x80)
   884  		v >>= 7
   885  		offset++
   886  	}
   887  	dAtA[offset] = uint8(v)
   888  	return base
   889  }
   890  func (m *QueryGrantsRequest) Size() (n int) {
   891  	if m == nil {
   892  		return 0
   893  	}
   894  	var l int
   895  	_ = l
   896  	l = len(m.Granter)
   897  	if l > 0 {
   898  		n += 1 + l + sovQuery(uint64(l))
   899  	}
   900  	l = len(m.Grantee)
   901  	if l > 0 {
   902  		n += 1 + l + sovQuery(uint64(l))
   903  	}
   904  	l = len(m.MsgTypeUrl)
   905  	if l > 0 {
   906  		n += 1 + l + sovQuery(uint64(l))
   907  	}
   908  	if m.Pagination != nil {
   909  		l = m.Pagination.Size()
   910  		n += 1 + l + sovQuery(uint64(l))
   911  	}
   912  	return n
   913  }
   914  
   915  func (m *QueryGrantsResponse) Size() (n int) {
   916  	if m == nil {
   917  		return 0
   918  	}
   919  	var l int
   920  	_ = l
   921  	if len(m.Grants) > 0 {
   922  		for _, e := range m.Grants {
   923  			l = e.Size()
   924  			n += 1 + l + sovQuery(uint64(l))
   925  		}
   926  	}
   927  	if m.Pagination != nil {
   928  		l = m.Pagination.Size()
   929  		n += 1 + l + sovQuery(uint64(l))
   930  	}
   931  	return n
   932  }
   933  
   934  func (m *QueryGranterGrantsRequest) Size() (n int) {
   935  	if m == nil {
   936  		return 0
   937  	}
   938  	var l int
   939  	_ = l
   940  	l = len(m.Granter)
   941  	if l > 0 {
   942  		n += 1 + l + sovQuery(uint64(l))
   943  	}
   944  	if m.Pagination != nil {
   945  		l = m.Pagination.Size()
   946  		n += 1 + l + sovQuery(uint64(l))
   947  	}
   948  	return n
   949  }
   950  
   951  func (m *QueryGranterGrantsResponse) Size() (n int) {
   952  	if m == nil {
   953  		return 0
   954  	}
   955  	var l int
   956  	_ = l
   957  	if len(m.Grants) > 0 {
   958  		for _, e := range m.Grants {
   959  			l = e.Size()
   960  			n += 1 + l + sovQuery(uint64(l))
   961  		}
   962  	}
   963  	if m.Pagination != nil {
   964  		l = m.Pagination.Size()
   965  		n += 1 + l + sovQuery(uint64(l))
   966  	}
   967  	return n
   968  }
   969  
   970  func (m *QueryGranteeGrantsRequest) Size() (n int) {
   971  	if m == nil {
   972  		return 0
   973  	}
   974  	var l int
   975  	_ = l
   976  	l = len(m.Grantee)
   977  	if l > 0 {
   978  		n += 1 + l + sovQuery(uint64(l))
   979  	}
   980  	if m.Pagination != nil {
   981  		l = m.Pagination.Size()
   982  		n += 1 + l + sovQuery(uint64(l))
   983  	}
   984  	return n
   985  }
   986  
   987  func (m *QueryGranteeGrantsResponse) Size() (n int) {
   988  	if m == nil {
   989  		return 0
   990  	}
   991  	var l int
   992  	_ = l
   993  	if len(m.Grants) > 0 {
   994  		for _, e := range m.Grants {
   995  			l = e.Size()
   996  			n += 1 + l + sovQuery(uint64(l))
   997  		}
   998  	}
   999  	if m.Pagination != nil {
  1000  		l = m.Pagination.Size()
  1001  		n += 1 + l + sovQuery(uint64(l))
  1002  	}
  1003  	return n
  1004  }
  1005  
  1006  func sovQuery(x uint64) (n int) {
  1007  	return (math_bits.Len64(x|1) + 6) / 7
  1008  }
  1009  func sozQuery(x uint64) (n int) {
  1010  	return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  1011  }
  1012  func (m *QueryGrantsRequest) Unmarshal(dAtA []byte) error {
  1013  	l := len(dAtA)
  1014  	iNdEx := 0
  1015  	for iNdEx < l {
  1016  		preIndex := iNdEx
  1017  		var wire uint64
  1018  		for shift := uint(0); ; shift += 7 {
  1019  			if shift >= 64 {
  1020  				return ErrIntOverflowQuery
  1021  			}
  1022  			if iNdEx >= l {
  1023  				return io.ErrUnexpectedEOF
  1024  			}
  1025  			b := dAtA[iNdEx]
  1026  			iNdEx++
  1027  			wire |= uint64(b&0x7F) << shift
  1028  			if b < 0x80 {
  1029  				break
  1030  			}
  1031  		}
  1032  		fieldNum := int32(wire >> 3)
  1033  		wireType := int(wire & 0x7)
  1034  		if wireType == 4 {
  1035  			return fmt.Errorf("proto: QueryGrantsRequest: wiretype end group for non-group")
  1036  		}
  1037  		if fieldNum <= 0 {
  1038  			return fmt.Errorf("proto: QueryGrantsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  1039  		}
  1040  		switch fieldNum {
  1041  		case 1:
  1042  			if wireType != 2 {
  1043  				return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType)
  1044  			}
  1045  			var stringLen uint64
  1046  			for shift := uint(0); ; shift += 7 {
  1047  				if shift >= 64 {
  1048  					return ErrIntOverflowQuery
  1049  				}
  1050  				if iNdEx >= l {
  1051  					return io.ErrUnexpectedEOF
  1052  				}
  1053  				b := dAtA[iNdEx]
  1054  				iNdEx++
  1055  				stringLen |= uint64(b&0x7F) << shift
  1056  				if b < 0x80 {
  1057  					break
  1058  				}
  1059  			}
  1060  			intStringLen := int(stringLen)
  1061  			if intStringLen < 0 {
  1062  				return ErrInvalidLengthQuery
  1063  			}
  1064  			postIndex := iNdEx + intStringLen
  1065  			if postIndex < 0 {
  1066  				return ErrInvalidLengthQuery
  1067  			}
  1068  			if postIndex > l {
  1069  				return io.ErrUnexpectedEOF
  1070  			}
  1071  			m.Granter = string(dAtA[iNdEx:postIndex])
  1072  			iNdEx = postIndex
  1073  		case 2:
  1074  			if wireType != 2 {
  1075  				return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType)
  1076  			}
  1077  			var stringLen uint64
  1078  			for shift := uint(0); ; shift += 7 {
  1079  				if shift >= 64 {
  1080  					return ErrIntOverflowQuery
  1081  				}
  1082  				if iNdEx >= l {
  1083  					return io.ErrUnexpectedEOF
  1084  				}
  1085  				b := dAtA[iNdEx]
  1086  				iNdEx++
  1087  				stringLen |= uint64(b&0x7F) << shift
  1088  				if b < 0x80 {
  1089  					break
  1090  				}
  1091  			}
  1092  			intStringLen := int(stringLen)
  1093  			if intStringLen < 0 {
  1094  				return ErrInvalidLengthQuery
  1095  			}
  1096  			postIndex := iNdEx + intStringLen
  1097  			if postIndex < 0 {
  1098  				return ErrInvalidLengthQuery
  1099  			}
  1100  			if postIndex > l {
  1101  				return io.ErrUnexpectedEOF
  1102  			}
  1103  			m.Grantee = string(dAtA[iNdEx:postIndex])
  1104  			iNdEx = postIndex
  1105  		case 3:
  1106  			if wireType != 2 {
  1107  				return fmt.Errorf("proto: wrong wireType = %d for field MsgTypeUrl", wireType)
  1108  			}
  1109  			var stringLen uint64
  1110  			for shift := uint(0); ; shift += 7 {
  1111  				if shift >= 64 {
  1112  					return ErrIntOverflowQuery
  1113  				}
  1114  				if iNdEx >= l {
  1115  					return io.ErrUnexpectedEOF
  1116  				}
  1117  				b := dAtA[iNdEx]
  1118  				iNdEx++
  1119  				stringLen |= uint64(b&0x7F) << shift
  1120  				if b < 0x80 {
  1121  					break
  1122  				}
  1123  			}
  1124  			intStringLen := int(stringLen)
  1125  			if intStringLen < 0 {
  1126  				return ErrInvalidLengthQuery
  1127  			}
  1128  			postIndex := iNdEx + intStringLen
  1129  			if postIndex < 0 {
  1130  				return ErrInvalidLengthQuery
  1131  			}
  1132  			if postIndex > l {
  1133  				return io.ErrUnexpectedEOF
  1134  			}
  1135  			m.MsgTypeUrl = string(dAtA[iNdEx:postIndex])
  1136  			iNdEx = postIndex
  1137  		case 4:
  1138  			if wireType != 2 {
  1139  				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
  1140  			}
  1141  			var msglen int
  1142  			for shift := uint(0); ; shift += 7 {
  1143  				if shift >= 64 {
  1144  					return ErrIntOverflowQuery
  1145  				}
  1146  				if iNdEx >= l {
  1147  					return io.ErrUnexpectedEOF
  1148  				}
  1149  				b := dAtA[iNdEx]
  1150  				iNdEx++
  1151  				msglen |= int(b&0x7F) << shift
  1152  				if b < 0x80 {
  1153  					break
  1154  				}
  1155  			}
  1156  			if msglen < 0 {
  1157  				return ErrInvalidLengthQuery
  1158  			}
  1159  			postIndex := iNdEx + msglen
  1160  			if postIndex < 0 {
  1161  				return ErrInvalidLengthQuery
  1162  			}
  1163  			if postIndex > l {
  1164  				return io.ErrUnexpectedEOF
  1165  			}
  1166  			if m.Pagination == nil {
  1167  				m.Pagination = &query.PageRequest{}
  1168  			}
  1169  			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1170  				return err
  1171  			}
  1172  			iNdEx = postIndex
  1173  		default:
  1174  			iNdEx = preIndex
  1175  			skippy, err := skipQuery(dAtA[iNdEx:])
  1176  			if err != nil {
  1177  				return err
  1178  			}
  1179  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1180  				return ErrInvalidLengthQuery
  1181  			}
  1182  			if (iNdEx + skippy) > l {
  1183  				return io.ErrUnexpectedEOF
  1184  			}
  1185  			iNdEx += skippy
  1186  		}
  1187  	}
  1188  
  1189  	if iNdEx > l {
  1190  		return io.ErrUnexpectedEOF
  1191  	}
  1192  	return nil
  1193  }
  1194  func (m *QueryGrantsResponse) Unmarshal(dAtA []byte) error {
  1195  	l := len(dAtA)
  1196  	iNdEx := 0
  1197  	for iNdEx < l {
  1198  		preIndex := iNdEx
  1199  		var wire uint64
  1200  		for shift := uint(0); ; shift += 7 {
  1201  			if shift >= 64 {
  1202  				return ErrIntOverflowQuery
  1203  			}
  1204  			if iNdEx >= l {
  1205  				return io.ErrUnexpectedEOF
  1206  			}
  1207  			b := dAtA[iNdEx]
  1208  			iNdEx++
  1209  			wire |= uint64(b&0x7F) << shift
  1210  			if b < 0x80 {
  1211  				break
  1212  			}
  1213  		}
  1214  		fieldNum := int32(wire >> 3)
  1215  		wireType := int(wire & 0x7)
  1216  		if wireType == 4 {
  1217  			return fmt.Errorf("proto: QueryGrantsResponse: wiretype end group for non-group")
  1218  		}
  1219  		if fieldNum <= 0 {
  1220  			return fmt.Errorf("proto: QueryGrantsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1221  		}
  1222  		switch fieldNum {
  1223  		case 1:
  1224  			if wireType != 2 {
  1225  				return fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType)
  1226  			}
  1227  			var msglen int
  1228  			for shift := uint(0); ; shift += 7 {
  1229  				if shift >= 64 {
  1230  					return ErrIntOverflowQuery
  1231  				}
  1232  				if iNdEx >= l {
  1233  					return io.ErrUnexpectedEOF
  1234  				}
  1235  				b := dAtA[iNdEx]
  1236  				iNdEx++
  1237  				msglen |= int(b&0x7F) << shift
  1238  				if b < 0x80 {
  1239  					break
  1240  				}
  1241  			}
  1242  			if msglen < 0 {
  1243  				return ErrInvalidLengthQuery
  1244  			}
  1245  			postIndex := iNdEx + msglen
  1246  			if postIndex < 0 {
  1247  				return ErrInvalidLengthQuery
  1248  			}
  1249  			if postIndex > l {
  1250  				return io.ErrUnexpectedEOF
  1251  			}
  1252  			m.Grants = append(m.Grants, &Grant{})
  1253  			if err := m.Grants[len(m.Grants)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1254  				return err
  1255  			}
  1256  			iNdEx = postIndex
  1257  		case 2:
  1258  			if wireType != 2 {
  1259  				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
  1260  			}
  1261  			var msglen int
  1262  			for shift := uint(0); ; shift += 7 {
  1263  				if shift >= 64 {
  1264  					return ErrIntOverflowQuery
  1265  				}
  1266  				if iNdEx >= l {
  1267  					return io.ErrUnexpectedEOF
  1268  				}
  1269  				b := dAtA[iNdEx]
  1270  				iNdEx++
  1271  				msglen |= int(b&0x7F) << shift
  1272  				if b < 0x80 {
  1273  					break
  1274  				}
  1275  			}
  1276  			if msglen < 0 {
  1277  				return ErrInvalidLengthQuery
  1278  			}
  1279  			postIndex := iNdEx + msglen
  1280  			if postIndex < 0 {
  1281  				return ErrInvalidLengthQuery
  1282  			}
  1283  			if postIndex > l {
  1284  				return io.ErrUnexpectedEOF
  1285  			}
  1286  			if m.Pagination == nil {
  1287  				m.Pagination = &query.PageResponse{}
  1288  			}
  1289  			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1290  				return err
  1291  			}
  1292  			iNdEx = postIndex
  1293  		default:
  1294  			iNdEx = preIndex
  1295  			skippy, err := skipQuery(dAtA[iNdEx:])
  1296  			if err != nil {
  1297  				return err
  1298  			}
  1299  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1300  				return ErrInvalidLengthQuery
  1301  			}
  1302  			if (iNdEx + skippy) > l {
  1303  				return io.ErrUnexpectedEOF
  1304  			}
  1305  			iNdEx += skippy
  1306  		}
  1307  	}
  1308  
  1309  	if iNdEx > l {
  1310  		return io.ErrUnexpectedEOF
  1311  	}
  1312  	return nil
  1313  }
  1314  func (m *QueryGranterGrantsRequest) Unmarshal(dAtA []byte) error {
  1315  	l := len(dAtA)
  1316  	iNdEx := 0
  1317  	for iNdEx < l {
  1318  		preIndex := iNdEx
  1319  		var wire uint64
  1320  		for shift := uint(0); ; shift += 7 {
  1321  			if shift >= 64 {
  1322  				return ErrIntOverflowQuery
  1323  			}
  1324  			if iNdEx >= l {
  1325  				return io.ErrUnexpectedEOF
  1326  			}
  1327  			b := dAtA[iNdEx]
  1328  			iNdEx++
  1329  			wire |= uint64(b&0x7F) << shift
  1330  			if b < 0x80 {
  1331  				break
  1332  			}
  1333  		}
  1334  		fieldNum := int32(wire >> 3)
  1335  		wireType := int(wire & 0x7)
  1336  		if wireType == 4 {
  1337  			return fmt.Errorf("proto: QueryGranterGrantsRequest: wiretype end group for non-group")
  1338  		}
  1339  		if fieldNum <= 0 {
  1340  			return fmt.Errorf("proto: QueryGranterGrantsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  1341  		}
  1342  		switch fieldNum {
  1343  		case 1:
  1344  			if wireType != 2 {
  1345  				return fmt.Errorf("proto: wrong wireType = %d for field Granter", wireType)
  1346  			}
  1347  			var stringLen uint64
  1348  			for shift := uint(0); ; shift += 7 {
  1349  				if shift >= 64 {
  1350  					return ErrIntOverflowQuery
  1351  				}
  1352  				if iNdEx >= l {
  1353  					return io.ErrUnexpectedEOF
  1354  				}
  1355  				b := dAtA[iNdEx]
  1356  				iNdEx++
  1357  				stringLen |= uint64(b&0x7F) << shift
  1358  				if b < 0x80 {
  1359  					break
  1360  				}
  1361  			}
  1362  			intStringLen := int(stringLen)
  1363  			if intStringLen < 0 {
  1364  				return ErrInvalidLengthQuery
  1365  			}
  1366  			postIndex := iNdEx + intStringLen
  1367  			if postIndex < 0 {
  1368  				return ErrInvalidLengthQuery
  1369  			}
  1370  			if postIndex > l {
  1371  				return io.ErrUnexpectedEOF
  1372  			}
  1373  			m.Granter = string(dAtA[iNdEx:postIndex])
  1374  			iNdEx = postIndex
  1375  		case 2:
  1376  			if wireType != 2 {
  1377  				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
  1378  			}
  1379  			var msglen int
  1380  			for shift := uint(0); ; shift += 7 {
  1381  				if shift >= 64 {
  1382  					return ErrIntOverflowQuery
  1383  				}
  1384  				if iNdEx >= l {
  1385  					return io.ErrUnexpectedEOF
  1386  				}
  1387  				b := dAtA[iNdEx]
  1388  				iNdEx++
  1389  				msglen |= int(b&0x7F) << shift
  1390  				if b < 0x80 {
  1391  					break
  1392  				}
  1393  			}
  1394  			if msglen < 0 {
  1395  				return ErrInvalidLengthQuery
  1396  			}
  1397  			postIndex := iNdEx + msglen
  1398  			if postIndex < 0 {
  1399  				return ErrInvalidLengthQuery
  1400  			}
  1401  			if postIndex > l {
  1402  				return io.ErrUnexpectedEOF
  1403  			}
  1404  			if m.Pagination == nil {
  1405  				m.Pagination = &query.PageRequest{}
  1406  			}
  1407  			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1408  				return err
  1409  			}
  1410  			iNdEx = postIndex
  1411  		default:
  1412  			iNdEx = preIndex
  1413  			skippy, err := skipQuery(dAtA[iNdEx:])
  1414  			if err != nil {
  1415  				return err
  1416  			}
  1417  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1418  				return ErrInvalidLengthQuery
  1419  			}
  1420  			if (iNdEx + skippy) > l {
  1421  				return io.ErrUnexpectedEOF
  1422  			}
  1423  			iNdEx += skippy
  1424  		}
  1425  	}
  1426  
  1427  	if iNdEx > l {
  1428  		return io.ErrUnexpectedEOF
  1429  	}
  1430  	return nil
  1431  }
  1432  func (m *QueryGranterGrantsResponse) Unmarshal(dAtA []byte) error {
  1433  	l := len(dAtA)
  1434  	iNdEx := 0
  1435  	for iNdEx < l {
  1436  		preIndex := iNdEx
  1437  		var wire uint64
  1438  		for shift := uint(0); ; shift += 7 {
  1439  			if shift >= 64 {
  1440  				return ErrIntOverflowQuery
  1441  			}
  1442  			if iNdEx >= l {
  1443  				return io.ErrUnexpectedEOF
  1444  			}
  1445  			b := dAtA[iNdEx]
  1446  			iNdEx++
  1447  			wire |= uint64(b&0x7F) << shift
  1448  			if b < 0x80 {
  1449  				break
  1450  			}
  1451  		}
  1452  		fieldNum := int32(wire >> 3)
  1453  		wireType := int(wire & 0x7)
  1454  		if wireType == 4 {
  1455  			return fmt.Errorf("proto: QueryGranterGrantsResponse: wiretype end group for non-group")
  1456  		}
  1457  		if fieldNum <= 0 {
  1458  			return fmt.Errorf("proto: QueryGranterGrantsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1459  		}
  1460  		switch fieldNum {
  1461  		case 1:
  1462  			if wireType != 2 {
  1463  				return fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType)
  1464  			}
  1465  			var msglen int
  1466  			for shift := uint(0); ; shift += 7 {
  1467  				if shift >= 64 {
  1468  					return ErrIntOverflowQuery
  1469  				}
  1470  				if iNdEx >= l {
  1471  					return io.ErrUnexpectedEOF
  1472  				}
  1473  				b := dAtA[iNdEx]
  1474  				iNdEx++
  1475  				msglen |= int(b&0x7F) << shift
  1476  				if b < 0x80 {
  1477  					break
  1478  				}
  1479  			}
  1480  			if msglen < 0 {
  1481  				return ErrInvalidLengthQuery
  1482  			}
  1483  			postIndex := iNdEx + msglen
  1484  			if postIndex < 0 {
  1485  				return ErrInvalidLengthQuery
  1486  			}
  1487  			if postIndex > l {
  1488  				return io.ErrUnexpectedEOF
  1489  			}
  1490  			m.Grants = append(m.Grants, &GrantAuthorization{})
  1491  			if err := m.Grants[len(m.Grants)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1492  				return err
  1493  			}
  1494  			iNdEx = postIndex
  1495  		case 2:
  1496  			if wireType != 2 {
  1497  				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
  1498  			}
  1499  			var msglen int
  1500  			for shift := uint(0); ; shift += 7 {
  1501  				if shift >= 64 {
  1502  					return ErrIntOverflowQuery
  1503  				}
  1504  				if iNdEx >= l {
  1505  					return io.ErrUnexpectedEOF
  1506  				}
  1507  				b := dAtA[iNdEx]
  1508  				iNdEx++
  1509  				msglen |= int(b&0x7F) << shift
  1510  				if b < 0x80 {
  1511  					break
  1512  				}
  1513  			}
  1514  			if msglen < 0 {
  1515  				return ErrInvalidLengthQuery
  1516  			}
  1517  			postIndex := iNdEx + msglen
  1518  			if postIndex < 0 {
  1519  				return ErrInvalidLengthQuery
  1520  			}
  1521  			if postIndex > l {
  1522  				return io.ErrUnexpectedEOF
  1523  			}
  1524  			if m.Pagination == nil {
  1525  				m.Pagination = &query.PageResponse{}
  1526  			}
  1527  			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1528  				return err
  1529  			}
  1530  			iNdEx = postIndex
  1531  		default:
  1532  			iNdEx = preIndex
  1533  			skippy, err := skipQuery(dAtA[iNdEx:])
  1534  			if err != nil {
  1535  				return err
  1536  			}
  1537  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1538  				return ErrInvalidLengthQuery
  1539  			}
  1540  			if (iNdEx + skippy) > l {
  1541  				return io.ErrUnexpectedEOF
  1542  			}
  1543  			iNdEx += skippy
  1544  		}
  1545  	}
  1546  
  1547  	if iNdEx > l {
  1548  		return io.ErrUnexpectedEOF
  1549  	}
  1550  	return nil
  1551  }
  1552  func (m *QueryGranteeGrantsRequest) Unmarshal(dAtA []byte) error {
  1553  	l := len(dAtA)
  1554  	iNdEx := 0
  1555  	for iNdEx < l {
  1556  		preIndex := iNdEx
  1557  		var wire uint64
  1558  		for shift := uint(0); ; shift += 7 {
  1559  			if shift >= 64 {
  1560  				return ErrIntOverflowQuery
  1561  			}
  1562  			if iNdEx >= l {
  1563  				return io.ErrUnexpectedEOF
  1564  			}
  1565  			b := dAtA[iNdEx]
  1566  			iNdEx++
  1567  			wire |= uint64(b&0x7F) << shift
  1568  			if b < 0x80 {
  1569  				break
  1570  			}
  1571  		}
  1572  		fieldNum := int32(wire >> 3)
  1573  		wireType := int(wire & 0x7)
  1574  		if wireType == 4 {
  1575  			return fmt.Errorf("proto: QueryGranteeGrantsRequest: wiretype end group for non-group")
  1576  		}
  1577  		if fieldNum <= 0 {
  1578  			return fmt.Errorf("proto: QueryGranteeGrantsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  1579  		}
  1580  		switch fieldNum {
  1581  		case 1:
  1582  			if wireType != 2 {
  1583  				return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType)
  1584  			}
  1585  			var stringLen uint64
  1586  			for shift := uint(0); ; shift += 7 {
  1587  				if shift >= 64 {
  1588  					return ErrIntOverflowQuery
  1589  				}
  1590  				if iNdEx >= l {
  1591  					return io.ErrUnexpectedEOF
  1592  				}
  1593  				b := dAtA[iNdEx]
  1594  				iNdEx++
  1595  				stringLen |= uint64(b&0x7F) << shift
  1596  				if b < 0x80 {
  1597  					break
  1598  				}
  1599  			}
  1600  			intStringLen := int(stringLen)
  1601  			if intStringLen < 0 {
  1602  				return ErrInvalidLengthQuery
  1603  			}
  1604  			postIndex := iNdEx + intStringLen
  1605  			if postIndex < 0 {
  1606  				return ErrInvalidLengthQuery
  1607  			}
  1608  			if postIndex > l {
  1609  				return io.ErrUnexpectedEOF
  1610  			}
  1611  			m.Grantee = string(dAtA[iNdEx:postIndex])
  1612  			iNdEx = postIndex
  1613  		case 2:
  1614  			if wireType != 2 {
  1615  				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
  1616  			}
  1617  			var msglen int
  1618  			for shift := uint(0); ; shift += 7 {
  1619  				if shift >= 64 {
  1620  					return ErrIntOverflowQuery
  1621  				}
  1622  				if iNdEx >= l {
  1623  					return io.ErrUnexpectedEOF
  1624  				}
  1625  				b := dAtA[iNdEx]
  1626  				iNdEx++
  1627  				msglen |= int(b&0x7F) << shift
  1628  				if b < 0x80 {
  1629  					break
  1630  				}
  1631  			}
  1632  			if msglen < 0 {
  1633  				return ErrInvalidLengthQuery
  1634  			}
  1635  			postIndex := iNdEx + msglen
  1636  			if postIndex < 0 {
  1637  				return ErrInvalidLengthQuery
  1638  			}
  1639  			if postIndex > l {
  1640  				return io.ErrUnexpectedEOF
  1641  			}
  1642  			if m.Pagination == nil {
  1643  				m.Pagination = &query.PageRequest{}
  1644  			}
  1645  			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1646  				return err
  1647  			}
  1648  			iNdEx = postIndex
  1649  		default:
  1650  			iNdEx = preIndex
  1651  			skippy, err := skipQuery(dAtA[iNdEx:])
  1652  			if err != nil {
  1653  				return err
  1654  			}
  1655  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1656  				return ErrInvalidLengthQuery
  1657  			}
  1658  			if (iNdEx + skippy) > l {
  1659  				return io.ErrUnexpectedEOF
  1660  			}
  1661  			iNdEx += skippy
  1662  		}
  1663  	}
  1664  
  1665  	if iNdEx > l {
  1666  		return io.ErrUnexpectedEOF
  1667  	}
  1668  	return nil
  1669  }
  1670  func (m *QueryGranteeGrantsResponse) Unmarshal(dAtA []byte) error {
  1671  	l := len(dAtA)
  1672  	iNdEx := 0
  1673  	for iNdEx < l {
  1674  		preIndex := iNdEx
  1675  		var wire uint64
  1676  		for shift := uint(0); ; shift += 7 {
  1677  			if shift >= 64 {
  1678  				return ErrIntOverflowQuery
  1679  			}
  1680  			if iNdEx >= l {
  1681  				return io.ErrUnexpectedEOF
  1682  			}
  1683  			b := dAtA[iNdEx]
  1684  			iNdEx++
  1685  			wire |= uint64(b&0x7F) << shift
  1686  			if b < 0x80 {
  1687  				break
  1688  			}
  1689  		}
  1690  		fieldNum := int32(wire >> 3)
  1691  		wireType := int(wire & 0x7)
  1692  		if wireType == 4 {
  1693  			return fmt.Errorf("proto: QueryGranteeGrantsResponse: wiretype end group for non-group")
  1694  		}
  1695  		if fieldNum <= 0 {
  1696  			return fmt.Errorf("proto: QueryGranteeGrantsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1697  		}
  1698  		switch fieldNum {
  1699  		case 1:
  1700  			if wireType != 2 {
  1701  				return fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType)
  1702  			}
  1703  			var msglen int
  1704  			for shift := uint(0); ; shift += 7 {
  1705  				if shift >= 64 {
  1706  					return ErrIntOverflowQuery
  1707  				}
  1708  				if iNdEx >= l {
  1709  					return io.ErrUnexpectedEOF
  1710  				}
  1711  				b := dAtA[iNdEx]
  1712  				iNdEx++
  1713  				msglen |= int(b&0x7F) << shift
  1714  				if b < 0x80 {
  1715  					break
  1716  				}
  1717  			}
  1718  			if msglen < 0 {
  1719  				return ErrInvalidLengthQuery
  1720  			}
  1721  			postIndex := iNdEx + msglen
  1722  			if postIndex < 0 {
  1723  				return ErrInvalidLengthQuery
  1724  			}
  1725  			if postIndex > l {
  1726  				return io.ErrUnexpectedEOF
  1727  			}
  1728  			m.Grants = append(m.Grants, &GrantAuthorization{})
  1729  			if err := m.Grants[len(m.Grants)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1730  				return err
  1731  			}
  1732  			iNdEx = postIndex
  1733  		case 2:
  1734  			if wireType != 2 {
  1735  				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
  1736  			}
  1737  			var msglen int
  1738  			for shift := uint(0); ; shift += 7 {
  1739  				if shift >= 64 {
  1740  					return ErrIntOverflowQuery
  1741  				}
  1742  				if iNdEx >= l {
  1743  					return io.ErrUnexpectedEOF
  1744  				}
  1745  				b := dAtA[iNdEx]
  1746  				iNdEx++
  1747  				msglen |= int(b&0x7F) << shift
  1748  				if b < 0x80 {
  1749  					break
  1750  				}
  1751  			}
  1752  			if msglen < 0 {
  1753  				return ErrInvalidLengthQuery
  1754  			}
  1755  			postIndex := iNdEx + msglen
  1756  			if postIndex < 0 {
  1757  				return ErrInvalidLengthQuery
  1758  			}
  1759  			if postIndex > l {
  1760  				return io.ErrUnexpectedEOF
  1761  			}
  1762  			if m.Pagination == nil {
  1763  				m.Pagination = &query.PageResponse{}
  1764  			}
  1765  			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1766  				return err
  1767  			}
  1768  			iNdEx = postIndex
  1769  		default:
  1770  			iNdEx = preIndex
  1771  			skippy, err := skipQuery(dAtA[iNdEx:])
  1772  			if err != nil {
  1773  				return err
  1774  			}
  1775  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1776  				return ErrInvalidLengthQuery
  1777  			}
  1778  			if (iNdEx + skippy) > l {
  1779  				return io.ErrUnexpectedEOF
  1780  			}
  1781  			iNdEx += skippy
  1782  		}
  1783  	}
  1784  
  1785  	if iNdEx > l {
  1786  		return io.ErrUnexpectedEOF
  1787  	}
  1788  	return nil
  1789  }
  1790  func skipQuery(dAtA []byte) (n int, err error) {
  1791  	l := len(dAtA)
  1792  	iNdEx := 0
  1793  	depth := 0
  1794  	for iNdEx < l {
  1795  		var wire uint64
  1796  		for shift := uint(0); ; shift += 7 {
  1797  			if shift >= 64 {
  1798  				return 0, ErrIntOverflowQuery
  1799  			}
  1800  			if iNdEx >= l {
  1801  				return 0, io.ErrUnexpectedEOF
  1802  			}
  1803  			b := dAtA[iNdEx]
  1804  			iNdEx++
  1805  			wire |= (uint64(b) & 0x7F) << shift
  1806  			if b < 0x80 {
  1807  				break
  1808  			}
  1809  		}
  1810  		wireType := int(wire & 0x7)
  1811  		switch wireType {
  1812  		case 0:
  1813  			for shift := uint(0); ; shift += 7 {
  1814  				if shift >= 64 {
  1815  					return 0, ErrIntOverflowQuery
  1816  				}
  1817  				if iNdEx >= l {
  1818  					return 0, io.ErrUnexpectedEOF
  1819  				}
  1820  				iNdEx++
  1821  				if dAtA[iNdEx-1] < 0x80 {
  1822  					break
  1823  				}
  1824  			}
  1825  		case 1:
  1826  			iNdEx += 8
  1827  		case 2:
  1828  			var length int
  1829  			for shift := uint(0); ; shift += 7 {
  1830  				if shift >= 64 {
  1831  					return 0, ErrIntOverflowQuery
  1832  				}
  1833  				if iNdEx >= l {
  1834  					return 0, io.ErrUnexpectedEOF
  1835  				}
  1836  				b := dAtA[iNdEx]
  1837  				iNdEx++
  1838  				length |= (int(b) & 0x7F) << shift
  1839  				if b < 0x80 {
  1840  					break
  1841  				}
  1842  			}
  1843  			if length < 0 {
  1844  				return 0, ErrInvalidLengthQuery
  1845  			}
  1846  			iNdEx += length
  1847  		case 3:
  1848  			depth++
  1849  		case 4:
  1850  			if depth == 0 {
  1851  				return 0, ErrUnexpectedEndOfGroupQuery
  1852  			}
  1853  			depth--
  1854  		case 5:
  1855  			iNdEx += 4
  1856  		default:
  1857  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1858  		}
  1859  		if iNdEx < 0 {
  1860  			return 0, ErrInvalidLengthQuery
  1861  		}
  1862  		if depth == 0 {
  1863  			return iNdEx, nil
  1864  		}
  1865  	}
  1866  	return 0, io.ErrUnexpectedEOF
  1867  }
  1868  
  1869  var (
  1870  	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
  1871  	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
  1872  	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
  1873  )