github.com/Finschia/finschia-sdk@v0.48.1/x/capability/types/genesis.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cosmos/capability/v1beta1/genesis.proto 3 4 package types 5 6 import ( 7 fmt "fmt" 8 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 io "io" 11 math "math" 12 math_bits "math/bits" 13 ) 14 15 // Reference imports to suppress errors if they are not otherwise used. 16 var _ = proto.Marshal 17 var _ = fmt.Errorf 18 var _ = math.Inf 19 20 // This is a compile-time assertion to ensure that this generated file 21 // is compatible with the proto package it is being compiled against. 22 // A compilation error at this line likely means your copy of the 23 // proto package needs to be updated. 24 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 25 26 // GenesisOwners defines the capability owners with their corresponding index. 27 type GenesisOwners struct { 28 // index is the index of the capability owner. 29 Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` 30 // index_owners are the owners at the given index. 31 IndexOwners CapabilityOwners `protobuf:"bytes,2,opt,name=index_owners,json=indexOwners,proto3" json:"index_owners" yaml:"index_owners"` 32 } 33 34 func (m *GenesisOwners) Reset() { *m = GenesisOwners{} } 35 func (m *GenesisOwners) String() string { return proto.CompactTextString(m) } 36 func (*GenesisOwners) ProtoMessage() {} 37 func (*GenesisOwners) Descriptor() ([]byte, []int) { 38 return fileDescriptor_94922dd16a11c23e, []int{0} 39 } 40 func (m *GenesisOwners) XXX_Unmarshal(b []byte) error { 41 return m.Unmarshal(b) 42 } 43 func (m *GenesisOwners) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 44 if deterministic { 45 return xxx_messageInfo_GenesisOwners.Marshal(b, m, deterministic) 46 } else { 47 b = b[:cap(b)] 48 n, err := m.MarshalToSizedBuffer(b) 49 if err != nil { 50 return nil, err 51 } 52 return b[:n], nil 53 } 54 } 55 func (m *GenesisOwners) XXX_Merge(src proto.Message) { 56 xxx_messageInfo_GenesisOwners.Merge(m, src) 57 } 58 func (m *GenesisOwners) XXX_Size() int { 59 return m.Size() 60 } 61 func (m *GenesisOwners) XXX_DiscardUnknown() { 62 xxx_messageInfo_GenesisOwners.DiscardUnknown(m) 63 } 64 65 var xxx_messageInfo_GenesisOwners proto.InternalMessageInfo 66 67 func (m *GenesisOwners) GetIndex() uint64 { 68 if m != nil { 69 return m.Index 70 } 71 return 0 72 } 73 74 func (m *GenesisOwners) GetIndexOwners() CapabilityOwners { 75 if m != nil { 76 return m.IndexOwners 77 } 78 return CapabilityOwners{} 79 } 80 81 // GenesisState defines the capability module's genesis state. 82 type GenesisState struct { 83 // index is the capability global index. 84 Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` 85 // owners represents a map from index to owners of the capability index 86 // index key is string to allow amino marshalling. 87 Owners []GenesisOwners `protobuf:"bytes,2,rep,name=owners,proto3" json:"owners"` 88 } 89 90 func (m *GenesisState) Reset() { *m = GenesisState{} } 91 func (m *GenesisState) String() string { return proto.CompactTextString(m) } 92 func (*GenesisState) ProtoMessage() {} 93 func (*GenesisState) Descriptor() ([]byte, []int) { 94 return fileDescriptor_94922dd16a11c23e, []int{1} 95 } 96 func (m *GenesisState) XXX_Unmarshal(b []byte) error { 97 return m.Unmarshal(b) 98 } 99 func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 100 if deterministic { 101 return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) 102 } else { 103 b = b[:cap(b)] 104 n, err := m.MarshalToSizedBuffer(b) 105 if err != nil { 106 return nil, err 107 } 108 return b[:n], nil 109 } 110 } 111 func (m *GenesisState) XXX_Merge(src proto.Message) { 112 xxx_messageInfo_GenesisState.Merge(m, src) 113 } 114 func (m *GenesisState) XXX_Size() int { 115 return m.Size() 116 } 117 func (m *GenesisState) XXX_DiscardUnknown() { 118 xxx_messageInfo_GenesisState.DiscardUnknown(m) 119 } 120 121 var xxx_messageInfo_GenesisState proto.InternalMessageInfo 122 123 func (m *GenesisState) GetIndex() uint64 { 124 if m != nil { 125 return m.Index 126 } 127 return 0 128 } 129 130 func (m *GenesisState) GetOwners() []GenesisOwners { 131 if m != nil { 132 return m.Owners 133 } 134 return nil 135 } 136 137 func init() { 138 proto.RegisterType((*GenesisOwners)(nil), "cosmos.capability.v1beta1.GenesisOwners") 139 proto.RegisterType((*GenesisState)(nil), "cosmos.capability.v1beta1.GenesisState") 140 } 141 142 func init() { 143 proto.RegisterFile("cosmos/capability/v1beta1/genesis.proto", fileDescriptor_94922dd16a11c23e) 144 } 145 146 var fileDescriptor_94922dd16a11c23e = []byte{ 147 // 288 bytes of a gzipped FileDescriptorProto 148 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4f, 0xce, 0x2f, 0xce, 149 0xcd, 0x2f, 0xd6, 0x4f, 0x4e, 0x2c, 0x48, 0x4c, 0xca, 0xcc, 0xc9, 0x2c, 0xa9, 0xd4, 0x2f, 0x33, 150 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 151 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x84, 0x28, 0xd4, 0x43, 0x28, 0xd4, 0x83, 0x2a, 0x94, 0x12, 0x49, 152 0xcf, 0x4f, 0xcf, 0x07, 0xab, 0xd2, 0x07, 0xb1, 0x20, 0x1a, 0xa4, 0xb4, 0x70, 0x9b, 0x8c, 0x64, 153 0x06, 0x58, 0xad, 0xd2, 0x24, 0x46, 0x2e, 0x5e, 0x77, 0x88, 0x75, 0xfe, 0xe5, 0x79, 0xa9, 0x45, 154 0xc5, 0x42, 0x22, 0x5c, 0xac, 0x99, 0x79, 0x29, 0xa9, 0x15, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x2c, 155 0x41, 0x10, 0x8e, 0x50, 0x36, 0x17, 0x0f, 0x98, 0x11, 0x9f, 0x0f, 0x56, 0x25, 0xc1, 0xa4, 0xc0, 156 0xa8, 0xc1, 0x6d, 0xa4, 0xad, 0x87, 0xd3, 0x6d, 0x7a, 0xce, 0x70, 0x21, 0x88, 0xc1, 0x4e, 0xd2, 157 0x27, 0xee, 0xc9, 0x33, 0x7c, 0xba, 0x27, 0x2f, 0x5c, 0x99, 0x98, 0x9b, 0x63, 0xa5, 0x84, 0x6c, 158 0x9c, 0x52, 0x10, 0x37, 0x98, 0x0b, 0x51, 0xa9, 0x94, 0xc3, 0xc5, 0x03, 0x75, 0x53, 0x70, 0x49, 159 0x62, 0x49, 0x2a, 0x0e, 0x27, 0xb9, 0x71, 0xb1, 0xc1, 0x1d, 0xc3, 0xac, 0xc1, 0x6d, 0xa4, 0x81, 160 0xc7, 0x31, 0x28, 0x5e, 0x74, 0x62, 0x01, 0xb9, 0x24, 0x08, 0xaa, 0xdb, 0xc9, 0xf7, 0xc4, 0x23, 161 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 162 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x8c, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 163 0x92, 0xf3, 0x73, 0xf5, 0xdd, 0x32, 0xf3, 0x8a, 0x93, 0x33, 0x32, 0x13, 0xf5, 0xd3, 0xa0, 0x0c, 164 0xdd, 0xe2, 0x94, 0x6c, 0xfd, 0x0a, 0xe4, 0x40, 0x2e, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 165 0x07, 0xac, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x62, 0xe9, 0xc2, 0x47, 0xe0, 0x01, 0x00, 0x00, 166 } 167 168 func (m *GenesisOwners) Marshal() (dAtA []byte, err error) { 169 size := m.Size() 170 dAtA = make([]byte, size) 171 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 172 if err != nil { 173 return nil, err 174 } 175 return dAtA[:n], nil 176 } 177 178 func (m *GenesisOwners) MarshalTo(dAtA []byte) (int, error) { 179 size := m.Size() 180 return m.MarshalToSizedBuffer(dAtA[:size]) 181 } 182 183 func (m *GenesisOwners) MarshalToSizedBuffer(dAtA []byte) (int, error) { 184 i := len(dAtA) 185 _ = i 186 var l int 187 _ = l 188 { 189 size, err := m.IndexOwners.MarshalToSizedBuffer(dAtA[:i]) 190 if err != nil { 191 return 0, err 192 } 193 i -= size 194 i = encodeVarintGenesis(dAtA, i, uint64(size)) 195 } 196 i-- 197 dAtA[i] = 0x12 198 if m.Index != 0 { 199 i = encodeVarintGenesis(dAtA, i, uint64(m.Index)) 200 i-- 201 dAtA[i] = 0x8 202 } 203 return len(dAtA) - i, nil 204 } 205 206 func (m *GenesisState) Marshal() (dAtA []byte, err error) { 207 size := m.Size() 208 dAtA = make([]byte, size) 209 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 210 if err != nil { 211 return nil, err 212 } 213 return dAtA[:n], nil 214 } 215 216 func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { 217 size := m.Size() 218 return m.MarshalToSizedBuffer(dAtA[:size]) 219 } 220 221 func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { 222 i := len(dAtA) 223 _ = i 224 var l int 225 _ = l 226 if len(m.Owners) > 0 { 227 for iNdEx := len(m.Owners) - 1; iNdEx >= 0; iNdEx-- { 228 { 229 size, err := m.Owners[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 230 if err != nil { 231 return 0, err 232 } 233 i -= size 234 i = encodeVarintGenesis(dAtA, i, uint64(size)) 235 } 236 i-- 237 dAtA[i] = 0x12 238 } 239 } 240 if m.Index != 0 { 241 i = encodeVarintGenesis(dAtA, i, uint64(m.Index)) 242 i-- 243 dAtA[i] = 0x8 244 } 245 return len(dAtA) - i, nil 246 } 247 248 func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { 249 offset -= sovGenesis(v) 250 base := offset 251 for v >= 1<<7 { 252 dAtA[offset] = uint8(v&0x7f | 0x80) 253 v >>= 7 254 offset++ 255 } 256 dAtA[offset] = uint8(v) 257 return base 258 } 259 func (m *GenesisOwners) Size() (n int) { 260 if m == nil { 261 return 0 262 } 263 var l int 264 _ = l 265 if m.Index != 0 { 266 n += 1 + sovGenesis(uint64(m.Index)) 267 } 268 l = m.IndexOwners.Size() 269 n += 1 + l + sovGenesis(uint64(l)) 270 return n 271 } 272 273 func (m *GenesisState) Size() (n int) { 274 if m == nil { 275 return 0 276 } 277 var l int 278 _ = l 279 if m.Index != 0 { 280 n += 1 + sovGenesis(uint64(m.Index)) 281 } 282 if len(m.Owners) > 0 { 283 for _, e := range m.Owners { 284 l = e.Size() 285 n += 1 + l + sovGenesis(uint64(l)) 286 } 287 } 288 return n 289 } 290 291 func sovGenesis(x uint64) (n int) { 292 return (math_bits.Len64(x|1) + 6) / 7 293 } 294 func sozGenesis(x uint64) (n int) { 295 return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 296 } 297 func (m *GenesisOwners) Unmarshal(dAtA []byte) error { 298 l := len(dAtA) 299 iNdEx := 0 300 for iNdEx < l { 301 preIndex := iNdEx 302 var wire uint64 303 for shift := uint(0); ; shift += 7 { 304 if shift >= 64 { 305 return ErrIntOverflowGenesis 306 } 307 if iNdEx >= l { 308 return io.ErrUnexpectedEOF 309 } 310 b := dAtA[iNdEx] 311 iNdEx++ 312 wire |= uint64(b&0x7F) << shift 313 if b < 0x80 { 314 break 315 } 316 } 317 fieldNum := int32(wire >> 3) 318 wireType := int(wire & 0x7) 319 if wireType == 4 { 320 return fmt.Errorf("proto: GenesisOwners: wiretype end group for non-group") 321 } 322 if fieldNum <= 0 { 323 return fmt.Errorf("proto: GenesisOwners: illegal tag %d (wire type %d)", fieldNum, wire) 324 } 325 switch fieldNum { 326 case 1: 327 if wireType != 0 { 328 return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) 329 } 330 m.Index = 0 331 for shift := uint(0); ; shift += 7 { 332 if shift >= 64 { 333 return ErrIntOverflowGenesis 334 } 335 if iNdEx >= l { 336 return io.ErrUnexpectedEOF 337 } 338 b := dAtA[iNdEx] 339 iNdEx++ 340 m.Index |= uint64(b&0x7F) << shift 341 if b < 0x80 { 342 break 343 } 344 } 345 case 2: 346 if wireType != 2 { 347 return fmt.Errorf("proto: wrong wireType = %d for field IndexOwners", wireType) 348 } 349 var msglen int 350 for shift := uint(0); ; shift += 7 { 351 if shift >= 64 { 352 return ErrIntOverflowGenesis 353 } 354 if iNdEx >= l { 355 return io.ErrUnexpectedEOF 356 } 357 b := dAtA[iNdEx] 358 iNdEx++ 359 msglen |= int(b&0x7F) << shift 360 if b < 0x80 { 361 break 362 } 363 } 364 if msglen < 0 { 365 return ErrInvalidLengthGenesis 366 } 367 postIndex := iNdEx + msglen 368 if postIndex < 0 { 369 return ErrInvalidLengthGenesis 370 } 371 if postIndex > l { 372 return io.ErrUnexpectedEOF 373 } 374 if err := m.IndexOwners.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 375 return err 376 } 377 iNdEx = postIndex 378 default: 379 iNdEx = preIndex 380 skippy, err := skipGenesis(dAtA[iNdEx:]) 381 if err != nil { 382 return err 383 } 384 if (skippy < 0) || (iNdEx+skippy) < 0 { 385 return ErrInvalidLengthGenesis 386 } 387 if (iNdEx + skippy) > l { 388 return io.ErrUnexpectedEOF 389 } 390 iNdEx += skippy 391 } 392 } 393 394 if iNdEx > l { 395 return io.ErrUnexpectedEOF 396 } 397 return nil 398 } 399 func (m *GenesisState) Unmarshal(dAtA []byte) error { 400 l := len(dAtA) 401 iNdEx := 0 402 for iNdEx < l { 403 preIndex := iNdEx 404 var wire uint64 405 for shift := uint(0); ; shift += 7 { 406 if shift >= 64 { 407 return ErrIntOverflowGenesis 408 } 409 if iNdEx >= l { 410 return io.ErrUnexpectedEOF 411 } 412 b := dAtA[iNdEx] 413 iNdEx++ 414 wire |= uint64(b&0x7F) << shift 415 if b < 0x80 { 416 break 417 } 418 } 419 fieldNum := int32(wire >> 3) 420 wireType := int(wire & 0x7) 421 if wireType == 4 { 422 return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") 423 } 424 if fieldNum <= 0 { 425 return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) 426 } 427 switch fieldNum { 428 case 1: 429 if wireType != 0 { 430 return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) 431 } 432 m.Index = 0 433 for shift := uint(0); ; shift += 7 { 434 if shift >= 64 { 435 return ErrIntOverflowGenesis 436 } 437 if iNdEx >= l { 438 return io.ErrUnexpectedEOF 439 } 440 b := dAtA[iNdEx] 441 iNdEx++ 442 m.Index |= uint64(b&0x7F) << shift 443 if b < 0x80 { 444 break 445 } 446 } 447 case 2: 448 if wireType != 2 { 449 return fmt.Errorf("proto: wrong wireType = %d for field Owners", wireType) 450 } 451 var msglen int 452 for shift := uint(0); ; shift += 7 { 453 if shift >= 64 { 454 return ErrIntOverflowGenesis 455 } 456 if iNdEx >= l { 457 return io.ErrUnexpectedEOF 458 } 459 b := dAtA[iNdEx] 460 iNdEx++ 461 msglen |= int(b&0x7F) << shift 462 if b < 0x80 { 463 break 464 } 465 } 466 if msglen < 0 { 467 return ErrInvalidLengthGenesis 468 } 469 postIndex := iNdEx + msglen 470 if postIndex < 0 { 471 return ErrInvalidLengthGenesis 472 } 473 if postIndex > l { 474 return io.ErrUnexpectedEOF 475 } 476 m.Owners = append(m.Owners, GenesisOwners{}) 477 if err := m.Owners[len(m.Owners)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 478 return err 479 } 480 iNdEx = postIndex 481 default: 482 iNdEx = preIndex 483 skippy, err := skipGenesis(dAtA[iNdEx:]) 484 if err != nil { 485 return err 486 } 487 if (skippy < 0) || (iNdEx+skippy) < 0 { 488 return ErrInvalidLengthGenesis 489 } 490 if (iNdEx + skippy) > l { 491 return io.ErrUnexpectedEOF 492 } 493 iNdEx += skippy 494 } 495 } 496 497 if iNdEx > l { 498 return io.ErrUnexpectedEOF 499 } 500 return nil 501 } 502 func skipGenesis(dAtA []byte) (n int, err error) { 503 l := len(dAtA) 504 iNdEx := 0 505 depth := 0 506 for iNdEx < l { 507 var wire uint64 508 for shift := uint(0); ; shift += 7 { 509 if shift >= 64 { 510 return 0, ErrIntOverflowGenesis 511 } 512 if iNdEx >= l { 513 return 0, io.ErrUnexpectedEOF 514 } 515 b := dAtA[iNdEx] 516 iNdEx++ 517 wire |= (uint64(b) & 0x7F) << shift 518 if b < 0x80 { 519 break 520 } 521 } 522 wireType := int(wire & 0x7) 523 switch wireType { 524 case 0: 525 for shift := uint(0); ; shift += 7 { 526 if shift >= 64 { 527 return 0, ErrIntOverflowGenesis 528 } 529 if iNdEx >= l { 530 return 0, io.ErrUnexpectedEOF 531 } 532 iNdEx++ 533 if dAtA[iNdEx-1] < 0x80 { 534 break 535 } 536 } 537 case 1: 538 iNdEx += 8 539 case 2: 540 var length int 541 for shift := uint(0); ; shift += 7 { 542 if shift >= 64 { 543 return 0, ErrIntOverflowGenesis 544 } 545 if iNdEx >= l { 546 return 0, io.ErrUnexpectedEOF 547 } 548 b := dAtA[iNdEx] 549 iNdEx++ 550 length |= (int(b) & 0x7F) << shift 551 if b < 0x80 { 552 break 553 } 554 } 555 if length < 0 { 556 return 0, ErrInvalidLengthGenesis 557 } 558 iNdEx += length 559 case 3: 560 depth++ 561 case 4: 562 if depth == 0 { 563 return 0, ErrUnexpectedEndOfGroupGenesis 564 } 565 depth-- 566 case 5: 567 iNdEx += 4 568 default: 569 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 570 } 571 if iNdEx < 0 { 572 return 0, ErrInvalidLengthGenesis 573 } 574 if depth == 0 { 575 return iNdEx, nil 576 } 577 } 578 return 0, io.ErrUnexpectedEOF 579 } 580 581 var ( 582 ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") 583 ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") 584 ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") 585 )