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