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

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: cosmos/authz/v1beta1/genesis.proto
     3  
     4  package authz
     5  
     6  import (
     7  	fmt "fmt"
     8  	_ "github.com/cosmos/cosmos-sdk/types/tx/amino"
     9  	_ "github.com/cosmos/gogoproto/gogoproto"
    10  	proto "github.com/cosmos/gogoproto/proto"
    11  	io "io"
    12  	math "math"
    13  	math_bits "math/bits"
    14  )
    15  
    16  // Reference imports to suppress errors if they are not otherwise used.
    17  var _ = proto.Marshal
    18  var _ = fmt.Errorf
    19  var _ = math.Inf
    20  
    21  // This is a compile-time assertion to ensure that this generated file
    22  // is compatible with the proto package it is being compiled against.
    23  // A compilation error at this line likely means your copy of the
    24  // proto package needs to be updated.
    25  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    26  
    27  // GenesisState defines the authz module's genesis state.
    28  type GenesisState struct {
    29  	Authorization []GrantAuthorization `protobuf:"bytes,1,rep,name=authorization,proto3" json:"authorization"`
    30  }
    31  
    32  func (m *GenesisState) Reset()         { *m = GenesisState{} }
    33  func (m *GenesisState) String() string { return proto.CompactTextString(m) }
    34  func (*GenesisState) ProtoMessage()    {}
    35  func (*GenesisState) Descriptor() ([]byte, []int) {
    36  	return fileDescriptor_4c2fbb971da7c892, []int{0}
    37  }
    38  func (m *GenesisState) XXX_Unmarshal(b []byte) error {
    39  	return m.Unmarshal(b)
    40  }
    41  func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    42  	if deterministic {
    43  		return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic)
    44  	} else {
    45  		b = b[:cap(b)]
    46  		n, err := m.MarshalToSizedBuffer(b)
    47  		if err != nil {
    48  			return nil, err
    49  		}
    50  		return b[:n], nil
    51  	}
    52  }
    53  func (m *GenesisState) XXX_Merge(src proto.Message) {
    54  	xxx_messageInfo_GenesisState.Merge(m, src)
    55  }
    56  func (m *GenesisState) XXX_Size() int {
    57  	return m.Size()
    58  }
    59  func (m *GenesisState) XXX_DiscardUnknown() {
    60  	xxx_messageInfo_GenesisState.DiscardUnknown(m)
    61  }
    62  
    63  var xxx_messageInfo_GenesisState proto.InternalMessageInfo
    64  
    65  func (m *GenesisState) GetAuthorization() []GrantAuthorization {
    66  	if m != nil {
    67  		return m.Authorization
    68  	}
    69  	return nil
    70  }
    71  
    72  func init() {
    73  	proto.RegisterType((*GenesisState)(nil), "cosmos.authz.v1beta1.GenesisState")
    74  }
    75  
    76  func init() {
    77  	proto.RegisterFile("cosmos/authz/v1beta1/genesis.proto", fileDescriptor_4c2fbb971da7c892)
    78  }
    79  
    80  var fileDescriptor_4c2fbb971da7c892 = []byte{
    81  	// 222 bytes of a gzipped FileDescriptorProto
    82  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4a, 0xce, 0x2f, 0xce,
    83  	0xcd, 0x2f, 0xd6, 0x4f, 0x2c, 0x2d, 0xc9, 0xa8, 0xd2, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34,
    84  	0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12,
    85  	0x81, 0xa8, 0xd1, 0x03, 0xab, 0xd1, 0x83, 0xaa, 0x91, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b,
    86  	0xd0, 0x07, 0xb1, 0x20, 0x6a, 0xa5, 0x14, 0xb0, 0x9a, 0x07, 0xd1, 0x09, 0x51, 0x21, 0x98, 0x98,
    87  	0x9b, 0x99, 0x97, 0xaf, 0x0f, 0x26, 0x21, 0x42, 0x4a, 0x99, 0x5c, 0x3c, 0xee, 0x10, 0x1b, 0x83,
    88  	0x4b, 0x12, 0x4b, 0x52, 0x85, 0x22, 0xb9, 0x78, 0x41, 0x3a, 0xf2, 0x8b, 0x32, 0xab, 0x12, 0x4b,
    89  	0x32, 0xf3, 0xf3, 0x24, 0x18, 0x15, 0x98, 0x35, 0xb8, 0x8d, 0x34, 0xf4, 0xb0, 0x39, 0x44, 0xcf,
    90  	0xbd, 0x28, 0x31, 0xaf, 0xc4, 0x11, 0x59, 0xbd, 0x13, 0xe7, 0x89, 0x7b, 0xf2, 0x0c, 0x2b, 0x9e,
    91  	0x6f, 0xd0, 0x62, 0x0c, 0x42, 0x35, 0xc9, 0xc9, 0xee, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4,
    92  	0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f,
    93  	0xe5, 0x18, 0xa2, 0x54, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xa1,
    94  	0x9e, 0x80, 0x50, 0xba, 0xc5, 0x29, 0xd9, 0xfa, 0x15, 0x10, 0x3f, 0x24, 0xb1, 0x81, 0x5d, 0x6c,
    95  	0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xc0, 0xfa, 0xde, 0xe7, 0x38, 0x01, 0x00, 0x00,
    96  }
    97  
    98  func (m *GenesisState) Marshal() (dAtA []byte, err error) {
    99  	size := m.Size()
   100  	dAtA = make([]byte, size)
   101  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   102  	if err != nil {
   103  		return nil, err
   104  	}
   105  	return dAtA[:n], nil
   106  }
   107  
   108  func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) {
   109  	size := m.Size()
   110  	return m.MarshalToSizedBuffer(dAtA[:size])
   111  }
   112  
   113  func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   114  	i := len(dAtA)
   115  	_ = i
   116  	var l int
   117  	_ = l
   118  	if len(m.Authorization) > 0 {
   119  		for iNdEx := len(m.Authorization) - 1; iNdEx >= 0; iNdEx-- {
   120  			{
   121  				size, err := m.Authorization[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   122  				if err != nil {
   123  					return 0, err
   124  				}
   125  				i -= size
   126  				i = encodeVarintGenesis(dAtA, i, uint64(size))
   127  			}
   128  			i--
   129  			dAtA[i] = 0xa
   130  		}
   131  	}
   132  	return len(dAtA) - i, nil
   133  }
   134  
   135  func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int {
   136  	offset -= sovGenesis(v)
   137  	base := offset
   138  	for v >= 1<<7 {
   139  		dAtA[offset] = uint8(v&0x7f | 0x80)
   140  		v >>= 7
   141  		offset++
   142  	}
   143  	dAtA[offset] = uint8(v)
   144  	return base
   145  }
   146  func (m *GenesisState) Size() (n int) {
   147  	if m == nil {
   148  		return 0
   149  	}
   150  	var l int
   151  	_ = l
   152  	if len(m.Authorization) > 0 {
   153  		for _, e := range m.Authorization {
   154  			l = e.Size()
   155  			n += 1 + l + sovGenesis(uint64(l))
   156  		}
   157  	}
   158  	return n
   159  }
   160  
   161  func sovGenesis(x uint64) (n int) {
   162  	return (math_bits.Len64(x|1) + 6) / 7
   163  }
   164  func sozGenesis(x uint64) (n int) {
   165  	return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   166  }
   167  func (m *GenesisState) Unmarshal(dAtA []byte) error {
   168  	l := len(dAtA)
   169  	iNdEx := 0
   170  	for iNdEx < l {
   171  		preIndex := iNdEx
   172  		var wire uint64
   173  		for shift := uint(0); ; shift += 7 {
   174  			if shift >= 64 {
   175  				return ErrIntOverflowGenesis
   176  			}
   177  			if iNdEx >= l {
   178  				return io.ErrUnexpectedEOF
   179  			}
   180  			b := dAtA[iNdEx]
   181  			iNdEx++
   182  			wire |= uint64(b&0x7F) << shift
   183  			if b < 0x80 {
   184  				break
   185  			}
   186  		}
   187  		fieldNum := int32(wire >> 3)
   188  		wireType := int(wire & 0x7)
   189  		if wireType == 4 {
   190  			return fmt.Errorf("proto: GenesisState: wiretype end group for non-group")
   191  		}
   192  		if fieldNum <= 0 {
   193  			return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire)
   194  		}
   195  		switch fieldNum {
   196  		case 1:
   197  			if wireType != 2 {
   198  				return fmt.Errorf("proto: wrong wireType = %d for field Authorization", wireType)
   199  			}
   200  			var msglen int
   201  			for shift := uint(0); ; shift += 7 {
   202  				if shift >= 64 {
   203  					return ErrIntOverflowGenesis
   204  				}
   205  				if iNdEx >= l {
   206  					return io.ErrUnexpectedEOF
   207  				}
   208  				b := dAtA[iNdEx]
   209  				iNdEx++
   210  				msglen |= int(b&0x7F) << shift
   211  				if b < 0x80 {
   212  					break
   213  				}
   214  			}
   215  			if msglen < 0 {
   216  				return ErrInvalidLengthGenesis
   217  			}
   218  			postIndex := iNdEx + msglen
   219  			if postIndex < 0 {
   220  				return ErrInvalidLengthGenesis
   221  			}
   222  			if postIndex > l {
   223  				return io.ErrUnexpectedEOF
   224  			}
   225  			m.Authorization = append(m.Authorization, GrantAuthorization{})
   226  			if err := m.Authorization[len(m.Authorization)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   227  				return err
   228  			}
   229  			iNdEx = postIndex
   230  		default:
   231  			iNdEx = preIndex
   232  			skippy, err := skipGenesis(dAtA[iNdEx:])
   233  			if err != nil {
   234  				return err
   235  			}
   236  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   237  				return ErrInvalidLengthGenesis
   238  			}
   239  			if (iNdEx + skippy) > l {
   240  				return io.ErrUnexpectedEOF
   241  			}
   242  			iNdEx += skippy
   243  		}
   244  	}
   245  
   246  	if iNdEx > l {
   247  		return io.ErrUnexpectedEOF
   248  	}
   249  	return nil
   250  }
   251  func skipGenesis(dAtA []byte) (n int, err error) {
   252  	l := len(dAtA)
   253  	iNdEx := 0
   254  	depth := 0
   255  	for iNdEx < l {
   256  		var wire uint64
   257  		for shift := uint(0); ; shift += 7 {
   258  			if shift >= 64 {
   259  				return 0, ErrIntOverflowGenesis
   260  			}
   261  			if iNdEx >= l {
   262  				return 0, io.ErrUnexpectedEOF
   263  			}
   264  			b := dAtA[iNdEx]
   265  			iNdEx++
   266  			wire |= (uint64(b) & 0x7F) << shift
   267  			if b < 0x80 {
   268  				break
   269  			}
   270  		}
   271  		wireType := int(wire & 0x7)
   272  		switch wireType {
   273  		case 0:
   274  			for shift := uint(0); ; shift += 7 {
   275  				if shift >= 64 {
   276  					return 0, ErrIntOverflowGenesis
   277  				}
   278  				if iNdEx >= l {
   279  					return 0, io.ErrUnexpectedEOF
   280  				}
   281  				iNdEx++
   282  				if dAtA[iNdEx-1] < 0x80 {
   283  					break
   284  				}
   285  			}
   286  		case 1:
   287  			iNdEx += 8
   288  		case 2:
   289  			var length int
   290  			for shift := uint(0); ; shift += 7 {
   291  				if shift >= 64 {
   292  					return 0, ErrIntOverflowGenesis
   293  				}
   294  				if iNdEx >= l {
   295  					return 0, io.ErrUnexpectedEOF
   296  				}
   297  				b := dAtA[iNdEx]
   298  				iNdEx++
   299  				length |= (int(b) & 0x7F) << shift
   300  				if b < 0x80 {
   301  					break
   302  				}
   303  			}
   304  			if length < 0 {
   305  				return 0, ErrInvalidLengthGenesis
   306  			}
   307  			iNdEx += length
   308  		case 3:
   309  			depth++
   310  		case 4:
   311  			if depth == 0 {
   312  				return 0, ErrUnexpectedEndOfGroupGenesis
   313  			}
   314  			depth--
   315  		case 5:
   316  			iNdEx += 4
   317  		default:
   318  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   319  		}
   320  		if iNdEx < 0 {
   321  			return 0, ErrInvalidLengthGenesis
   322  		}
   323  		if depth == 0 {
   324  			return iNdEx, nil
   325  		}
   326  	}
   327  	return 0, io.ErrUnexpectedEOF
   328  }
   329  
   330  var (
   331  	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
   332  	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
   333  	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
   334  )