github.com/gogo/protobuf@v1.3.2/test/issue260/issue260.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: issue260.proto 3 4 package issue260 5 6 import ( 7 fmt "fmt" 8 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 _ "github.com/gogo/protobuf/types" 11 github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" 12 io "io" 13 math "math" 14 math_bits "math/bits" 15 time "time" 16 ) 17 18 // Reference imports to suppress errors if they are not otherwise used. 19 var _ = proto.Marshal 20 var _ = fmt.Errorf 21 var _ = math.Inf 22 var _ = time.Kitchen 23 24 // This is a compile-time assertion to ensure that this generated file 25 // is compatible with the proto package it is being compiled against. 26 // A compilation error at this line likely means your copy of the 27 // proto package needs to be updated. 28 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 29 30 func (m *Dropped) Reset() { *m = Dropped{} } 31 func (m *Dropped) String() string { return proto.CompactTextString(m) } 32 func (*Dropped) ProtoMessage() {} 33 func (*Dropped) Descriptor() ([]byte, []int) { 34 return fileDescriptor_750763c054810c1d, []int{0} 35 } 36 func (m *Dropped) XXX_Unmarshal(b []byte) error { 37 return m.Unmarshal(b) 38 } 39 func (m *Dropped) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 40 if deterministic { 41 return xxx_messageInfo_Dropped.Marshal(b, m, deterministic) 42 } else { 43 b = b[:cap(b)] 44 n, err := m.MarshalToSizedBuffer(b) 45 if err != nil { 46 return nil, err 47 } 48 return b[:n], nil 49 } 50 } 51 func (m *Dropped) XXX_Merge(src proto.Message) { 52 xxx_messageInfo_Dropped.Merge(m, src) 53 } 54 func (m *Dropped) XXX_Size() int { 55 return m.Size() 56 } 57 func (m *Dropped) XXX_DiscardUnknown() { 58 xxx_messageInfo_Dropped.DiscardUnknown(m) 59 } 60 61 var xxx_messageInfo_Dropped proto.InternalMessageInfo 62 63 func (m *Dropped) GetName() string { 64 if m != nil { 65 return m.Name 66 } 67 return "" 68 } 69 70 func (m *Dropped) GetAge() int32 { 71 if m != nil { 72 return m.Age 73 } 74 return 0 75 } 76 77 func (m *DroppedWithoutGetters) Reset() { *m = DroppedWithoutGetters{} } 78 func (m *DroppedWithoutGetters) String() string { return proto.CompactTextString(m) } 79 func (*DroppedWithoutGetters) ProtoMessage() {} 80 func (*DroppedWithoutGetters) Descriptor() ([]byte, []int) { 81 return fileDescriptor_750763c054810c1d, []int{1} 82 } 83 func (m *DroppedWithoutGetters) XXX_Unmarshal(b []byte) error { 84 return m.Unmarshal(b) 85 } 86 func (m *DroppedWithoutGetters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 87 if deterministic { 88 return xxx_messageInfo_DroppedWithoutGetters.Marshal(b, m, deterministic) 89 } else { 90 b = b[:cap(b)] 91 n, err := m.MarshalToSizedBuffer(b) 92 if err != nil { 93 return nil, err 94 } 95 return b[:n], nil 96 } 97 } 98 func (m *DroppedWithoutGetters) XXX_Merge(src proto.Message) { 99 xxx_messageInfo_DroppedWithoutGetters.Merge(m, src) 100 } 101 func (m *DroppedWithoutGetters) XXX_Size() int { 102 return m.Size() 103 } 104 func (m *DroppedWithoutGetters) XXX_DiscardUnknown() { 105 xxx_messageInfo_DroppedWithoutGetters.DiscardUnknown(m) 106 } 107 108 var xxx_messageInfo_DroppedWithoutGetters proto.InternalMessageInfo 109 110 type Kept struct { 111 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 112 Age int32 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` 113 XXX_NoUnkeyedLiteral struct{} `json:"-"` 114 XXX_sizecache int32 `json:"-"` 115 } 116 117 func (m *Kept) Reset() { *m = Kept{} } 118 func (m *Kept) String() string { return proto.CompactTextString(m) } 119 func (*Kept) ProtoMessage() {} 120 func (*Kept) Descriptor() ([]byte, []int) { 121 return fileDescriptor_750763c054810c1d, []int{2} 122 } 123 func (m *Kept) XXX_Unmarshal(b []byte) error { 124 return m.Unmarshal(b) 125 } 126 func (m *Kept) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 127 if deterministic { 128 return xxx_messageInfo_Kept.Marshal(b, m, deterministic) 129 } else { 130 b = b[:cap(b)] 131 n, err := m.MarshalToSizedBuffer(b) 132 if err != nil { 133 return nil, err 134 } 135 return b[:n], nil 136 } 137 } 138 func (m *Kept) XXX_Merge(src proto.Message) { 139 xxx_messageInfo_Kept.Merge(m, src) 140 } 141 func (m *Kept) XXX_Size() int { 142 return m.Size() 143 } 144 func (m *Kept) XXX_DiscardUnknown() { 145 xxx_messageInfo_Kept.DiscardUnknown(m) 146 } 147 148 var xxx_messageInfo_Kept proto.InternalMessageInfo 149 150 func (m *Kept) GetName() string { 151 if m != nil { 152 return m.Name 153 } 154 return "" 155 } 156 157 func (m *Kept) GetAge() int32 { 158 if m != nil { 159 return m.Age 160 } 161 return 0 162 } 163 164 func init() { 165 proto.RegisterType((*Dropped)(nil), "issue260.Dropped") 166 proto.RegisterType((*DroppedWithoutGetters)(nil), "issue260.DroppedWithoutGetters") 167 proto.RegisterType((*Kept)(nil), "issue260.Kept") 168 } 169 170 func init() { proto.RegisterFile("issue260.proto", fileDescriptor_750763c054810c1d) } 171 172 var fileDescriptor_750763c054810c1d = []byte{ 173 // 307 bytes of a gzipped FileDescriptorProto 174 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e, 175 0x4d, 0x35, 0x32, 0x33, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, 176 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 177 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x94, 0x92, 0x4f, 0xcf, 178 0xcf, 0x4f, 0xcf, 0x49, 0x45, 0xa8, 0x2a, 0xc9, 0xcc, 0x4d, 0x2d, 0x2e, 0x49, 0xcc, 0x2d, 0x80, 179 0x28, 0x50, 0x32, 0xe5, 0x62, 0x77, 0x29, 0xca, 0x2f, 0x28, 0x48, 0x4d, 0x11, 0x12, 0xe2, 0x62, 180 0xc9, 0x4b, 0xcc, 0x4d, 0x95, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x02, 0xb3, 0x85, 0x04, 0xb8, 181 0x98, 0x13, 0xd3, 0x53, 0x25, 0x98, 0x14, 0x18, 0x35, 0x58, 0x83, 0x40, 0x4c, 0x2b, 0x96, 0x0f, 182 0x0b, 0xe5, 0x19, 0x94, 0x26, 0x33, 0x72, 0x89, 0x42, 0xf5, 0x85, 0x67, 0x96, 0x64, 0xe4, 0x97, 183 0x96, 0xb8, 0xa7, 0x96, 0x94, 0xa4, 0x16, 0x15, 0x0b, 0x89, 0x71, 0xb1, 0x65, 0xa4, 0x66, 0xa6, 184 0x67, 0x94, 0x80, 0xcd, 0x61, 0x0e, 0x82, 0xf2, 0x84, 0x44, 0xb8, 0x58, 0xcb, 0x33, 0x53, 0x4a, 185 0x32, 0xc0, 0x66, 0x31, 0x07, 0x41, 0x38, 0x42, 0x4e, 0x5c, 0x9c, 0x70, 0x17, 0x49, 0x30, 0x2b, 186 0x30, 0x6a, 0x70, 0x1b, 0x49, 0xe9, 0x41, 0xdc, 0xac, 0x07, 0x73, 0xb3, 0x5e, 0x08, 0x4c, 0x85, 187 0x13, 0xc7, 0x89, 0x7b, 0xf2, 0x0c, 0x13, 0xee, 0xcb, 0x33, 0x06, 0x21, 0xb4, 0x59, 0x71, 0x74, 188 0x2c, 0x90, 0x67, 0x00, 0xbb, 0x4a, 0x87, 0x8b, 0xc5, 0x3b, 0xb5, 0xa0, 0x84, 0x38, 0x9f, 0x38, 189 0xe9, 0x3c, 0x78, 0x28, 0xc7, 0xf8, 0xe3, 0xa1, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x1e, 190 0xc9, 0x31, 0x1e, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 191 0x1e, 0xc9, 0x31, 0xfe, 0x78, 0x24, 0xc7, 0xd0, 0xf0, 0x58, 0x8e, 0x61, 0xc2, 0x63, 0x39, 0x86, 192 0x24, 0x36, 0xb0, 0x73, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3e, 0x88, 0xbf, 0x62, 0x9b, 193 0x01, 0x00, 0x00, 194 } 195 196 func (this *Dropped) VerboseEqual(that interface{}) error { 197 if that == nil { 198 if this == nil { 199 return nil 200 } 201 return fmt.Errorf("that == nil && this != nil") 202 } 203 204 that1, ok := that.(*Dropped) 205 if !ok { 206 that2, ok := that.(Dropped) 207 if ok { 208 that1 = &that2 209 } else { 210 return fmt.Errorf("that is not of type *Dropped") 211 } 212 } 213 if that1 == nil { 214 if this == nil { 215 return nil 216 } 217 return fmt.Errorf("that is type *Dropped but is nil && this != nil") 218 } else if this == nil { 219 return fmt.Errorf("that is type *Dropped but is not nil && this == nil") 220 } 221 if this.Name != that1.Name { 222 return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) 223 } 224 if this.Age != that1.Age { 225 return fmt.Errorf("Age this(%v) Not Equal that(%v)", this.Age, that1.Age) 226 } 227 return nil 228 } 229 func (this *Dropped) Equal(that interface{}) bool { 230 if that == nil { 231 return this == nil 232 } 233 234 that1, ok := that.(*Dropped) 235 if !ok { 236 that2, ok := that.(Dropped) 237 if ok { 238 that1 = &that2 239 } else { 240 return false 241 } 242 } 243 if that1 == nil { 244 return this == nil 245 } else if this == nil { 246 return false 247 } 248 if this.Name != that1.Name { 249 return false 250 } 251 if this.Age != that1.Age { 252 return false 253 } 254 return true 255 } 256 func (this *DroppedWithoutGetters) VerboseEqual(that interface{}) error { 257 if that == nil { 258 if this == nil { 259 return nil 260 } 261 return fmt.Errorf("that == nil && this != nil") 262 } 263 264 that1, ok := that.(*DroppedWithoutGetters) 265 if !ok { 266 that2, ok := that.(DroppedWithoutGetters) 267 if ok { 268 that1 = &that2 269 } else { 270 return fmt.Errorf("that is not of type *DroppedWithoutGetters") 271 } 272 } 273 if that1 == nil { 274 if this == nil { 275 return nil 276 } 277 return fmt.Errorf("that is type *DroppedWithoutGetters but is nil && this != nil") 278 } else if this == nil { 279 return fmt.Errorf("that is type *DroppedWithoutGetters but is not nil && this == nil") 280 } 281 if this.Height != that1.Height { 282 return fmt.Errorf("Height this(%v) Not Equal that(%v)", this.Height, that1.Height) 283 } 284 if this.Width != that1.Width { 285 return fmt.Errorf("Width this(%v) Not Equal that(%v)", this.Width, that1.Width) 286 } 287 if !this.Timestamp.Equal(that1.Timestamp) { 288 return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) 289 } 290 return nil 291 } 292 func (this *DroppedWithoutGetters) Equal(that interface{}) bool { 293 if that == nil { 294 return this == nil 295 } 296 297 that1, ok := that.(*DroppedWithoutGetters) 298 if !ok { 299 that2, ok := that.(DroppedWithoutGetters) 300 if ok { 301 that1 = &that2 302 } else { 303 return false 304 } 305 } 306 if that1 == nil { 307 return this == nil 308 } else if this == nil { 309 return false 310 } 311 if this.Height != that1.Height { 312 return false 313 } 314 if this.Width != that1.Width { 315 return false 316 } 317 if !this.Timestamp.Equal(that1.Timestamp) { 318 return false 319 } 320 return true 321 } 322 func (this *Kept) VerboseEqual(that interface{}) error { 323 if that == nil { 324 if this == nil { 325 return nil 326 } 327 return fmt.Errorf("that == nil && this != nil") 328 } 329 330 that1, ok := that.(*Kept) 331 if !ok { 332 that2, ok := that.(Kept) 333 if ok { 334 that1 = &that2 335 } else { 336 return fmt.Errorf("that is not of type *Kept") 337 } 338 } 339 if that1 == nil { 340 if this == nil { 341 return nil 342 } 343 return fmt.Errorf("that is type *Kept but is nil && this != nil") 344 } else if this == nil { 345 return fmt.Errorf("that is type *Kept but is not nil && this == nil") 346 } 347 if this.Name != that1.Name { 348 return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) 349 } 350 if this.Age != that1.Age { 351 return fmt.Errorf("Age this(%v) Not Equal that(%v)", this.Age, that1.Age) 352 } 353 return nil 354 } 355 func (this *Kept) Equal(that interface{}) bool { 356 if that == nil { 357 return this == nil 358 } 359 360 that1, ok := that.(*Kept) 361 if !ok { 362 that2, ok := that.(Kept) 363 if ok { 364 that1 = &that2 365 } else { 366 return false 367 } 368 } 369 if that1 == nil { 370 return this == nil 371 } else if this == nil { 372 return false 373 } 374 if this.Name != that1.Name { 375 return false 376 } 377 if this.Age != that1.Age { 378 return false 379 } 380 return true 381 } 382 func (m *Dropped) Marshal() (dAtA []byte, err error) { 383 size := m.Size() 384 dAtA = make([]byte, size) 385 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 386 if err != nil { 387 return nil, err 388 } 389 return dAtA[:n], nil 390 } 391 392 func (m *Dropped) MarshalTo(dAtA []byte) (int, error) { 393 size := m.Size() 394 return m.MarshalToSizedBuffer(dAtA[:size]) 395 } 396 397 func (m *Dropped) MarshalToSizedBuffer(dAtA []byte) (int, error) { 398 i := len(dAtA) 399 _ = i 400 var l int 401 _ = l 402 if m.Age != 0 { 403 i = encodeVarintIssue260(dAtA, i, uint64(m.Age)) 404 i-- 405 dAtA[i] = 0x10 406 } 407 if len(m.Name) > 0 { 408 i -= len(m.Name) 409 copy(dAtA[i:], m.Name) 410 i = encodeVarintIssue260(dAtA, i, uint64(len(m.Name))) 411 i-- 412 dAtA[i] = 0xa 413 } 414 return len(dAtA) - i, nil 415 } 416 417 func (m *DroppedWithoutGetters) Marshal() (dAtA []byte, err error) { 418 size := m.Size() 419 dAtA = make([]byte, size) 420 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 421 if err != nil { 422 return nil, err 423 } 424 return dAtA[:n], nil 425 } 426 427 func (m *DroppedWithoutGetters) MarshalTo(dAtA []byte) (int, error) { 428 size := m.Size() 429 return m.MarshalToSizedBuffer(dAtA[:size]) 430 } 431 432 func (m *DroppedWithoutGetters) MarshalToSizedBuffer(dAtA []byte) (int, error) { 433 i := len(dAtA) 434 _ = i 435 var l int 436 _ = l 437 n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) 438 if err1 != nil { 439 return 0, err1 440 } 441 i -= n1 442 i = encodeVarintIssue260(dAtA, i, uint64(n1)) 443 i-- 444 dAtA[i] = 0x1a 445 if m.Width != 0 { 446 i = encodeVarintIssue260(dAtA, i, uint64(m.Width)) 447 i-- 448 dAtA[i] = 0x10 449 } 450 if m.Height != 0 { 451 i = encodeVarintIssue260(dAtA, i, uint64(m.Height)) 452 i-- 453 dAtA[i] = 0x8 454 } 455 return len(dAtA) - i, nil 456 } 457 458 func (m *Kept) Marshal() (dAtA []byte, err error) { 459 size := m.Size() 460 dAtA = make([]byte, size) 461 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 462 if err != nil { 463 return nil, err 464 } 465 return dAtA[:n], nil 466 } 467 468 func (m *Kept) MarshalTo(dAtA []byte) (int, error) { 469 size := m.Size() 470 return m.MarshalToSizedBuffer(dAtA[:size]) 471 } 472 473 func (m *Kept) MarshalToSizedBuffer(dAtA []byte) (int, error) { 474 i := len(dAtA) 475 _ = i 476 var l int 477 _ = l 478 if m.Age != 0 { 479 i = encodeVarintIssue260(dAtA, i, uint64(m.Age)) 480 i-- 481 dAtA[i] = 0x10 482 } 483 if len(m.Name) > 0 { 484 i -= len(m.Name) 485 copy(dAtA[i:], m.Name) 486 i = encodeVarintIssue260(dAtA, i, uint64(len(m.Name))) 487 i-- 488 dAtA[i] = 0xa 489 } 490 return len(dAtA) - i, nil 491 } 492 493 func encodeVarintIssue260(dAtA []byte, offset int, v uint64) int { 494 offset -= sovIssue260(v) 495 base := offset 496 for v >= 1<<7 { 497 dAtA[offset] = uint8(v&0x7f | 0x80) 498 v >>= 7 499 offset++ 500 } 501 dAtA[offset] = uint8(v) 502 return base 503 } 504 func NewPopulatedDropped(r randyIssue260, easy bool) *Dropped { 505 this := &Dropped{} 506 this.Name = string(randStringIssue260(r)) 507 this.Age = int32(r.Int31()) 508 if r.Intn(2) == 0 { 509 this.Age *= -1 510 } 511 if !easy && r.Intn(10) != 0 { 512 } 513 return this 514 } 515 516 func NewPopulatedDroppedWithoutGetters(r randyIssue260, easy bool) *DroppedWithoutGetters { 517 this := &DroppedWithoutGetters{} 518 this.Height = int64(r.Int63()) 519 if r.Intn(2) == 0 { 520 this.Height *= -1 521 } 522 this.Width = int64(r.Int63()) 523 if r.Intn(2) == 0 { 524 this.Width *= -1 525 } 526 v1 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) 527 this.Timestamp = *v1 528 if !easy && r.Intn(10) != 0 { 529 } 530 return this 531 } 532 533 func NewPopulatedKept(r randyIssue260, easy bool) *Kept { 534 this := &Kept{} 535 this.Name = string(randStringIssue260(r)) 536 this.Age = int32(r.Int31()) 537 if r.Intn(2) == 0 { 538 this.Age *= -1 539 } 540 if !easy && r.Intn(10) != 0 { 541 } 542 return this 543 } 544 545 type randyIssue260 interface { 546 Float32() float32 547 Float64() float64 548 Int63() int64 549 Int31() int32 550 Uint32() uint32 551 Intn(n int) int 552 } 553 554 func randUTF8RuneIssue260(r randyIssue260) rune { 555 ru := r.Intn(62) 556 if ru < 10 { 557 return rune(ru + 48) 558 } else if ru < 36 { 559 return rune(ru + 55) 560 } 561 return rune(ru + 61) 562 } 563 func randStringIssue260(r randyIssue260) string { 564 v2 := r.Intn(100) 565 tmps := make([]rune, v2) 566 for i := 0; i < v2; i++ { 567 tmps[i] = randUTF8RuneIssue260(r) 568 } 569 return string(tmps) 570 } 571 func randUnrecognizedIssue260(r randyIssue260, maxFieldNumber int) (dAtA []byte) { 572 l := r.Intn(5) 573 for i := 0; i < l; i++ { 574 wire := r.Intn(4) 575 if wire == 3 { 576 wire = 5 577 } 578 fieldNumber := maxFieldNumber + r.Intn(100) 579 dAtA = randFieldIssue260(dAtA, r, fieldNumber, wire) 580 } 581 return dAtA 582 } 583 func randFieldIssue260(dAtA []byte, r randyIssue260, fieldNumber int, wire int) []byte { 584 key := uint32(fieldNumber)<<3 | uint32(wire) 585 switch wire { 586 case 0: 587 dAtA = encodeVarintPopulateIssue260(dAtA, uint64(key)) 588 v3 := r.Int63() 589 if r.Intn(2) == 0 { 590 v3 *= -1 591 } 592 dAtA = encodeVarintPopulateIssue260(dAtA, uint64(v3)) 593 case 1: 594 dAtA = encodeVarintPopulateIssue260(dAtA, uint64(key)) 595 dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) 596 case 2: 597 dAtA = encodeVarintPopulateIssue260(dAtA, uint64(key)) 598 ll := r.Intn(100) 599 dAtA = encodeVarintPopulateIssue260(dAtA, uint64(ll)) 600 for j := 0; j < ll; j++ { 601 dAtA = append(dAtA, byte(r.Intn(256))) 602 } 603 default: 604 dAtA = encodeVarintPopulateIssue260(dAtA, uint64(key)) 605 dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) 606 } 607 return dAtA 608 } 609 func encodeVarintPopulateIssue260(dAtA []byte, v uint64) []byte { 610 for v >= 1<<7 { 611 dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) 612 v >>= 7 613 } 614 dAtA = append(dAtA, uint8(v)) 615 return dAtA 616 } 617 func (m *Dropped) Size() (n int) { 618 if m == nil { 619 return 0 620 } 621 var l int 622 _ = l 623 l = len(m.Name) 624 if l > 0 { 625 n += 1 + l + sovIssue260(uint64(l)) 626 } 627 if m.Age != 0 { 628 n += 1 + sovIssue260(uint64(m.Age)) 629 } 630 return n 631 } 632 633 func (m *DroppedWithoutGetters) Size() (n int) { 634 if m == nil { 635 return 0 636 } 637 var l int 638 _ = l 639 if m.Height != 0 { 640 n += 1 + sovIssue260(uint64(m.Height)) 641 } 642 if m.Width != 0 { 643 n += 1 + sovIssue260(uint64(m.Width)) 644 } 645 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) 646 n += 1 + l + sovIssue260(uint64(l)) 647 return n 648 } 649 650 func (m *Kept) Size() (n int) { 651 if m == nil { 652 return 0 653 } 654 var l int 655 _ = l 656 l = len(m.Name) 657 if l > 0 { 658 n += 1 + l + sovIssue260(uint64(l)) 659 } 660 if m.Age != 0 { 661 n += 1 + sovIssue260(uint64(m.Age)) 662 } 663 return n 664 } 665 666 func sovIssue260(x uint64) (n int) { 667 return (math_bits.Len64(x|1) + 6) / 7 668 } 669 func sozIssue260(x uint64) (n int) { 670 return sovIssue260(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 671 } 672 func (m *Dropped) Unmarshal(dAtA []byte) error { 673 l := len(dAtA) 674 iNdEx := 0 675 for iNdEx < l { 676 preIndex := iNdEx 677 var wire uint64 678 for shift := uint(0); ; shift += 7 { 679 if shift >= 64 { 680 return ErrIntOverflowIssue260 681 } 682 if iNdEx >= l { 683 return io.ErrUnexpectedEOF 684 } 685 b := dAtA[iNdEx] 686 iNdEx++ 687 wire |= uint64(b&0x7F) << shift 688 if b < 0x80 { 689 break 690 } 691 } 692 fieldNum := int32(wire >> 3) 693 wireType := int(wire & 0x7) 694 if wireType == 4 { 695 return fmt.Errorf("proto: Dropped: wiretype end group for non-group") 696 } 697 if fieldNum <= 0 { 698 return fmt.Errorf("proto: Dropped: illegal tag %d (wire type %d)", fieldNum, wire) 699 } 700 switch fieldNum { 701 case 1: 702 if wireType != 2 { 703 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 704 } 705 var stringLen uint64 706 for shift := uint(0); ; shift += 7 { 707 if shift >= 64 { 708 return ErrIntOverflowIssue260 709 } 710 if iNdEx >= l { 711 return io.ErrUnexpectedEOF 712 } 713 b := dAtA[iNdEx] 714 iNdEx++ 715 stringLen |= uint64(b&0x7F) << shift 716 if b < 0x80 { 717 break 718 } 719 } 720 intStringLen := int(stringLen) 721 if intStringLen < 0 { 722 return ErrInvalidLengthIssue260 723 } 724 postIndex := iNdEx + intStringLen 725 if postIndex < 0 { 726 return ErrInvalidLengthIssue260 727 } 728 if postIndex > l { 729 return io.ErrUnexpectedEOF 730 } 731 m.Name = string(dAtA[iNdEx:postIndex]) 732 iNdEx = postIndex 733 case 2: 734 if wireType != 0 { 735 return fmt.Errorf("proto: wrong wireType = %d for field Age", wireType) 736 } 737 m.Age = 0 738 for shift := uint(0); ; shift += 7 { 739 if shift >= 64 { 740 return ErrIntOverflowIssue260 741 } 742 if iNdEx >= l { 743 return io.ErrUnexpectedEOF 744 } 745 b := dAtA[iNdEx] 746 iNdEx++ 747 m.Age |= int32(b&0x7F) << shift 748 if b < 0x80 { 749 break 750 } 751 } 752 default: 753 iNdEx = preIndex 754 skippy, err := skipIssue260(dAtA[iNdEx:]) 755 if err != nil { 756 return err 757 } 758 if (skippy < 0) || (iNdEx+skippy) < 0 { 759 return ErrInvalidLengthIssue260 760 } 761 if (iNdEx + skippy) > l { 762 return io.ErrUnexpectedEOF 763 } 764 iNdEx += skippy 765 } 766 } 767 768 if iNdEx > l { 769 return io.ErrUnexpectedEOF 770 } 771 return nil 772 } 773 func (m *DroppedWithoutGetters) Unmarshal(dAtA []byte) error { 774 l := len(dAtA) 775 iNdEx := 0 776 for iNdEx < l { 777 preIndex := iNdEx 778 var wire uint64 779 for shift := uint(0); ; shift += 7 { 780 if shift >= 64 { 781 return ErrIntOverflowIssue260 782 } 783 if iNdEx >= l { 784 return io.ErrUnexpectedEOF 785 } 786 b := dAtA[iNdEx] 787 iNdEx++ 788 wire |= uint64(b&0x7F) << shift 789 if b < 0x80 { 790 break 791 } 792 } 793 fieldNum := int32(wire >> 3) 794 wireType := int(wire & 0x7) 795 if wireType == 4 { 796 return fmt.Errorf("proto: DroppedWithoutGetters: wiretype end group for non-group") 797 } 798 if fieldNum <= 0 { 799 return fmt.Errorf("proto: DroppedWithoutGetters: illegal tag %d (wire type %d)", fieldNum, wire) 800 } 801 switch fieldNum { 802 case 1: 803 if wireType != 0 { 804 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 805 } 806 m.Height = 0 807 for shift := uint(0); ; shift += 7 { 808 if shift >= 64 { 809 return ErrIntOverflowIssue260 810 } 811 if iNdEx >= l { 812 return io.ErrUnexpectedEOF 813 } 814 b := dAtA[iNdEx] 815 iNdEx++ 816 m.Height |= int64(b&0x7F) << shift 817 if b < 0x80 { 818 break 819 } 820 } 821 case 2: 822 if wireType != 0 { 823 return fmt.Errorf("proto: wrong wireType = %d for field Width", wireType) 824 } 825 m.Width = 0 826 for shift := uint(0); ; shift += 7 { 827 if shift >= 64 { 828 return ErrIntOverflowIssue260 829 } 830 if iNdEx >= l { 831 return io.ErrUnexpectedEOF 832 } 833 b := dAtA[iNdEx] 834 iNdEx++ 835 m.Width |= int64(b&0x7F) << shift 836 if b < 0x80 { 837 break 838 } 839 } 840 case 3: 841 if wireType != 2 { 842 return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) 843 } 844 var msglen int 845 for shift := uint(0); ; shift += 7 { 846 if shift >= 64 { 847 return ErrIntOverflowIssue260 848 } 849 if iNdEx >= l { 850 return io.ErrUnexpectedEOF 851 } 852 b := dAtA[iNdEx] 853 iNdEx++ 854 msglen |= int(b&0x7F) << shift 855 if b < 0x80 { 856 break 857 } 858 } 859 if msglen < 0 { 860 return ErrInvalidLengthIssue260 861 } 862 postIndex := iNdEx + msglen 863 if postIndex < 0 { 864 return ErrInvalidLengthIssue260 865 } 866 if postIndex > l { 867 return io.ErrUnexpectedEOF 868 } 869 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { 870 return err 871 } 872 iNdEx = postIndex 873 default: 874 iNdEx = preIndex 875 skippy, err := skipIssue260(dAtA[iNdEx:]) 876 if err != nil { 877 return err 878 } 879 if (skippy < 0) || (iNdEx+skippy) < 0 { 880 return ErrInvalidLengthIssue260 881 } 882 if (iNdEx + skippy) > l { 883 return io.ErrUnexpectedEOF 884 } 885 iNdEx += skippy 886 } 887 } 888 889 if iNdEx > l { 890 return io.ErrUnexpectedEOF 891 } 892 return nil 893 } 894 func (m *Kept) Unmarshal(dAtA []byte) error { 895 l := len(dAtA) 896 iNdEx := 0 897 for iNdEx < l { 898 preIndex := iNdEx 899 var wire uint64 900 for shift := uint(0); ; shift += 7 { 901 if shift >= 64 { 902 return ErrIntOverflowIssue260 903 } 904 if iNdEx >= l { 905 return io.ErrUnexpectedEOF 906 } 907 b := dAtA[iNdEx] 908 iNdEx++ 909 wire |= uint64(b&0x7F) << shift 910 if b < 0x80 { 911 break 912 } 913 } 914 fieldNum := int32(wire >> 3) 915 wireType := int(wire & 0x7) 916 if wireType == 4 { 917 return fmt.Errorf("proto: Kept: wiretype end group for non-group") 918 } 919 if fieldNum <= 0 { 920 return fmt.Errorf("proto: Kept: illegal tag %d (wire type %d)", fieldNum, wire) 921 } 922 switch fieldNum { 923 case 1: 924 if wireType != 2 { 925 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 926 } 927 var stringLen uint64 928 for shift := uint(0); ; shift += 7 { 929 if shift >= 64 { 930 return ErrIntOverflowIssue260 931 } 932 if iNdEx >= l { 933 return io.ErrUnexpectedEOF 934 } 935 b := dAtA[iNdEx] 936 iNdEx++ 937 stringLen |= uint64(b&0x7F) << shift 938 if b < 0x80 { 939 break 940 } 941 } 942 intStringLen := int(stringLen) 943 if intStringLen < 0 { 944 return ErrInvalidLengthIssue260 945 } 946 postIndex := iNdEx + intStringLen 947 if postIndex < 0 { 948 return ErrInvalidLengthIssue260 949 } 950 if postIndex > l { 951 return io.ErrUnexpectedEOF 952 } 953 m.Name = string(dAtA[iNdEx:postIndex]) 954 iNdEx = postIndex 955 case 2: 956 if wireType != 0 { 957 return fmt.Errorf("proto: wrong wireType = %d for field Age", wireType) 958 } 959 m.Age = 0 960 for shift := uint(0); ; shift += 7 { 961 if shift >= 64 { 962 return ErrIntOverflowIssue260 963 } 964 if iNdEx >= l { 965 return io.ErrUnexpectedEOF 966 } 967 b := dAtA[iNdEx] 968 iNdEx++ 969 m.Age |= int32(b&0x7F) << shift 970 if b < 0x80 { 971 break 972 } 973 } 974 default: 975 iNdEx = preIndex 976 skippy, err := skipIssue260(dAtA[iNdEx:]) 977 if err != nil { 978 return err 979 } 980 if (skippy < 0) || (iNdEx+skippy) < 0 { 981 return ErrInvalidLengthIssue260 982 } 983 if (iNdEx + skippy) > l { 984 return io.ErrUnexpectedEOF 985 } 986 iNdEx += skippy 987 } 988 } 989 990 if iNdEx > l { 991 return io.ErrUnexpectedEOF 992 } 993 return nil 994 } 995 func skipIssue260(dAtA []byte) (n int, err error) { 996 l := len(dAtA) 997 iNdEx := 0 998 depth := 0 999 for iNdEx < l { 1000 var wire uint64 1001 for shift := uint(0); ; shift += 7 { 1002 if shift >= 64 { 1003 return 0, ErrIntOverflowIssue260 1004 } 1005 if iNdEx >= l { 1006 return 0, io.ErrUnexpectedEOF 1007 } 1008 b := dAtA[iNdEx] 1009 iNdEx++ 1010 wire |= (uint64(b) & 0x7F) << shift 1011 if b < 0x80 { 1012 break 1013 } 1014 } 1015 wireType := int(wire & 0x7) 1016 switch wireType { 1017 case 0: 1018 for shift := uint(0); ; shift += 7 { 1019 if shift >= 64 { 1020 return 0, ErrIntOverflowIssue260 1021 } 1022 if iNdEx >= l { 1023 return 0, io.ErrUnexpectedEOF 1024 } 1025 iNdEx++ 1026 if dAtA[iNdEx-1] < 0x80 { 1027 break 1028 } 1029 } 1030 case 1: 1031 iNdEx += 8 1032 case 2: 1033 var length int 1034 for shift := uint(0); ; shift += 7 { 1035 if shift >= 64 { 1036 return 0, ErrIntOverflowIssue260 1037 } 1038 if iNdEx >= l { 1039 return 0, io.ErrUnexpectedEOF 1040 } 1041 b := dAtA[iNdEx] 1042 iNdEx++ 1043 length |= (int(b) & 0x7F) << shift 1044 if b < 0x80 { 1045 break 1046 } 1047 } 1048 if length < 0 { 1049 return 0, ErrInvalidLengthIssue260 1050 } 1051 iNdEx += length 1052 case 3: 1053 depth++ 1054 case 4: 1055 if depth == 0 { 1056 return 0, ErrUnexpectedEndOfGroupIssue260 1057 } 1058 depth-- 1059 case 5: 1060 iNdEx += 4 1061 default: 1062 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1063 } 1064 if iNdEx < 0 { 1065 return 0, ErrInvalidLengthIssue260 1066 } 1067 if depth == 0 { 1068 return iNdEx, nil 1069 } 1070 } 1071 return 0, io.ErrUnexpectedEOF 1072 } 1073 1074 var ( 1075 ErrInvalidLengthIssue260 = fmt.Errorf("proto: negative length found during unmarshaling") 1076 ErrIntOverflowIssue260 = fmt.Errorf("proto: integer overflow") 1077 ErrUnexpectedEndOfGroupIssue260 = fmt.Errorf("proto: unexpected end of group") 1078 )