github.com/smithx10/nomad@v0.9.1-rc1/nomad/structs/structs.generated.go (about) 1 // ************************************************************ 2 // DO NOT EDIT. 3 // THIS FILE IS AUTO-GENERATED BY codecgen. 4 // ************************************************************ 5 6 package structs 7 8 import ( 9 "errors" 10 "fmt" 11 pkg1_raft "github.com/hashicorp/raft" 12 codec1978 "github.com/ugorji/go/codec" 13 "reflect" 14 "runtime" 15 time "time" 16 ) 17 18 const ( 19 // ----- content types ---- 20 codecSelferC_UTF8100 = 1 21 codecSelferC_RAW100 = 0 22 // ----- value types used ---- 23 codecSelferValueTypeArray100 = 10 24 codecSelferValueTypeMap100 = 9 25 // ----- containerStateValues ---- 26 codecSelfer_containerMapKey100 = 2 27 codecSelfer_containerMapValue100 = 3 28 codecSelfer_containerMapEnd100 = 4 29 codecSelfer_containerArrayElem100 = 6 30 codecSelfer_containerArrayEnd100 = 7 31 ) 32 33 var ( 34 codecSelferBitsize100 = uint8(reflect.TypeOf(uint(0)).Bits()) 35 codecSelferOnlyMapOrArrayEncodeToStructErr100 = errors.New(`only encoded map or array can be decoded into a struct`) 36 ) 37 38 type codecSelfer100 struct{} 39 40 func init() { 41 if codec1978.GenVersion != 5 { 42 _, file, _, _ := runtime.Caller(0) 43 err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", 44 5, codec1978.GenVersion, file) 45 panic(err) 46 } 47 if false { // reference the types, but skip this branch at build/run time 48 var v0 pkg1_raft.ServerID 49 var v1 time.Duration 50 _, _ = v0, v1 51 } 52 } 53 54 func (x Bitmap) CodecEncodeSelf(e *codec1978.Encoder) { 55 var h codecSelfer100 56 z, r := codec1978.GenHelperEncoder(e) 57 _, _, _ = h, z, r 58 if x == nil { 59 r.EncodeNil() 60 } else { 61 yym1 := z.EncBinary() 62 _ = yym1 63 if false { 64 } else if z.HasExtensions() && z.EncExt(x) { 65 } else { 66 h.encBitmap((Bitmap)(x), e) 67 } 68 } 69 } 70 71 func (x *Bitmap) CodecDecodeSelf(d *codec1978.Decoder) { 72 var h codecSelfer100 73 z, r := codec1978.GenHelperDecoder(d) 74 _, _, _ = h, z, r 75 yym1 := z.DecBinary() 76 _ = yym1 77 if false { 78 } else if z.HasExtensions() && z.DecExt(x) { 79 } else { 80 h.decBitmap((*Bitmap)(x), d) 81 } 82 } 83 84 func (x DiffType) CodecEncodeSelf(e *codec1978.Encoder) { 85 var h codecSelfer100 86 z, r := codec1978.GenHelperEncoder(e) 87 _, _, _ = h, z, r 88 yym1 := z.EncBinary() 89 _ = yym1 90 if false { 91 } else if z.HasExtensions() && z.EncExt(x) { 92 } else { 93 r.EncodeString(codecSelferC_UTF8100, string(x)) 94 } 95 } 96 97 func (x *DiffType) CodecDecodeSelf(d *codec1978.Decoder) { 98 var h codecSelfer100 99 z, r := codec1978.GenHelperDecoder(d) 100 _, _, _ = h, z, r 101 yym1 := z.DecBinary() 102 _ = yym1 103 if false { 104 } else if z.HasExtensions() && z.DecExt(x) { 105 } else { 106 *((*string)(x)) = r.DecodeString() 107 } 108 } 109 110 func (x *JobDiff) CodecEncodeSelf(e *codec1978.Encoder) { 111 var h codecSelfer100 112 z, r := codec1978.GenHelperEncoder(e) 113 _, _, _ = h, z, r 114 if x == nil { 115 r.EncodeNil() 116 } else { 117 yym1 := z.EncBinary() 118 _ = yym1 119 if false { 120 } else if z.HasExtensions() && z.EncExt(x) { 121 } else { 122 yysep2 := !z.EncBinary() 123 yy2arr2 := z.EncBasicHandle().StructToArray 124 var yyq2 [5]bool 125 _, _, _ = yysep2, yyq2, yy2arr2 126 const yyr2 bool = false 127 var yynn2 int 128 if yyr2 || yy2arr2 { 129 r.EncodeArrayStart(5) 130 } else { 131 yynn2 = 5 132 for _, b := range yyq2 { 133 if b { 134 yynn2++ 135 } 136 } 137 r.EncodeMapStart(yynn2) 138 yynn2 = 0 139 } 140 if yyr2 || yy2arr2 { 141 z.EncSendContainerState(codecSelfer_containerArrayElem100) 142 x.Type.CodecEncodeSelf(e) 143 } else { 144 z.EncSendContainerState(codecSelfer_containerMapKey100) 145 r.EncodeString(codecSelferC_UTF8100, string("Type")) 146 z.EncSendContainerState(codecSelfer_containerMapValue100) 147 x.Type.CodecEncodeSelf(e) 148 } 149 if yyr2 || yy2arr2 { 150 z.EncSendContainerState(codecSelfer_containerArrayElem100) 151 yym7 := z.EncBinary() 152 _ = yym7 153 if false { 154 } else { 155 r.EncodeString(codecSelferC_UTF8100, string(x.ID)) 156 } 157 } else { 158 z.EncSendContainerState(codecSelfer_containerMapKey100) 159 r.EncodeString(codecSelferC_UTF8100, string("ID")) 160 z.EncSendContainerState(codecSelfer_containerMapValue100) 161 yym8 := z.EncBinary() 162 _ = yym8 163 if false { 164 } else { 165 r.EncodeString(codecSelferC_UTF8100, string(x.ID)) 166 } 167 } 168 if yyr2 || yy2arr2 { 169 z.EncSendContainerState(codecSelfer_containerArrayElem100) 170 if x.Fields == nil { 171 r.EncodeNil() 172 } else { 173 yym10 := z.EncBinary() 174 _ = yym10 175 if false { 176 } else { 177 h.encSlicePtrtoFieldDiff(([]*FieldDiff)(x.Fields), e) 178 } 179 } 180 } else { 181 z.EncSendContainerState(codecSelfer_containerMapKey100) 182 r.EncodeString(codecSelferC_UTF8100, string("Fields")) 183 z.EncSendContainerState(codecSelfer_containerMapValue100) 184 if x.Fields == nil { 185 r.EncodeNil() 186 } else { 187 yym11 := z.EncBinary() 188 _ = yym11 189 if false { 190 } else { 191 h.encSlicePtrtoFieldDiff(([]*FieldDiff)(x.Fields), e) 192 } 193 } 194 } 195 if yyr2 || yy2arr2 { 196 z.EncSendContainerState(codecSelfer_containerArrayElem100) 197 if x.Objects == nil { 198 r.EncodeNil() 199 } else { 200 yym13 := z.EncBinary() 201 _ = yym13 202 if false { 203 } else { 204 h.encSlicePtrtoObjectDiff(([]*ObjectDiff)(x.Objects), e) 205 } 206 } 207 } else { 208 z.EncSendContainerState(codecSelfer_containerMapKey100) 209 r.EncodeString(codecSelferC_UTF8100, string("Objects")) 210 z.EncSendContainerState(codecSelfer_containerMapValue100) 211 if x.Objects == nil { 212 r.EncodeNil() 213 } else { 214 yym14 := z.EncBinary() 215 _ = yym14 216 if false { 217 } else { 218 h.encSlicePtrtoObjectDiff(([]*ObjectDiff)(x.Objects), e) 219 } 220 } 221 } 222 if yyr2 || yy2arr2 { 223 z.EncSendContainerState(codecSelfer_containerArrayElem100) 224 if x.TaskGroups == nil { 225 r.EncodeNil() 226 } else { 227 yym16 := z.EncBinary() 228 _ = yym16 229 if false { 230 } else { 231 h.encSlicePtrtoTaskGroupDiff(([]*TaskGroupDiff)(x.TaskGroups), e) 232 } 233 } 234 } else { 235 z.EncSendContainerState(codecSelfer_containerMapKey100) 236 r.EncodeString(codecSelferC_UTF8100, string("TaskGroups")) 237 z.EncSendContainerState(codecSelfer_containerMapValue100) 238 if x.TaskGroups == nil { 239 r.EncodeNil() 240 } else { 241 yym17 := z.EncBinary() 242 _ = yym17 243 if false { 244 } else { 245 h.encSlicePtrtoTaskGroupDiff(([]*TaskGroupDiff)(x.TaskGroups), e) 246 } 247 } 248 } 249 if yyr2 || yy2arr2 { 250 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 251 } else { 252 z.EncSendContainerState(codecSelfer_containerMapEnd100) 253 } 254 } 255 } 256 } 257 258 func (x *JobDiff) CodecDecodeSelf(d *codec1978.Decoder) { 259 var h codecSelfer100 260 z, r := codec1978.GenHelperDecoder(d) 261 _, _, _ = h, z, r 262 yym1 := z.DecBinary() 263 _ = yym1 264 if false { 265 } else if z.HasExtensions() && z.DecExt(x) { 266 } else { 267 yyct2 := r.ContainerType() 268 if yyct2 == codecSelferValueTypeMap100 { 269 yyl2 := r.ReadMapStart() 270 if yyl2 == 0 { 271 z.DecSendContainerState(codecSelfer_containerMapEnd100) 272 } else { 273 x.codecDecodeSelfFromMap(yyl2, d) 274 } 275 } else if yyct2 == codecSelferValueTypeArray100 { 276 yyl2 := r.ReadArrayStart() 277 if yyl2 == 0 { 278 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 279 } else { 280 x.codecDecodeSelfFromArray(yyl2, d) 281 } 282 } else { 283 panic(codecSelferOnlyMapOrArrayEncodeToStructErr100) 284 } 285 } 286 } 287 288 func (x *JobDiff) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { 289 var h codecSelfer100 290 z, r := codec1978.GenHelperDecoder(d) 291 _, _, _ = h, z, r 292 var yys3Slc = z.DecScratchBuffer() // default slice to decode into 293 _ = yys3Slc 294 var yyhl3 bool = l >= 0 295 for yyj3 := 0; ; yyj3++ { 296 if yyhl3 { 297 if yyj3 >= l { 298 break 299 } 300 } else { 301 if r.CheckBreak() { 302 break 303 } 304 } 305 z.DecSendContainerState(codecSelfer_containerMapKey100) 306 yys3Slc = r.DecodeBytes(yys3Slc, true, true) 307 yys3 := string(yys3Slc) 308 z.DecSendContainerState(codecSelfer_containerMapValue100) 309 switch yys3 { 310 case "Type": 311 if r.TryDecodeAsNil() { 312 x.Type = "" 313 } else { 314 yyv4 := &x.Type 315 yyv4.CodecDecodeSelf(d) 316 } 317 case "ID": 318 if r.TryDecodeAsNil() { 319 x.ID = "" 320 } else { 321 yyv5 := &x.ID 322 yym6 := z.DecBinary() 323 _ = yym6 324 if false { 325 } else { 326 *((*string)(yyv5)) = r.DecodeString() 327 } 328 } 329 case "Fields": 330 if r.TryDecodeAsNil() { 331 x.Fields = nil 332 } else { 333 yyv7 := &x.Fields 334 yym8 := z.DecBinary() 335 _ = yym8 336 if false { 337 } else { 338 h.decSlicePtrtoFieldDiff((*[]*FieldDiff)(yyv7), d) 339 } 340 } 341 case "Objects": 342 if r.TryDecodeAsNil() { 343 x.Objects = nil 344 } else { 345 yyv9 := &x.Objects 346 yym10 := z.DecBinary() 347 _ = yym10 348 if false { 349 } else { 350 h.decSlicePtrtoObjectDiff((*[]*ObjectDiff)(yyv9), d) 351 } 352 } 353 case "TaskGroups": 354 if r.TryDecodeAsNil() { 355 x.TaskGroups = nil 356 } else { 357 yyv11 := &x.TaskGroups 358 yym12 := z.DecBinary() 359 _ = yym12 360 if false { 361 } else { 362 h.decSlicePtrtoTaskGroupDiff((*[]*TaskGroupDiff)(yyv11), d) 363 } 364 } 365 default: 366 z.DecStructFieldNotFound(-1, yys3) 367 } // end switch yys3 368 } // end for yyj3 369 z.DecSendContainerState(codecSelfer_containerMapEnd100) 370 } 371 372 func (x *JobDiff) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { 373 var h codecSelfer100 374 z, r := codec1978.GenHelperDecoder(d) 375 _, _, _ = h, z, r 376 var yyj13 int 377 var yyb13 bool 378 var yyhl13 bool = l >= 0 379 yyj13++ 380 if yyhl13 { 381 yyb13 = yyj13 > l 382 } else { 383 yyb13 = r.CheckBreak() 384 } 385 if yyb13 { 386 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 387 return 388 } 389 z.DecSendContainerState(codecSelfer_containerArrayElem100) 390 if r.TryDecodeAsNil() { 391 x.Type = "" 392 } else { 393 yyv14 := &x.Type 394 yyv14.CodecDecodeSelf(d) 395 } 396 yyj13++ 397 if yyhl13 { 398 yyb13 = yyj13 > l 399 } else { 400 yyb13 = r.CheckBreak() 401 } 402 if yyb13 { 403 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 404 return 405 } 406 z.DecSendContainerState(codecSelfer_containerArrayElem100) 407 if r.TryDecodeAsNil() { 408 x.ID = "" 409 } else { 410 yyv15 := &x.ID 411 yym16 := z.DecBinary() 412 _ = yym16 413 if false { 414 } else { 415 *((*string)(yyv15)) = r.DecodeString() 416 } 417 } 418 yyj13++ 419 if yyhl13 { 420 yyb13 = yyj13 > l 421 } else { 422 yyb13 = r.CheckBreak() 423 } 424 if yyb13 { 425 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 426 return 427 } 428 z.DecSendContainerState(codecSelfer_containerArrayElem100) 429 if r.TryDecodeAsNil() { 430 x.Fields = nil 431 } else { 432 yyv17 := &x.Fields 433 yym18 := z.DecBinary() 434 _ = yym18 435 if false { 436 } else { 437 h.decSlicePtrtoFieldDiff((*[]*FieldDiff)(yyv17), d) 438 } 439 } 440 yyj13++ 441 if yyhl13 { 442 yyb13 = yyj13 > l 443 } else { 444 yyb13 = r.CheckBreak() 445 } 446 if yyb13 { 447 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 448 return 449 } 450 z.DecSendContainerState(codecSelfer_containerArrayElem100) 451 if r.TryDecodeAsNil() { 452 x.Objects = nil 453 } else { 454 yyv19 := &x.Objects 455 yym20 := z.DecBinary() 456 _ = yym20 457 if false { 458 } else { 459 h.decSlicePtrtoObjectDiff((*[]*ObjectDiff)(yyv19), d) 460 } 461 } 462 yyj13++ 463 if yyhl13 { 464 yyb13 = yyj13 > l 465 } else { 466 yyb13 = r.CheckBreak() 467 } 468 if yyb13 { 469 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 470 return 471 } 472 z.DecSendContainerState(codecSelfer_containerArrayElem100) 473 if r.TryDecodeAsNil() { 474 x.TaskGroups = nil 475 } else { 476 yyv21 := &x.TaskGroups 477 yym22 := z.DecBinary() 478 _ = yym22 479 if false { 480 } else { 481 h.decSlicePtrtoTaskGroupDiff((*[]*TaskGroupDiff)(yyv21), d) 482 } 483 } 484 for { 485 yyj13++ 486 if yyhl13 { 487 yyb13 = yyj13 > l 488 } else { 489 yyb13 = r.CheckBreak() 490 } 491 if yyb13 { 492 break 493 } 494 z.DecSendContainerState(codecSelfer_containerArrayElem100) 495 z.DecStructFieldNotFound(yyj13-1, "") 496 } 497 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 498 } 499 500 func (x *TaskGroupDiff) CodecEncodeSelf(e *codec1978.Encoder) { 501 var h codecSelfer100 502 z, r := codec1978.GenHelperEncoder(e) 503 _, _, _ = h, z, r 504 if x == nil { 505 r.EncodeNil() 506 } else { 507 yym1 := z.EncBinary() 508 _ = yym1 509 if false { 510 } else if z.HasExtensions() && z.EncExt(x) { 511 } else { 512 yysep2 := !z.EncBinary() 513 yy2arr2 := z.EncBasicHandle().StructToArray 514 var yyq2 [6]bool 515 _, _, _ = yysep2, yyq2, yy2arr2 516 const yyr2 bool = false 517 var yynn2 int 518 if yyr2 || yy2arr2 { 519 r.EncodeArrayStart(6) 520 } else { 521 yynn2 = 6 522 for _, b := range yyq2 { 523 if b { 524 yynn2++ 525 } 526 } 527 r.EncodeMapStart(yynn2) 528 yynn2 = 0 529 } 530 if yyr2 || yy2arr2 { 531 z.EncSendContainerState(codecSelfer_containerArrayElem100) 532 x.Type.CodecEncodeSelf(e) 533 } else { 534 z.EncSendContainerState(codecSelfer_containerMapKey100) 535 r.EncodeString(codecSelferC_UTF8100, string("Type")) 536 z.EncSendContainerState(codecSelfer_containerMapValue100) 537 x.Type.CodecEncodeSelf(e) 538 } 539 if yyr2 || yy2arr2 { 540 z.EncSendContainerState(codecSelfer_containerArrayElem100) 541 yym7 := z.EncBinary() 542 _ = yym7 543 if false { 544 } else { 545 r.EncodeString(codecSelferC_UTF8100, string(x.Name)) 546 } 547 } else { 548 z.EncSendContainerState(codecSelfer_containerMapKey100) 549 r.EncodeString(codecSelferC_UTF8100, string("Name")) 550 z.EncSendContainerState(codecSelfer_containerMapValue100) 551 yym8 := z.EncBinary() 552 _ = yym8 553 if false { 554 } else { 555 r.EncodeString(codecSelferC_UTF8100, string(x.Name)) 556 } 557 } 558 if yyr2 || yy2arr2 { 559 z.EncSendContainerState(codecSelfer_containerArrayElem100) 560 if x.Fields == nil { 561 r.EncodeNil() 562 } else { 563 yym10 := z.EncBinary() 564 _ = yym10 565 if false { 566 } else { 567 h.encSlicePtrtoFieldDiff(([]*FieldDiff)(x.Fields), e) 568 } 569 } 570 } else { 571 z.EncSendContainerState(codecSelfer_containerMapKey100) 572 r.EncodeString(codecSelferC_UTF8100, string("Fields")) 573 z.EncSendContainerState(codecSelfer_containerMapValue100) 574 if x.Fields == nil { 575 r.EncodeNil() 576 } else { 577 yym11 := z.EncBinary() 578 _ = yym11 579 if false { 580 } else { 581 h.encSlicePtrtoFieldDiff(([]*FieldDiff)(x.Fields), e) 582 } 583 } 584 } 585 if yyr2 || yy2arr2 { 586 z.EncSendContainerState(codecSelfer_containerArrayElem100) 587 if x.Objects == nil { 588 r.EncodeNil() 589 } else { 590 yym13 := z.EncBinary() 591 _ = yym13 592 if false { 593 } else { 594 h.encSlicePtrtoObjectDiff(([]*ObjectDiff)(x.Objects), e) 595 } 596 } 597 } else { 598 z.EncSendContainerState(codecSelfer_containerMapKey100) 599 r.EncodeString(codecSelferC_UTF8100, string("Objects")) 600 z.EncSendContainerState(codecSelfer_containerMapValue100) 601 if x.Objects == nil { 602 r.EncodeNil() 603 } else { 604 yym14 := z.EncBinary() 605 _ = yym14 606 if false { 607 } else { 608 h.encSlicePtrtoObjectDiff(([]*ObjectDiff)(x.Objects), e) 609 } 610 } 611 } 612 if yyr2 || yy2arr2 { 613 z.EncSendContainerState(codecSelfer_containerArrayElem100) 614 if x.Tasks == nil { 615 r.EncodeNil() 616 } else { 617 yym16 := z.EncBinary() 618 _ = yym16 619 if false { 620 } else { 621 h.encSlicePtrtoTaskDiff(([]*TaskDiff)(x.Tasks), e) 622 } 623 } 624 } else { 625 z.EncSendContainerState(codecSelfer_containerMapKey100) 626 r.EncodeString(codecSelferC_UTF8100, string("Tasks")) 627 z.EncSendContainerState(codecSelfer_containerMapValue100) 628 if x.Tasks == nil { 629 r.EncodeNil() 630 } else { 631 yym17 := z.EncBinary() 632 _ = yym17 633 if false { 634 } else { 635 h.encSlicePtrtoTaskDiff(([]*TaskDiff)(x.Tasks), e) 636 } 637 } 638 } 639 if yyr2 || yy2arr2 { 640 z.EncSendContainerState(codecSelfer_containerArrayElem100) 641 if x.Updates == nil { 642 r.EncodeNil() 643 } else { 644 yym19 := z.EncBinary() 645 _ = yym19 646 if false { 647 } else { 648 z.F.EncMapStringUint64V(x.Updates, false, e) 649 } 650 } 651 } else { 652 z.EncSendContainerState(codecSelfer_containerMapKey100) 653 r.EncodeString(codecSelferC_UTF8100, string("Updates")) 654 z.EncSendContainerState(codecSelfer_containerMapValue100) 655 if x.Updates == nil { 656 r.EncodeNil() 657 } else { 658 yym20 := z.EncBinary() 659 _ = yym20 660 if false { 661 } else { 662 z.F.EncMapStringUint64V(x.Updates, false, e) 663 } 664 } 665 } 666 if yyr2 || yy2arr2 { 667 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 668 } else { 669 z.EncSendContainerState(codecSelfer_containerMapEnd100) 670 } 671 } 672 } 673 } 674 675 func (x *TaskGroupDiff) CodecDecodeSelf(d *codec1978.Decoder) { 676 var h codecSelfer100 677 z, r := codec1978.GenHelperDecoder(d) 678 _, _, _ = h, z, r 679 yym1 := z.DecBinary() 680 _ = yym1 681 if false { 682 } else if z.HasExtensions() && z.DecExt(x) { 683 } else { 684 yyct2 := r.ContainerType() 685 if yyct2 == codecSelferValueTypeMap100 { 686 yyl2 := r.ReadMapStart() 687 if yyl2 == 0 { 688 z.DecSendContainerState(codecSelfer_containerMapEnd100) 689 } else { 690 x.codecDecodeSelfFromMap(yyl2, d) 691 } 692 } else if yyct2 == codecSelferValueTypeArray100 { 693 yyl2 := r.ReadArrayStart() 694 if yyl2 == 0 { 695 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 696 } else { 697 x.codecDecodeSelfFromArray(yyl2, d) 698 } 699 } else { 700 panic(codecSelferOnlyMapOrArrayEncodeToStructErr100) 701 } 702 } 703 } 704 705 func (x *TaskGroupDiff) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { 706 var h codecSelfer100 707 z, r := codec1978.GenHelperDecoder(d) 708 _, _, _ = h, z, r 709 var yys3Slc = z.DecScratchBuffer() // default slice to decode into 710 _ = yys3Slc 711 var yyhl3 bool = l >= 0 712 for yyj3 := 0; ; yyj3++ { 713 if yyhl3 { 714 if yyj3 >= l { 715 break 716 } 717 } else { 718 if r.CheckBreak() { 719 break 720 } 721 } 722 z.DecSendContainerState(codecSelfer_containerMapKey100) 723 yys3Slc = r.DecodeBytes(yys3Slc, true, true) 724 yys3 := string(yys3Slc) 725 z.DecSendContainerState(codecSelfer_containerMapValue100) 726 switch yys3 { 727 case "Type": 728 if r.TryDecodeAsNil() { 729 x.Type = "" 730 } else { 731 yyv4 := &x.Type 732 yyv4.CodecDecodeSelf(d) 733 } 734 case "Name": 735 if r.TryDecodeAsNil() { 736 x.Name = "" 737 } else { 738 yyv5 := &x.Name 739 yym6 := z.DecBinary() 740 _ = yym6 741 if false { 742 } else { 743 *((*string)(yyv5)) = r.DecodeString() 744 } 745 } 746 case "Fields": 747 if r.TryDecodeAsNil() { 748 x.Fields = nil 749 } else { 750 yyv7 := &x.Fields 751 yym8 := z.DecBinary() 752 _ = yym8 753 if false { 754 } else { 755 h.decSlicePtrtoFieldDiff((*[]*FieldDiff)(yyv7), d) 756 } 757 } 758 case "Objects": 759 if r.TryDecodeAsNil() { 760 x.Objects = nil 761 } else { 762 yyv9 := &x.Objects 763 yym10 := z.DecBinary() 764 _ = yym10 765 if false { 766 } else { 767 h.decSlicePtrtoObjectDiff((*[]*ObjectDiff)(yyv9), d) 768 } 769 } 770 case "Tasks": 771 if r.TryDecodeAsNil() { 772 x.Tasks = nil 773 } else { 774 yyv11 := &x.Tasks 775 yym12 := z.DecBinary() 776 _ = yym12 777 if false { 778 } else { 779 h.decSlicePtrtoTaskDiff((*[]*TaskDiff)(yyv11), d) 780 } 781 } 782 case "Updates": 783 if r.TryDecodeAsNil() { 784 x.Updates = nil 785 } else { 786 yyv13 := &x.Updates 787 yym14 := z.DecBinary() 788 _ = yym14 789 if false { 790 } else { 791 z.F.DecMapStringUint64X(yyv13, false, d) 792 } 793 } 794 default: 795 z.DecStructFieldNotFound(-1, yys3) 796 } // end switch yys3 797 } // end for yyj3 798 z.DecSendContainerState(codecSelfer_containerMapEnd100) 799 } 800 801 func (x *TaskGroupDiff) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { 802 var h codecSelfer100 803 z, r := codec1978.GenHelperDecoder(d) 804 _, _, _ = h, z, r 805 var yyj15 int 806 var yyb15 bool 807 var yyhl15 bool = l >= 0 808 yyj15++ 809 if yyhl15 { 810 yyb15 = yyj15 > l 811 } else { 812 yyb15 = r.CheckBreak() 813 } 814 if yyb15 { 815 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 816 return 817 } 818 z.DecSendContainerState(codecSelfer_containerArrayElem100) 819 if r.TryDecodeAsNil() { 820 x.Type = "" 821 } else { 822 yyv16 := &x.Type 823 yyv16.CodecDecodeSelf(d) 824 } 825 yyj15++ 826 if yyhl15 { 827 yyb15 = yyj15 > l 828 } else { 829 yyb15 = r.CheckBreak() 830 } 831 if yyb15 { 832 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 833 return 834 } 835 z.DecSendContainerState(codecSelfer_containerArrayElem100) 836 if r.TryDecodeAsNil() { 837 x.Name = "" 838 } else { 839 yyv17 := &x.Name 840 yym18 := z.DecBinary() 841 _ = yym18 842 if false { 843 } else { 844 *((*string)(yyv17)) = r.DecodeString() 845 } 846 } 847 yyj15++ 848 if yyhl15 { 849 yyb15 = yyj15 > l 850 } else { 851 yyb15 = r.CheckBreak() 852 } 853 if yyb15 { 854 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 855 return 856 } 857 z.DecSendContainerState(codecSelfer_containerArrayElem100) 858 if r.TryDecodeAsNil() { 859 x.Fields = nil 860 } else { 861 yyv19 := &x.Fields 862 yym20 := z.DecBinary() 863 _ = yym20 864 if false { 865 } else { 866 h.decSlicePtrtoFieldDiff((*[]*FieldDiff)(yyv19), d) 867 } 868 } 869 yyj15++ 870 if yyhl15 { 871 yyb15 = yyj15 > l 872 } else { 873 yyb15 = r.CheckBreak() 874 } 875 if yyb15 { 876 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 877 return 878 } 879 z.DecSendContainerState(codecSelfer_containerArrayElem100) 880 if r.TryDecodeAsNil() { 881 x.Objects = nil 882 } else { 883 yyv21 := &x.Objects 884 yym22 := z.DecBinary() 885 _ = yym22 886 if false { 887 } else { 888 h.decSlicePtrtoObjectDiff((*[]*ObjectDiff)(yyv21), d) 889 } 890 } 891 yyj15++ 892 if yyhl15 { 893 yyb15 = yyj15 > l 894 } else { 895 yyb15 = r.CheckBreak() 896 } 897 if yyb15 { 898 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 899 return 900 } 901 z.DecSendContainerState(codecSelfer_containerArrayElem100) 902 if r.TryDecodeAsNil() { 903 x.Tasks = nil 904 } else { 905 yyv23 := &x.Tasks 906 yym24 := z.DecBinary() 907 _ = yym24 908 if false { 909 } else { 910 h.decSlicePtrtoTaskDiff((*[]*TaskDiff)(yyv23), d) 911 } 912 } 913 yyj15++ 914 if yyhl15 { 915 yyb15 = yyj15 > l 916 } else { 917 yyb15 = r.CheckBreak() 918 } 919 if yyb15 { 920 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 921 return 922 } 923 z.DecSendContainerState(codecSelfer_containerArrayElem100) 924 if r.TryDecodeAsNil() { 925 x.Updates = nil 926 } else { 927 yyv25 := &x.Updates 928 yym26 := z.DecBinary() 929 _ = yym26 930 if false { 931 } else { 932 z.F.DecMapStringUint64X(yyv25, false, d) 933 } 934 } 935 for { 936 yyj15++ 937 if yyhl15 { 938 yyb15 = yyj15 > l 939 } else { 940 yyb15 = r.CheckBreak() 941 } 942 if yyb15 { 943 break 944 } 945 z.DecSendContainerState(codecSelfer_containerArrayElem100) 946 z.DecStructFieldNotFound(yyj15-1, "") 947 } 948 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 949 } 950 951 func (x TaskGroupDiffs) CodecEncodeSelf(e *codec1978.Encoder) { 952 var h codecSelfer100 953 z, r := codec1978.GenHelperEncoder(e) 954 _, _, _ = h, z, r 955 if x == nil { 956 r.EncodeNil() 957 } else { 958 yym1 := z.EncBinary() 959 _ = yym1 960 if false { 961 } else if z.HasExtensions() && z.EncExt(x) { 962 } else { 963 h.encTaskGroupDiffs((TaskGroupDiffs)(x), e) 964 } 965 } 966 } 967 968 func (x *TaskGroupDiffs) CodecDecodeSelf(d *codec1978.Decoder) { 969 var h codecSelfer100 970 z, r := codec1978.GenHelperDecoder(d) 971 _, _, _ = h, z, r 972 yym1 := z.DecBinary() 973 _ = yym1 974 if false { 975 } else if z.HasExtensions() && z.DecExt(x) { 976 } else { 977 h.decTaskGroupDiffs((*TaskGroupDiffs)(x), d) 978 } 979 } 980 981 func (x *TaskDiff) CodecEncodeSelf(e *codec1978.Encoder) { 982 var h codecSelfer100 983 z, r := codec1978.GenHelperEncoder(e) 984 _, _, _ = h, z, r 985 if x == nil { 986 r.EncodeNil() 987 } else { 988 yym1 := z.EncBinary() 989 _ = yym1 990 if false { 991 } else if z.HasExtensions() && z.EncExt(x) { 992 } else { 993 yysep2 := !z.EncBinary() 994 yy2arr2 := z.EncBasicHandle().StructToArray 995 var yyq2 [5]bool 996 _, _, _ = yysep2, yyq2, yy2arr2 997 const yyr2 bool = false 998 var yynn2 int 999 if yyr2 || yy2arr2 { 1000 r.EncodeArrayStart(5) 1001 } else { 1002 yynn2 = 5 1003 for _, b := range yyq2 { 1004 if b { 1005 yynn2++ 1006 } 1007 } 1008 r.EncodeMapStart(yynn2) 1009 yynn2 = 0 1010 } 1011 if yyr2 || yy2arr2 { 1012 z.EncSendContainerState(codecSelfer_containerArrayElem100) 1013 x.Type.CodecEncodeSelf(e) 1014 } else { 1015 z.EncSendContainerState(codecSelfer_containerMapKey100) 1016 r.EncodeString(codecSelferC_UTF8100, string("Type")) 1017 z.EncSendContainerState(codecSelfer_containerMapValue100) 1018 x.Type.CodecEncodeSelf(e) 1019 } 1020 if yyr2 || yy2arr2 { 1021 z.EncSendContainerState(codecSelfer_containerArrayElem100) 1022 yym7 := z.EncBinary() 1023 _ = yym7 1024 if false { 1025 } else { 1026 r.EncodeString(codecSelferC_UTF8100, string(x.Name)) 1027 } 1028 } else { 1029 z.EncSendContainerState(codecSelfer_containerMapKey100) 1030 r.EncodeString(codecSelferC_UTF8100, string("Name")) 1031 z.EncSendContainerState(codecSelfer_containerMapValue100) 1032 yym8 := z.EncBinary() 1033 _ = yym8 1034 if false { 1035 } else { 1036 r.EncodeString(codecSelferC_UTF8100, string(x.Name)) 1037 } 1038 } 1039 if yyr2 || yy2arr2 { 1040 z.EncSendContainerState(codecSelfer_containerArrayElem100) 1041 if x.Fields == nil { 1042 r.EncodeNil() 1043 } else { 1044 yym10 := z.EncBinary() 1045 _ = yym10 1046 if false { 1047 } else { 1048 h.encSlicePtrtoFieldDiff(([]*FieldDiff)(x.Fields), e) 1049 } 1050 } 1051 } else { 1052 z.EncSendContainerState(codecSelfer_containerMapKey100) 1053 r.EncodeString(codecSelferC_UTF8100, string("Fields")) 1054 z.EncSendContainerState(codecSelfer_containerMapValue100) 1055 if x.Fields == nil { 1056 r.EncodeNil() 1057 } else { 1058 yym11 := z.EncBinary() 1059 _ = yym11 1060 if false { 1061 } else { 1062 h.encSlicePtrtoFieldDiff(([]*FieldDiff)(x.Fields), e) 1063 } 1064 } 1065 } 1066 if yyr2 || yy2arr2 { 1067 z.EncSendContainerState(codecSelfer_containerArrayElem100) 1068 if x.Objects == nil { 1069 r.EncodeNil() 1070 } else { 1071 yym13 := z.EncBinary() 1072 _ = yym13 1073 if false { 1074 } else { 1075 h.encSlicePtrtoObjectDiff(([]*ObjectDiff)(x.Objects), e) 1076 } 1077 } 1078 } else { 1079 z.EncSendContainerState(codecSelfer_containerMapKey100) 1080 r.EncodeString(codecSelferC_UTF8100, string("Objects")) 1081 z.EncSendContainerState(codecSelfer_containerMapValue100) 1082 if x.Objects == nil { 1083 r.EncodeNil() 1084 } else { 1085 yym14 := z.EncBinary() 1086 _ = yym14 1087 if false { 1088 } else { 1089 h.encSlicePtrtoObjectDiff(([]*ObjectDiff)(x.Objects), e) 1090 } 1091 } 1092 } 1093 if yyr2 || yy2arr2 { 1094 z.EncSendContainerState(codecSelfer_containerArrayElem100) 1095 if x.Annotations == nil { 1096 r.EncodeNil() 1097 } else { 1098 yym16 := z.EncBinary() 1099 _ = yym16 1100 if false { 1101 } else { 1102 z.F.EncSliceStringV(x.Annotations, false, e) 1103 } 1104 } 1105 } else { 1106 z.EncSendContainerState(codecSelfer_containerMapKey100) 1107 r.EncodeString(codecSelferC_UTF8100, string("Annotations")) 1108 z.EncSendContainerState(codecSelfer_containerMapValue100) 1109 if x.Annotations == nil { 1110 r.EncodeNil() 1111 } else { 1112 yym17 := z.EncBinary() 1113 _ = yym17 1114 if false { 1115 } else { 1116 z.F.EncSliceStringV(x.Annotations, false, e) 1117 } 1118 } 1119 } 1120 if yyr2 || yy2arr2 { 1121 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 1122 } else { 1123 z.EncSendContainerState(codecSelfer_containerMapEnd100) 1124 } 1125 } 1126 } 1127 } 1128 1129 func (x *TaskDiff) CodecDecodeSelf(d *codec1978.Decoder) { 1130 var h codecSelfer100 1131 z, r := codec1978.GenHelperDecoder(d) 1132 _, _, _ = h, z, r 1133 yym1 := z.DecBinary() 1134 _ = yym1 1135 if false { 1136 } else if z.HasExtensions() && z.DecExt(x) { 1137 } else { 1138 yyct2 := r.ContainerType() 1139 if yyct2 == codecSelferValueTypeMap100 { 1140 yyl2 := r.ReadMapStart() 1141 if yyl2 == 0 { 1142 z.DecSendContainerState(codecSelfer_containerMapEnd100) 1143 } else { 1144 x.codecDecodeSelfFromMap(yyl2, d) 1145 } 1146 } else if yyct2 == codecSelferValueTypeArray100 { 1147 yyl2 := r.ReadArrayStart() 1148 if yyl2 == 0 { 1149 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 1150 } else { 1151 x.codecDecodeSelfFromArray(yyl2, d) 1152 } 1153 } else { 1154 panic(codecSelferOnlyMapOrArrayEncodeToStructErr100) 1155 } 1156 } 1157 } 1158 1159 func (x *TaskDiff) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { 1160 var h codecSelfer100 1161 z, r := codec1978.GenHelperDecoder(d) 1162 _, _, _ = h, z, r 1163 var yys3Slc = z.DecScratchBuffer() // default slice to decode into 1164 _ = yys3Slc 1165 var yyhl3 bool = l >= 0 1166 for yyj3 := 0; ; yyj3++ { 1167 if yyhl3 { 1168 if yyj3 >= l { 1169 break 1170 } 1171 } else { 1172 if r.CheckBreak() { 1173 break 1174 } 1175 } 1176 z.DecSendContainerState(codecSelfer_containerMapKey100) 1177 yys3Slc = r.DecodeBytes(yys3Slc, true, true) 1178 yys3 := string(yys3Slc) 1179 z.DecSendContainerState(codecSelfer_containerMapValue100) 1180 switch yys3 { 1181 case "Type": 1182 if r.TryDecodeAsNil() { 1183 x.Type = "" 1184 } else { 1185 yyv4 := &x.Type 1186 yyv4.CodecDecodeSelf(d) 1187 } 1188 case "Name": 1189 if r.TryDecodeAsNil() { 1190 x.Name = "" 1191 } else { 1192 yyv5 := &x.Name 1193 yym6 := z.DecBinary() 1194 _ = yym6 1195 if false { 1196 } else { 1197 *((*string)(yyv5)) = r.DecodeString() 1198 } 1199 } 1200 case "Fields": 1201 if r.TryDecodeAsNil() { 1202 x.Fields = nil 1203 } else { 1204 yyv7 := &x.Fields 1205 yym8 := z.DecBinary() 1206 _ = yym8 1207 if false { 1208 } else { 1209 h.decSlicePtrtoFieldDiff((*[]*FieldDiff)(yyv7), d) 1210 } 1211 } 1212 case "Objects": 1213 if r.TryDecodeAsNil() { 1214 x.Objects = nil 1215 } else { 1216 yyv9 := &x.Objects 1217 yym10 := z.DecBinary() 1218 _ = yym10 1219 if false { 1220 } else { 1221 h.decSlicePtrtoObjectDiff((*[]*ObjectDiff)(yyv9), d) 1222 } 1223 } 1224 case "Annotations": 1225 if r.TryDecodeAsNil() { 1226 x.Annotations = nil 1227 } else { 1228 yyv11 := &x.Annotations 1229 yym12 := z.DecBinary() 1230 _ = yym12 1231 if false { 1232 } else { 1233 z.F.DecSliceStringX(yyv11, false, d) 1234 } 1235 } 1236 default: 1237 z.DecStructFieldNotFound(-1, yys3) 1238 } // end switch yys3 1239 } // end for yyj3 1240 z.DecSendContainerState(codecSelfer_containerMapEnd100) 1241 } 1242 1243 func (x *TaskDiff) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { 1244 var h codecSelfer100 1245 z, r := codec1978.GenHelperDecoder(d) 1246 _, _, _ = h, z, r 1247 var yyj13 int 1248 var yyb13 bool 1249 var yyhl13 bool = l >= 0 1250 yyj13++ 1251 if yyhl13 { 1252 yyb13 = yyj13 > l 1253 } else { 1254 yyb13 = r.CheckBreak() 1255 } 1256 if yyb13 { 1257 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 1258 return 1259 } 1260 z.DecSendContainerState(codecSelfer_containerArrayElem100) 1261 if r.TryDecodeAsNil() { 1262 x.Type = "" 1263 } else { 1264 yyv14 := &x.Type 1265 yyv14.CodecDecodeSelf(d) 1266 } 1267 yyj13++ 1268 if yyhl13 { 1269 yyb13 = yyj13 > l 1270 } else { 1271 yyb13 = r.CheckBreak() 1272 } 1273 if yyb13 { 1274 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 1275 return 1276 } 1277 z.DecSendContainerState(codecSelfer_containerArrayElem100) 1278 if r.TryDecodeAsNil() { 1279 x.Name = "" 1280 } else { 1281 yyv15 := &x.Name 1282 yym16 := z.DecBinary() 1283 _ = yym16 1284 if false { 1285 } else { 1286 *((*string)(yyv15)) = r.DecodeString() 1287 } 1288 } 1289 yyj13++ 1290 if yyhl13 { 1291 yyb13 = yyj13 > l 1292 } else { 1293 yyb13 = r.CheckBreak() 1294 } 1295 if yyb13 { 1296 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 1297 return 1298 } 1299 z.DecSendContainerState(codecSelfer_containerArrayElem100) 1300 if r.TryDecodeAsNil() { 1301 x.Fields = nil 1302 } else { 1303 yyv17 := &x.Fields 1304 yym18 := z.DecBinary() 1305 _ = yym18 1306 if false { 1307 } else { 1308 h.decSlicePtrtoFieldDiff((*[]*FieldDiff)(yyv17), d) 1309 } 1310 } 1311 yyj13++ 1312 if yyhl13 { 1313 yyb13 = yyj13 > l 1314 } else { 1315 yyb13 = r.CheckBreak() 1316 } 1317 if yyb13 { 1318 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 1319 return 1320 } 1321 z.DecSendContainerState(codecSelfer_containerArrayElem100) 1322 if r.TryDecodeAsNil() { 1323 x.Objects = nil 1324 } else { 1325 yyv19 := &x.Objects 1326 yym20 := z.DecBinary() 1327 _ = yym20 1328 if false { 1329 } else { 1330 h.decSlicePtrtoObjectDiff((*[]*ObjectDiff)(yyv19), d) 1331 } 1332 } 1333 yyj13++ 1334 if yyhl13 { 1335 yyb13 = yyj13 > l 1336 } else { 1337 yyb13 = r.CheckBreak() 1338 } 1339 if yyb13 { 1340 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 1341 return 1342 } 1343 z.DecSendContainerState(codecSelfer_containerArrayElem100) 1344 if r.TryDecodeAsNil() { 1345 x.Annotations = nil 1346 } else { 1347 yyv21 := &x.Annotations 1348 yym22 := z.DecBinary() 1349 _ = yym22 1350 if false { 1351 } else { 1352 z.F.DecSliceStringX(yyv21, false, d) 1353 } 1354 } 1355 for { 1356 yyj13++ 1357 if yyhl13 { 1358 yyb13 = yyj13 > l 1359 } else { 1360 yyb13 = r.CheckBreak() 1361 } 1362 if yyb13 { 1363 break 1364 } 1365 z.DecSendContainerState(codecSelfer_containerArrayElem100) 1366 z.DecStructFieldNotFound(yyj13-1, "") 1367 } 1368 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 1369 } 1370 1371 func (x TaskDiffs) CodecEncodeSelf(e *codec1978.Encoder) { 1372 var h codecSelfer100 1373 z, r := codec1978.GenHelperEncoder(e) 1374 _, _, _ = h, z, r 1375 if x == nil { 1376 r.EncodeNil() 1377 } else { 1378 yym1 := z.EncBinary() 1379 _ = yym1 1380 if false { 1381 } else if z.HasExtensions() && z.EncExt(x) { 1382 } else { 1383 h.encTaskDiffs((TaskDiffs)(x), e) 1384 } 1385 } 1386 } 1387 1388 func (x *TaskDiffs) CodecDecodeSelf(d *codec1978.Decoder) { 1389 var h codecSelfer100 1390 z, r := codec1978.GenHelperDecoder(d) 1391 _, _, _ = h, z, r 1392 yym1 := z.DecBinary() 1393 _ = yym1 1394 if false { 1395 } else if z.HasExtensions() && z.DecExt(x) { 1396 } else { 1397 h.decTaskDiffs((*TaskDiffs)(x), d) 1398 } 1399 } 1400 1401 func (x *ObjectDiff) CodecEncodeSelf(e *codec1978.Encoder) { 1402 var h codecSelfer100 1403 z, r := codec1978.GenHelperEncoder(e) 1404 _, _, _ = h, z, r 1405 if x == nil { 1406 r.EncodeNil() 1407 } else { 1408 yym1 := z.EncBinary() 1409 _ = yym1 1410 if false { 1411 } else if z.HasExtensions() && z.EncExt(x) { 1412 } else { 1413 yysep2 := !z.EncBinary() 1414 yy2arr2 := z.EncBasicHandle().StructToArray 1415 var yyq2 [4]bool 1416 _, _, _ = yysep2, yyq2, yy2arr2 1417 const yyr2 bool = false 1418 var yynn2 int 1419 if yyr2 || yy2arr2 { 1420 r.EncodeArrayStart(4) 1421 } else { 1422 yynn2 = 4 1423 for _, b := range yyq2 { 1424 if b { 1425 yynn2++ 1426 } 1427 } 1428 r.EncodeMapStart(yynn2) 1429 yynn2 = 0 1430 } 1431 if yyr2 || yy2arr2 { 1432 z.EncSendContainerState(codecSelfer_containerArrayElem100) 1433 x.Type.CodecEncodeSelf(e) 1434 } else { 1435 z.EncSendContainerState(codecSelfer_containerMapKey100) 1436 r.EncodeString(codecSelferC_UTF8100, string("Type")) 1437 z.EncSendContainerState(codecSelfer_containerMapValue100) 1438 x.Type.CodecEncodeSelf(e) 1439 } 1440 if yyr2 || yy2arr2 { 1441 z.EncSendContainerState(codecSelfer_containerArrayElem100) 1442 yym7 := z.EncBinary() 1443 _ = yym7 1444 if false { 1445 } else { 1446 r.EncodeString(codecSelferC_UTF8100, string(x.Name)) 1447 } 1448 } else { 1449 z.EncSendContainerState(codecSelfer_containerMapKey100) 1450 r.EncodeString(codecSelferC_UTF8100, string("Name")) 1451 z.EncSendContainerState(codecSelfer_containerMapValue100) 1452 yym8 := z.EncBinary() 1453 _ = yym8 1454 if false { 1455 } else { 1456 r.EncodeString(codecSelferC_UTF8100, string(x.Name)) 1457 } 1458 } 1459 if yyr2 || yy2arr2 { 1460 z.EncSendContainerState(codecSelfer_containerArrayElem100) 1461 if x.Fields == nil { 1462 r.EncodeNil() 1463 } else { 1464 yym10 := z.EncBinary() 1465 _ = yym10 1466 if false { 1467 } else { 1468 h.encSlicePtrtoFieldDiff(([]*FieldDiff)(x.Fields), e) 1469 } 1470 } 1471 } else { 1472 z.EncSendContainerState(codecSelfer_containerMapKey100) 1473 r.EncodeString(codecSelferC_UTF8100, string("Fields")) 1474 z.EncSendContainerState(codecSelfer_containerMapValue100) 1475 if x.Fields == nil { 1476 r.EncodeNil() 1477 } else { 1478 yym11 := z.EncBinary() 1479 _ = yym11 1480 if false { 1481 } else { 1482 h.encSlicePtrtoFieldDiff(([]*FieldDiff)(x.Fields), e) 1483 } 1484 } 1485 } 1486 if yyr2 || yy2arr2 { 1487 z.EncSendContainerState(codecSelfer_containerArrayElem100) 1488 if x.Objects == nil { 1489 r.EncodeNil() 1490 } else { 1491 yym13 := z.EncBinary() 1492 _ = yym13 1493 if false { 1494 } else { 1495 h.encSlicePtrtoObjectDiff(([]*ObjectDiff)(x.Objects), e) 1496 } 1497 } 1498 } else { 1499 z.EncSendContainerState(codecSelfer_containerMapKey100) 1500 r.EncodeString(codecSelferC_UTF8100, string("Objects")) 1501 z.EncSendContainerState(codecSelfer_containerMapValue100) 1502 if x.Objects == nil { 1503 r.EncodeNil() 1504 } else { 1505 yym14 := z.EncBinary() 1506 _ = yym14 1507 if false { 1508 } else { 1509 h.encSlicePtrtoObjectDiff(([]*ObjectDiff)(x.Objects), e) 1510 } 1511 } 1512 } 1513 if yyr2 || yy2arr2 { 1514 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 1515 } else { 1516 z.EncSendContainerState(codecSelfer_containerMapEnd100) 1517 } 1518 } 1519 } 1520 } 1521 1522 func (x *ObjectDiff) CodecDecodeSelf(d *codec1978.Decoder) { 1523 var h codecSelfer100 1524 z, r := codec1978.GenHelperDecoder(d) 1525 _, _, _ = h, z, r 1526 yym1 := z.DecBinary() 1527 _ = yym1 1528 if false { 1529 } else if z.HasExtensions() && z.DecExt(x) { 1530 } else { 1531 yyct2 := r.ContainerType() 1532 if yyct2 == codecSelferValueTypeMap100 { 1533 yyl2 := r.ReadMapStart() 1534 if yyl2 == 0 { 1535 z.DecSendContainerState(codecSelfer_containerMapEnd100) 1536 } else { 1537 x.codecDecodeSelfFromMap(yyl2, d) 1538 } 1539 } else if yyct2 == codecSelferValueTypeArray100 { 1540 yyl2 := r.ReadArrayStart() 1541 if yyl2 == 0 { 1542 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 1543 } else { 1544 x.codecDecodeSelfFromArray(yyl2, d) 1545 } 1546 } else { 1547 panic(codecSelferOnlyMapOrArrayEncodeToStructErr100) 1548 } 1549 } 1550 } 1551 1552 func (x *ObjectDiff) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { 1553 var h codecSelfer100 1554 z, r := codec1978.GenHelperDecoder(d) 1555 _, _, _ = h, z, r 1556 var yys3Slc = z.DecScratchBuffer() // default slice to decode into 1557 _ = yys3Slc 1558 var yyhl3 bool = l >= 0 1559 for yyj3 := 0; ; yyj3++ { 1560 if yyhl3 { 1561 if yyj3 >= l { 1562 break 1563 } 1564 } else { 1565 if r.CheckBreak() { 1566 break 1567 } 1568 } 1569 z.DecSendContainerState(codecSelfer_containerMapKey100) 1570 yys3Slc = r.DecodeBytes(yys3Slc, true, true) 1571 yys3 := string(yys3Slc) 1572 z.DecSendContainerState(codecSelfer_containerMapValue100) 1573 switch yys3 { 1574 case "Type": 1575 if r.TryDecodeAsNil() { 1576 x.Type = "" 1577 } else { 1578 yyv4 := &x.Type 1579 yyv4.CodecDecodeSelf(d) 1580 } 1581 case "Name": 1582 if r.TryDecodeAsNil() { 1583 x.Name = "" 1584 } else { 1585 yyv5 := &x.Name 1586 yym6 := z.DecBinary() 1587 _ = yym6 1588 if false { 1589 } else { 1590 *((*string)(yyv5)) = r.DecodeString() 1591 } 1592 } 1593 case "Fields": 1594 if r.TryDecodeAsNil() { 1595 x.Fields = nil 1596 } else { 1597 yyv7 := &x.Fields 1598 yym8 := z.DecBinary() 1599 _ = yym8 1600 if false { 1601 } else { 1602 h.decSlicePtrtoFieldDiff((*[]*FieldDiff)(yyv7), d) 1603 } 1604 } 1605 case "Objects": 1606 if r.TryDecodeAsNil() { 1607 x.Objects = nil 1608 } else { 1609 yyv9 := &x.Objects 1610 yym10 := z.DecBinary() 1611 _ = yym10 1612 if false { 1613 } else { 1614 h.decSlicePtrtoObjectDiff((*[]*ObjectDiff)(yyv9), d) 1615 } 1616 } 1617 default: 1618 z.DecStructFieldNotFound(-1, yys3) 1619 } // end switch yys3 1620 } // end for yyj3 1621 z.DecSendContainerState(codecSelfer_containerMapEnd100) 1622 } 1623 1624 func (x *ObjectDiff) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { 1625 var h codecSelfer100 1626 z, r := codec1978.GenHelperDecoder(d) 1627 _, _, _ = h, z, r 1628 var yyj11 int 1629 var yyb11 bool 1630 var yyhl11 bool = l >= 0 1631 yyj11++ 1632 if yyhl11 { 1633 yyb11 = yyj11 > l 1634 } else { 1635 yyb11 = r.CheckBreak() 1636 } 1637 if yyb11 { 1638 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 1639 return 1640 } 1641 z.DecSendContainerState(codecSelfer_containerArrayElem100) 1642 if r.TryDecodeAsNil() { 1643 x.Type = "" 1644 } else { 1645 yyv12 := &x.Type 1646 yyv12.CodecDecodeSelf(d) 1647 } 1648 yyj11++ 1649 if yyhl11 { 1650 yyb11 = yyj11 > l 1651 } else { 1652 yyb11 = r.CheckBreak() 1653 } 1654 if yyb11 { 1655 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 1656 return 1657 } 1658 z.DecSendContainerState(codecSelfer_containerArrayElem100) 1659 if r.TryDecodeAsNil() { 1660 x.Name = "" 1661 } else { 1662 yyv13 := &x.Name 1663 yym14 := z.DecBinary() 1664 _ = yym14 1665 if false { 1666 } else { 1667 *((*string)(yyv13)) = r.DecodeString() 1668 } 1669 } 1670 yyj11++ 1671 if yyhl11 { 1672 yyb11 = yyj11 > l 1673 } else { 1674 yyb11 = r.CheckBreak() 1675 } 1676 if yyb11 { 1677 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 1678 return 1679 } 1680 z.DecSendContainerState(codecSelfer_containerArrayElem100) 1681 if r.TryDecodeAsNil() { 1682 x.Fields = nil 1683 } else { 1684 yyv15 := &x.Fields 1685 yym16 := z.DecBinary() 1686 _ = yym16 1687 if false { 1688 } else { 1689 h.decSlicePtrtoFieldDiff((*[]*FieldDiff)(yyv15), d) 1690 } 1691 } 1692 yyj11++ 1693 if yyhl11 { 1694 yyb11 = yyj11 > l 1695 } else { 1696 yyb11 = r.CheckBreak() 1697 } 1698 if yyb11 { 1699 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 1700 return 1701 } 1702 z.DecSendContainerState(codecSelfer_containerArrayElem100) 1703 if r.TryDecodeAsNil() { 1704 x.Objects = nil 1705 } else { 1706 yyv17 := &x.Objects 1707 yym18 := z.DecBinary() 1708 _ = yym18 1709 if false { 1710 } else { 1711 h.decSlicePtrtoObjectDiff((*[]*ObjectDiff)(yyv17), d) 1712 } 1713 } 1714 for { 1715 yyj11++ 1716 if yyhl11 { 1717 yyb11 = yyj11 > l 1718 } else { 1719 yyb11 = r.CheckBreak() 1720 } 1721 if yyb11 { 1722 break 1723 } 1724 z.DecSendContainerState(codecSelfer_containerArrayElem100) 1725 z.DecStructFieldNotFound(yyj11-1, "") 1726 } 1727 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 1728 } 1729 1730 func (x ObjectDiffs) CodecEncodeSelf(e *codec1978.Encoder) { 1731 var h codecSelfer100 1732 z, r := codec1978.GenHelperEncoder(e) 1733 _, _, _ = h, z, r 1734 if x == nil { 1735 r.EncodeNil() 1736 } else { 1737 yym1 := z.EncBinary() 1738 _ = yym1 1739 if false { 1740 } else if z.HasExtensions() && z.EncExt(x) { 1741 } else { 1742 h.encObjectDiffs((ObjectDiffs)(x), e) 1743 } 1744 } 1745 } 1746 1747 func (x *ObjectDiffs) CodecDecodeSelf(d *codec1978.Decoder) { 1748 var h codecSelfer100 1749 z, r := codec1978.GenHelperDecoder(d) 1750 _, _, _ = h, z, r 1751 yym1 := z.DecBinary() 1752 _ = yym1 1753 if false { 1754 } else if z.HasExtensions() && z.DecExt(x) { 1755 } else { 1756 h.decObjectDiffs((*ObjectDiffs)(x), d) 1757 } 1758 } 1759 1760 func (x *FieldDiff) CodecEncodeSelf(e *codec1978.Encoder) { 1761 var h codecSelfer100 1762 z, r := codec1978.GenHelperEncoder(e) 1763 _, _, _ = h, z, r 1764 if x == nil { 1765 r.EncodeNil() 1766 } else { 1767 yym1 := z.EncBinary() 1768 _ = yym1 1769 if false { 1770 } else if z.HasExtensions() && z.EncExt(x) { 1771 } else { 1772 yysep2 := !z.EncBinary() 1773 yy2arr2 := z.EncBasicHandle().StructToArray 1774 var yyq2 [5]bool 1775 _, _, _ = yysep2, yyq2, yy2arr2 1776 const yyr2 bool = false 1777 var yynn2 int 1778 if yyr2 || yy2arr2 { 1779 r.EncodeArrayStart(5) 1780 } else { 1781 yynn2 = 5 1782 for _, b := range yyq2 { 1783 if b { 1784 yynn2++ 1785 } 1786 } 1787 r.EncodeMapStart(yynn2) 1788 yynn2 = 0 1789 } 1790 if yyr2 || yy2arr2 { 1791 z.EncSendContainerState(codecSelfer_containerArrayElem100) 1792 x.Type.CodecEncodeSelf(e) 1793 } else { 1794 z.EncSendContainerState(codecSelfer_containerMapKey100) 1795 r.EncodeString(codecSelferC_UTF8100, string("Type")) 1796 z.EncSendContainerState(codecSelfer_containerMapValue100) 1797 x.Type.CodecEncodeSelf(e) 1798 } 1799 if yyr2 || yy2arr2 { 1800 z.EncSendContainerState(codecSelfer_containerArrayElem100) 1801 yym7 := z.EncBinary() 1802 _ = yym7 1803 if false { 1804 } else { 1805 r.EncodeString(codecSelferC_UTF8100, string(x.Name)) 1806 } 1807 } else { 1808 z.EncSendContainerState(codecSelfer_containerMapKey100) 1809 r.EncodeString(codecSelferC_UTF8100, string("Name")) 1810 z.EncSendContainerState(codecSelfer_containerMapValue100) 1811 yym8 := z.EncBinary() 1812 _ = yym8 1813 if false { 1814 } else { 1815 r.EncodeString(codecSelferC_UTF8100, string(x.Name)) 1816 } 1817 } 1818 if yyr2 || yy2arr2 { 1819 z.EncSendContainerState(codecSelfer_containerArrayElem100) 1820 yym10 := z.EncBinary() 1821 _ = yym10 1822 if false { 1823 } else { 1824 r.EncodeString(codecSelferC_UTF8100, string(x.Old)) 1825 } 1826 } else { 1827 z.EncSendContainerState(codecSelfer_containerMapKey100) 1828 r.EncodeString(codecSelferC_UTF8100, string("Old")) 1829 z.EncSendContainerState(codecSelfer_containerMapValue100) 1830 yym11 := z.EncBinary() 1831 _ = yym11 1832 if false { 1833 } else { 1834 r.EncodeString(codecSelferC_UTF8100, string(x.Old)) 1835 } 1836 } 1837 if yyr2 || yy2arr2 { 1838 z.EncSendContainerState(codecSelfer_containerArrayElem100) 1839 yym13 := z.EncBinary() 1840 _ = yym13 1841 if false { 1842 } else { 1843 r.EncodeString(codecSelferC_UTF8100, string(x.New)) 1844 } 1845 } else { 1846 z.EncSendContainerState(codecSelfer_containerMapKey100) 1847 r.EncodeString(codecSelferC_UTF8100, string("New")) 1848 z.EncSendContainerState(codecSelfer_containerMapValue100) 1849 yym14 := z.EncBinary() 1850 _ = yym14 1851 if false { 1852 } else { 1853 r.EncodeString(codecSelferC_UTF8100, string(x.New)) 1854 } 1855 } 1856 if yyr2 || yy2arr2 { 1857 z.EncSendContainerState(codecSelfer_containerArrayElem100) 1858 if x.Annotations == nil { 1859 r.EncodeNil() 1860 } else { 1861 yym16 := z.EncBinary() 1862 _ = yym16 1863 if false { 1864 } else { 1865 z.F.EncSliceStringV(x.Annotations, false, e) 1866 } 1867 } 1868 } else { 1869 z.EncSendContainerState(codecSelfer_containerMapKey100) 1870 r.EncodeString(codecSelferC_UTF8100, string("Annotations")) 1871 z.EncSendContainerState(codecSelfer_containerMapValue100) 1872 if x.Annotations == nil { 1873 r.EncodeNil() 1874 } else { 1875 yym17 := z.EncBinary() 1876 _ = yym17 1877 if false { 1878 } else { 1879 z.F.EncSliceStringV(x.Annotations, false, e) 1880 } 1881 } 1882 } 1883 if yyr2 || yy2arr2 { 1884 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 1885 } else { 1886 z.EncSendContainerState(codecSelfer_containerMapEnd100) 1887 } 1888 } 1889 } 1890 } 1891 1892 func (x *FieldDiff) CodecDecodeSelf(d *codec1978.Decoder) { 1893 var h codecSelfer100 1894 z, r := codec1978.GenHelperDecoder(d) 1895 _, _, _ = h, z, r 1896 yym1 := z.DecBinary() 1897 _ = yym1 1898 if false { 1899 } else if z.HasExtensions() && z.DecExt(x) { 1900 } else { 1901 yyct2 := r.ContainerType() 1902 if yyct2 == codecSelferValueTypeMap100 { 1903 yyl2 := r.ReadMapStart() 1904 if yyl2 == 0 { 1905 z.DecSendContainerState(codecSelfer_containerMapEnd100) 1906 } else { 1907 x.codecDecodeSelfFromMap(yyl2, d) 1908 } 1909 } else if yyct2 == codecSelferValueTypeArray100 { 1910 yyl2 := r.ReadArrayStart() 1911 if yyl2 == 0 { 1912 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 1913 } else { 1914 x.codecDecodeSelfFromArray(yyl2, d) 1915 } 1916 } else { 1917 panic(codecSelferOnlyMapOrArrayEncodeToStructErr100) 1918 } 1919 } 1920 } 1921 1922 func (x *FieldDiff) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { 1923 var h codecSelfer100 1924 z, r := codec1978.GenHelperDecoder(d) 1925 _, _, _ = h, z, r 1926 var yys3Slc = z.DecScratchBuffer() // default slice to decode into 1927 _ = yys3Slc 1928 var yyhl3 bool = l >= 0 1929 for yyj3 := 0; ; yyj3++ { 1930 if yyhl3 { 1931 if yyj3 >= l { 1932 break 1933 } 1934 } else { 1935 if r.CheckBreak() { 1936 break 1937 } 1938 } 1939 z.DecSendContainerState(codecSelfer_containerMapKey100) 1940 yys3Slc = r.DecodeBytes(yys3Slc, true, true) 1941 yys3 := string(yys3Slc) 1942 z.DecSendContainerState(codecSelfer_containerMapValue100) 1943 switch yys3 { 1944 case "Type": 1945 if r.TryDecodeAsNil() { 1946 x.Type = "" 1947 } else { 1948 yyv4 := &x.Type 1949 yyv4.CodecDecodeSelf(d) 1950 } 1951 case "Name": 1952 if r.TryDecodeAsNil() { 1953 x.Name = "" 1954 } else { 1955 yyv5 := &x.Name 1956 yym6 := z.DecBinary() 1957 _ = yym6 1958 if false { 1959 } else { 1960 *((*string)(yyv5)) = r.DecodeString() 1961 } 1962 } 1963 case "Old": 1964 if r.TryDecodeAsNil() { 1965 x.Old = "" 1966 } else { 1967 yyv7 := &x.Old 1968 yym8 := z.DecBinary() 1969 _ = yym8 1970 if false { 1971 } else { 1972 *((*string)(yyv7)) = r.DecodeString() 1973 } 1974 } 1975 case "New": 1976 if r.TryDecodeAsNil() { 1977 x.New = "" 1978 } else { 1979 yyv9 := &x.New 1980 yym10 := z.DecBinary() 1981 _ = yym10 1982 if false { 1983 } else { 1984 *((*string)(yyv9)) = r.DecodeString() 1985 } 1986 } 1987 case "Annotations": 1988 if r.TryDecodeAsNil() { 1989 x.Annotations = nil 1990 } else { 1991 yyv11 := &x.Annotations 1992 yym12 := z.DecBinary() 1993 _ = yym12 1994 if false { 1995 } else { 1996 z.F.DecSliceStringX(yyv11, false, d) 1997 } 1998 } 1999 default: 2000 z.DecStructFieldNotFound(-1, yys3) 2001 } // end switch yys3 2002 } // end for yyj3 2003 z.DecSendContainerState(codecSelfer_containerMapEnd100) 2004 } 2005 2006 func (x *FieldDiff) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { 2007 var h codecSelfer100 2008 z, r := codec1978.GenHelperDecoder(d) 2009 _, _, _ = h, z, r 2010 var yyj13 int 2011 var yyb13 bool 2012 var yyhl13 bool = l >= 0 2013 yyj13++ 2014 if yyhl13 { 2015 yyb13 = yyj13 > l 2016 } else { 2017 yyb13 = r.CheckBreak() 2018 } 2019 if yyb13 { 2020 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 2021 return 2022 } 2023 z.DecSendContainerState(codecSelfer_containerArrayElem100) 2024 if r.TryDecodeAsNil() { 2025 x.Type = "" 2026 } else { 2027 yyv14 := &x.Type 2028 yyv14.CodecDecodeSelf(d) 2029 } 2030 yyj13++ 2031 if yyhl13 { 2032 yyb13 = yyj13 > l 2033 } else { 2034 yyb13 = r.CheckBreak() 2035 } 2036 if yyb13 { 2037 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 2038 return 2039 } 2040 z.DecSendContainerState(codecSelfer_containerArrayElem100) 2041 if r.TryDecodeAsNil() { 2042 x.Name = "" 2043 } else { 2044 yyv15 := &x.Name 2045 yym16 := z.DecBinary() 2046 _ = yym16 2047 if false { 2048 } else { 2049 *((*string)(yyv15)) = r.DecodeString() 2050 } 2051 } 2052 yyj13++ 2053 if yyhl13 { 2054 yyb13 = yyj13 > l 2055 } else { 2056 yyb13 = r.CheckBreak() 2057 } 2058 if yyb13 { 2059 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 2060 return 2061 } 2062 z.DecSendContainerState(codecSelfer_containerArrayElem100) 2063 if r.TryDecodeAsNil() { 2064 x.Old = "" 2065 } else { 2066 yyv17 := &x.Old 2067 yym18 := z.DecBinary() 2068 _ = yym18 2069 if false { 2070 } else { 2071 *((*string)(yyv17)) = r.DecodeString() 2072 } 2073 } 2074 yyj13++ 2075 if yyhl13 { 2076 yyb13 = yyj13 > l 2077 } else { 2078 yyb13 = r.CheckBreak() 2079 } 2080 if yyb13 { 2081 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 2082 return 2083 } 2084 z.DecSendContainerState(codecSelfer_containerArrayElem100) 2085 if r.TryDecodeAsNil() { 2086 x.New = "" 2087 } else { 2088 yyv19 := &x.New 2089 yym20 := z.DecBinary() 2090 _ = yym20 2091 if false { 2092 } else { 2093 *((*string)(yyv19)) = r.DecodeString() 2094 } 2095 } 2096 yyj13++ 2097 if yyhl13 { 2098 yyb13 = yyj13 > l 2099 } else { 2100 yyb13 = r.CheckBreak() 2101 } 2102 if yyb13 { 2103 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 2104 return 2105 } 2106 z.DecSendContainerState(codecSelfer_containerArrayElem100) 2107 if r.TryDecodeAsNil() { 2108 x.Annotations = nil 2109 } else { 2110 yyv21 := &x.Annotations 2111 yym22 := z.DecBinary() 2112 _ = yym22 2113 if false { 2114 } else { 2115 z.F.DecSliceStringX(yyv21, false, d) 2116 } 2117 } 2118 for { 2119 yyj13++ 2120 if yyhl13 { 2121 yyb13 = yyj13 > l 2122 } else { 2123 yyb13 = r.CheckBreak() 2124 } 2125 if yyb13 { 2126 break 2127 } 2128 z.DecSendContainerState(codecSelfer_containerArrayElem100) 2129 z.DecStructFieldNotFound(yyj13-1, "") 2130 } 2131 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 2132 } 2133 2134 func (x FieldDiffs) CodecEncodeSelf(e *codec1978.Encoder) { 2135 var h codecSelfer100 2136 z, r := codec1978.GenHelperEncoder(e) 2137 _, _, _ = h, z, r 2138 if x == nil { 2139 r.EncodeNil() 2140 } else { 2141 yym1 := z.EncBinary() 2142 _ = yym1 2143 if false { 2144 } else if z.HasExtensions() && z.EncExt(x) { 2145 } else { 2146 h.encFieldDiffs((FieldDiffs)(x), e) 2147 } 2148 } 2149 } 2150 2151 func (x *FieldDiffs) CodecDecodeSelf(d *codec1978.Decoder) { 2152 var h codecSelfer100 2153 z, r := codec1978.GenHelperDecoder(d) 2154 _, _, _ = h, z, r 2155 yym1 := z.DecBinary() 2156 _ = yym1 2157 if false { 2158 } else if z.HasExtensions() && z.DecExt(x) { 2159 } else { 2160 h.decFieldDiffs((*FieldDiffs)(x), d) 2161 } 2162 } 2163 2164 func (x *NetworkIndex) CodecEncodeSelf(e *codec1978.Encoder) { 2165 var h codecSelfer100 2166 z, r := codec1978.GenHelperEncoder(e) 2167 _, _, _ = h, z, r 2168 if x == nil { 2169 r.EncodeNil() 2170 } else { 2171 yym1 := z.EncBinary() 2172 _ = yym1 2173 if false { 2174 } else if z.HasExtensions() && z.EncExt(x) { 2175 } else { 2176 yysep2 := !z.EncBinary() 2177 yy2arr2 := z.EncBasicHandle().StructToArray 2178 var yyq2 [4]bool 2179 _, _, _ = yysep2, yyq2, yy2arr2 2180 const yyr2 bool = false 2181 var yynn2 int 2182 if yyr2 || yy2arr2 { 2183 r.EncodeArrayStart(4) 2184 } else { 2185 yynn2 = 4 2186 for _, b := range yyq2 { 2187 if b { 2188 yynn2++ 2189 } 2190 } 2191 r.EncodeMapStart(yynn2) 2192 yynn2 = 0 2193 } 2194 if yyr2 || yy2arr2 { 2195 z.EncSendContainerState(codecSelfer_containerArrayElem100) 2196 if x.AvailNetworks == nil { 2197 r.EncodeNil() 2198 } else { 2199 yym4 := z.EncBinary() 2200 _ = yym4 2201 if false { 2202 } else { 2203 h.encSlicePtrtoNetworkResource(([]*NetworkResource)(x.AvailNetworks), e) 2204 } 2205 } 2206 } else { 2207 z.EncSendContainerState(codecSelfer_containerMapKey100) 2208 r.EncodeString(codecSelferC_UTF8100, string("AvailNetworks")) 2209 z.EncSendContainerState(codecSelfer_containerMapValue100) 2210 if x.AvailNetworks == nil { 2211 r.EncodeNil() 2212 } else { 2213 yym5 := z.EncBinary() 2214 _ = yym5 2215 if false { 2216 } else { 2217 h.encSlicePtrtoNetworkResource(([]*NetworkResource)(x.AvailNetworks), e) 2218 } 2219 } 2220 } 2221 if yyr2 || yy2arr2 { 2222 z.EncSendContainerState(codecSelfer_containerArrayElem100) 2223 if x.AvailBandwidth == nil { 2224 r.EncodeNil() 2225 } else { 2226 yym7 := z.EncBinary() 2227 _ = yym7 2228 if false { 2229 } else { 2230 z.F.EncMapStringIntV(x.AvailBandwidth, false, e) 2231 } 2232 } 2233 } else { 2234 z.EncSendContainerState(codecSelfer_containerMapKey100) 2235 r.EncodeString(codecSelferC_UTF8100, string("AvailBandwidth")) 2236 z.EncSendContainerState(codecSelfer_containerMapValue100) 2237 if x.AvailBandwidth == nil { 2238 r.EncodeNil() 2239 } else { 2240 yym8 := z.EncBinary() 2241 _ = yym8 2242 if false { 2243 } else { 2244 z.F.EncMapStringIntV(x.AvailBandwidth, false, e) 2245 } 2246 } 2247 } 2248 if yyr2 || yy2arr2 { 2249 z.EncSendContainerState(codecSelfer_containerArrayElem100) 2250 if x.UsedPorts == nil { 2251 r.EncodeNil() 2252 } else { 2253 yym10 := z.EncBinary() 2254 _ = yym10 2255 if false { 2256 } else { 2257 h.encMapstringBitmap((map[string]Bitmap)(x.UsedPorts), e) 2258 } 2259 } 2260 } else { 2261 z.EncSendContainerState(codecSelfer_containerMapKey100) 2262 r.EncodeString(codecSelferC_UTF8100, string("UsedPorts")) 2263 z.EncSendContainerState(codecSelfer_containerMapValue100) 2264 if x.UsedPorts == nil { 2265 r.EncodeNil() 2266 } else { 2267 yym11 := z.EncBinary() 2268 _ = yym11 2269 if false { 2270 } else { 2271 h.encMapstringBitmap((map[string]Bitmap)(x.UsedPorts), e) 2272 } 2273 } 2274 } 2275 if yyr2 || yy2arr2 { 2276 z.EncSendContainerState(codecSelfer_containerArrayElem100) 2277 if x.UsedBandwidth == nil { 2278 r.EncodeNil() 2279 } else { 2280 yym13 := z.EncBinary() 2281 _ = yym13 2282 if false { 2283 } else { 2284 z.F.EncMapStringIntV(x.UsedBandwidth, false, e) 2285 } 2286 } 2287 } else { 2288 z.EncSendContainerState(codecSelfer_containerMapKey100) 2289 r.EncodeString(codecSelferC_UTF8100, string("UsedBandwidth")) 2290 z.EncSendContainerState(codecSelfer_containerMapValue100) 2291 if x.UsedBandwidth == nil { 2292 r.EncodeNil() 2293 } else { 2294 yym14 := z.EncBinary() 2295 _ = yym14 2296 if false { 2297 } else { 2298 z.F.EncMapStringIntV(x.UsedBandwidth, false, e) 2299 } 2300 } 2301 } 2302 if yyr2 || yy2arr2 { 2303 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 2304 } else { 2305 z.EncSendContainerState(codecSelfer_containerMapEnd100) 2306 } 2307 } 2308 } 2309 } 2310 2311 func (x *NetworkIndex) CodecDecodeSelf(d *codec1978.Decoder) { 2312 var h codecSelfer100 2313 z, r := codec1978.GenHelperDecoder(d) 2314 _, _, _ = h, z, r 2315 yym1 := z.DecBinary() 2316 _ = yym1 2317 if false { 2318 } else if z.HasExtensions() && z.DecExt(x) { 2319 } else { 2320 yyct2 := r.ContainerType() 2321 if yyct2 == codecSelferValueTypeMap100 { 2322 yyl2 := r.ReadMapStart() 2323 if yyl2 == 0 { 2324 z.DecSendContainerState(codecSelfer_containerMapEnd100) 2325 } else { 2326 x.codecDecodeSelfFromMap(yyl2, d) 2327 } 2328 } else if yyct2 == codecSelferValueTypeArray100 { 2329 yyl2 := r.ReadArrayStart() 2330 if yyl2 == 0 { 2331 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 2332 } else { 2333 x.codecDecodeSelfFromArray(yyl2, d) 2334 } 2335 } else { 2336 panic(codecSelferOnlyMapOrArrayEncodeToStructErr100) 2337 } 2338 } 2339 } 2340 2341 func (x *NetworkIndex) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { 2342 var h codecSelfer100 2343 z, r := codec1978.GenHelperDecoder(d) 2344 _, _, _ = h, z, r 2345 var yys3Slc = z.DecScratchBuffer() // default slice to decode into 2346 _ = yys3Slc 2347 var yyhl3 bool = l >= 0 2348 for yyj3 := 0; ; yyj3++ { 2349 if yyhl3 { 2350 if yyj3 >= l { 2351 break 2352 } 2353 } else { 2354 if r.CheckBreak() { 2355 break 2356 } 2357 } 2358 z.DecSendContainerState(codecSelfer_containerMapKey100) 2359 yys3Slc = r.DecodeBytes(yys3Slc, true, true) 2360 yys3 := string(yys3Slc) 2361 z.DecSendContainerState(codecSelfer_containerMapValue100) 2362 switch yys3 { 2363 case "AvailNetworks": 2364 if r.TryDecodeAsNil() { 2365 x.AvailNetworks = nil 2366 } else { 2367 yyv4 := &x.AvailNetworks 2368 yym5 := z.DecBinary() 2369 _ = yym5 2370 if false { 2371 } else { 2372 h.decSlicePtrtoNetworkResource((*[]*NetworkResource)(yyv4), d) 2373 } 2374 } 2375 case "AvailBandwidth": 2376 if r.TryDecodeAsNil() { 2377 x.AvailBandwidth = nil 2378 } else { 2379 yyv6 := &x.AvailBandwidth 2380 yym7 := z.DecBinary() 2381 _ = yym7 2382 if false { 2383 } else { 2384 z.F.DecMapStringIntX(yyv6, false, d) 2385 } 2386 } 2387 case "UsedPorts": 2388 if r.TryDecodeAsNil() { 2389 x.UsedPorts = nil 2390 } else { 2391 yyv8 := &x.UsedPorts 2392 yym9 := z.DecBinary() 2393 _ = yym9 2394 if false { 2395 } else { 2396 h.decMapstringBitmap((*map[string]Bitmap)(yyv8), d) 2397 } 2398 } 2399 case "UsedBandwidth": 2400 if r.TryDecodeAsNil() { 2401 x.UsedBandwidth = nil 2402 } else { 2403 yyv10 := &x.UsedBandwidth 2404 yym11 := z.DecBinary() 2405 _ = yym11 2406 if false { 2407 } else { 2408 z.F.DecMapStringIntX(yyv10, false, d) 2409 } 2410 } 2411 default: 2412 z.DecStructFieldNotFound(-1, yys3) 2413 } // end switch yys3 2414 } // end for yyj3 2415 z.DecSendContainerState(codecSelfer_containerMapEnd100) 2416 } 2417 2418 func (x *NetworkIndex) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { 2419 var h codecSelfer100 2420 z, r := codec1978.GenHelperDecoder(d) 2421 _, _, _ = h, z, r 2422 var yyj12 int 2423 var yyb12 bool 2424 var yyhl12 bool = l >= 0 2425 yyj12++ 2426 if yyhl12 { 2427 yyb12 = yyj12 > l 2428 } else { 2429 yyb12 = r.CheckBreak() 2430 } 2431 if yyb12 { 2432 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 2433 return 2434 } 2435 z.DecSendContainerState(codecSelfer_containerArrayElem100) 2436 if r.TryDecodeAsNil() { 2437 x.AvailNetworks = nil 2438 } else { 2439 yyv13 := &x.AvailNetworks 2440 yym14 := z.DecBinary() 2441 _ = yym14 2442 if false { 2443 } else { 2444 h.decSlicePtrtoNetworkResource((*[]*NetworkResource)(yyv13), d) 2445 } 2446 } 2447 yyj12++ 2448 if yyhl12 { 2449 yyb12 = yyj12 > l 2450 } else { 2451 yyb12 = r.CheckBreak() 2452 } 2453 if yyb12 { 2454 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 2455 return 2456 } 2457 z.DecSendContainerState(codecSelfer_containerArrayElem100) 2458 if r.TryDecodeAsNil() { 2459 x.AvailBandwidth = nil 2460 } else { 2461 yyv15 := &x.AvailBandwidth 2462 yym16 := z.DecBinary() 2463 _ = yym16 2464 if false { 2465 } else { 2466 z.F.DecMapStringIntX(yyv15, false, d) 2467 } 2468 } 2469 yyj12++ 2470 if yyhl12 { 2471 yyb12 = yyj12 > l 2472 } else { 2473 yyb12 = r.CheckBreak() 2474 } 2475 if yyb12 { 2476 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 2477 return 2478 } 2479 z.DecSendContainerState(codecSelfer_containerArrayElem100) 2480 if r.TryDecodeAsNil() { 2481 x.UsedPorts = nil 2482 } else { 2483 yyv17 := &x.UsedPorts 2484 yym18 := z.DecBinary() 2485 _ = yym18 2486 if false { 2487 } else { 2488 h.decMapstringBitmap((*map[string]Bitmap)(yyv17), d) 2489 } 2490 } 2491 yyj12++ 2492 if yyhl12 { 2493 yyb12 = yyj12 > l 2494 } else { 2495 yyb12 = r.CheckBreak() 2496 } 2497 if yyb12 { 2498 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 2499 return 2500 } 2501 z.DecSendContainerState(codecSelfer_containerArrayElem100) 2502 if r.TryDecodeAsNil() { 2503 x.UsedBandwidth = nil 2504 } else { 2505 yyv19 := &x.UsedBandwidth 2506 yym20 := z.DecBinary() 2507 _ = yym20 2508 if false { 2509 } else { 2510 z.F.DecMapStringIntX(yyv19, false, d) 2511 } 2512 } 2513 for { 2514 yyj12++ 2515 if yyhl12 { 2516 yyb12 = yyj12 > l 2517 } else { 2518 yyb12 = r.CheckBreak() 2519 } 2520 if yyb12 { 2521 break 2522 } 2523 z.DecSendContainerState(codecSelfer_containerArrayElem100) 2524 z.DecStructFieldNotFound(yyj12-1, "") 2525 } 2526 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 2527 } 2528 2529 func (x *RaftServer) CodecEncodeSelf(e *codec1978.Encoder) { 2530 var h codecSelfer100 2531 z, r := codec1978.GenHelperEncoder(e) 2532 _, _, _ = h, z, r 2533 if x == nil { 2534 r.EncodeNil() 2535 } else { 2536 yym1 := z.EncBinary() 2537 _ = yym1 2538 if false { 2539 } else if z.HasExtensions() && z.EncExt(x) { 2540 } else { 2541 yysep2 := !z.EncBinary() 2542 yy2arr2 := z.EncBasicHandle().StructToArray 2543 var yyq2 [6]bool 2544 _, _, _ = yysep2, yyq2, yy2arr2 2545 const yyr2 bool = false 2546 var yynn2 int 2547 if yyr2 || yy2arr2 { 2548 r.EncodeArrayStart(6) 2549 } else { 2550 yynn2 = 6 2551 for _, b := range yyq2 { 2552 if b { 2553 yynn2++ 2554 } 2555 } 2556 r.EncodeMapStart(yynn2) 2557 yynn2 = 0 2558 } 2559 if yyr2 || yy2arr2 { 2560 z.EncSendContainerState(codecSelfer_containerArrayElem100) 2561 yym4 := z.EncBinary() 2562 _ = yym4 2563 if false { 2564 } else if z.HasExtensions() && z.EncExt(x.ID) { 2565 } else { 2566 r.EncodeString(codecSelferC_UTF8100, string(x.ID)) 2567 } 2568 } else { 2569 z.EncSendContainerState(codecSelfer_containerMapKey100) 2570 r.EncodeString(codecSelferC_UTF8100, string("ID")) 2571 z.EncSendContainerState(codecSelfer_containerMapValue100) 2572 yym5 := z.EncBinary() 2573 _ = yym5 2574 if false { 2575 } else if z.HasExtensions() && z.EncExt(x.ID) { 2576 } else { 2577 r.EncodeString(codecSelferC_UTF8100, string(x.ID)) 2578 } 2579 } 2580 if yyr2 || yy2arr2 { 2581 z.EncSendContainerState(codecSelfer_containerArrayElem100) 2582 yym7 := z.EncBinary() 2583 _ = yym7 2584 if false { 2585 } else { 2586 r.EncodeString(codecSelferC_UTF8100, string(x.Node)) 2587 } 2588 } else { 2589 z.EncSendContainerState(codecSelfer_containerMapKey100) 2590 r.EncodeString(codecSelferC_UTF8100, string("Node")) 2591 z.EncSendContainerState(codecSelfer_containerMapValue100) 2592 yym8 := z.EncBinary() 2593 _ = yym8 2594 if false { 2595 } else { 2596 r.EncodeString(codecSelferC_UTF8100, string(x.Node)) 2597 } 2598 } 2599 if yyr2 || yy2arr2 { 2600 z.EncSendContainerState(codecSelfer_containerArrayElem100) 2601 yym10 := z.EncBinary() 2602 _ = yym10 2603 if false { 2604 } else if z.HasExtensions() && z.EncExt(x.Address) { 2605 } else { 2606 r.EncodeString(codecSelferC_UTF8100, string(x.Address)) 2607 } 2608 } else { 2609 z.EncSendContainerState(codecSelfer_containerMapKey100) 2610 r.EncodeString(codecSelferC_UTF8100, string("Address")) 2611 z.EncSendContainerState(codecSelfer_containerMapValue100) 2612 yym11 := z.EncBinary() 2613 _ = yym11 2614 if false { 2615 } else if z.HasExtensions() && z.EncExt(x.Address) { 2616 } else { 2617 r.EncodeString(codecSelferC_UTF8100, string(x.Address)) 2618 } 2619 } 2620 if yyr2 || yy2arr2 { 2621 z.EncSendContainerState(codecSelfer_containerArrayElem100) 2622 yym13 := z.EncBinary() 2623 _ = yym13 2624 if false { 2625 } else { 2626 r.EncodeBool(bool(x.Leader)) 2627 } 2628 } else { 2629 z.EncSendContainerState(codecSelfer_containerMapKey100) 2630 r.EncodeString(codecSelferC_UTF8100, string("Leader")) 2631 z.EncSendContainerState(codecSelfer_containerMapValue100) 2632 yym14 := z.EncBinary() 2633 _ = yym14 2634 if false { 2635 } else { 2636 r.EncodeBool(bool(x.Leader)) 2637 } 2638 } 2639 if yyr2 || yy2arr2 { 2640 z.EncSendContainerState(codecSelfer_containerArrayElem100) 2641 yym16 := z.EncBinary() 2642 _ = yym16 2643 if false { 2644 } else { 2645 r.EncodeBool(bool(x.Voter)) 2646 } 2647 } else { 2648 z.EncSendContainerState(codecSelfer_containerMapKey100) 2649 r.EncodeString(codecSelferC_UTF8100, string("Voter")) 2650 z.EncSendContainerState(codecSelfer_containerMapValue100) 2651 yym17 := z.EncBinary() 2652 _ = yym17 2653 if false { 2654 } else { 2655 r.EncodeBool(bool(x.Voter)) 2656 } 2657 } 2658 if yyr2 || yy2arr2 { 2659 z.EncSendContainerState(codecSelfer_containerArrayElem100) 2660 yym19 := z.EncBinary() 2661 _ = yym19 2662 if false { 2663 } else { 2664 r.EncodeString(codecSelferC_UTF8100, string(x.RaftProtocol)) 2665 } 2666 } else { 2667 z.EncSendContainerState(codecSelfer_containerMapKey100) 2668 r.EncodeString(codecSelferC_UTF8100, string("RaftProtocol")) 2669 z.EncSendContainerState(codecSelfer_containerMapValue100) 2670 yym20 := z.EncBinary() 2671 _ = yym20 2672 if false { 2673 } else { 2674 r.EncodeString(codecSelferC_UTF8100, string(x.RaftProtocol)) 2675 } 2676 } 2677 if yyr2 || yy2arr2 { 2678 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 2679 } else { 2680 z.EncSendContainerState(codecSelfer_containerMapEnd100) 2681 } 2682 } 2683 } 2684 } 2685 2686 func (x *RaftServer) CodecDecodeSelf(d *codec1978.Decoder) { 2687 var h codecSelfer100 2688 z, r := codec1978.GenHelperDecoder(d) 2689 _, _, _ = h, z, r 2690 yym1 := z.DecBinary() 2691 _ = yym1 2692 if false { 2693 } else if z.HasExtensions() && z.DecExt(x) { 2694 } else { 2695 yyct2 := r.ContainerType() 2696 if yyct2 == codecSelferValueTypeMap100 { 2697 yyl2 := r.ReadMapStart() 2698 if yyl2 == 0 { 2699 z.DecSendContainerState(codecSelfer_containerMapEnd100) 2700 } else { 2701 x.codecDecodeSelfFromMap(yyl2, d) 2702 } 2703 } else if yyct2 == codecSelferValueTypeArray100 { 2704 yyl2 := r.ReadArrayStart() 2705 if yyl2 == 0 { 2706 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 2707 } else { 2708 x.codecDecodeSelfFromArray(yyl2, d) 2709 } 2710 } else { 2711 panic(codecSelferOnlyMapOrArrayEncodeToStructErr100) 2712 } 2713 } 2714 } 2715 2716 func (x *RaftServer) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { 2717 var h codecSelfer100 2718 z, r := codec1978.GenHelperDecoder(d) 2719 _, _, _ = h, z, r 2720 var yys3Slc = z.DecScratchBuffer() // default slice to decode into 2721 _ = yys3Slc 2722 var yyhl3 bool = l >= 0 2723 for yyj3 := 0; ; yyj3++ { 2724 if yyhl3 { 2725 if yyj3 >= l { 2726 break 2727 } 2728 } else { 2729 if r.CheckBreak() { 2730 break 2731 } 2732 } 2733 z.DecSendContainerState(codecSelfer_containerMapKey100) 2734 yys3Slc = r.DecodeBytes(yys3Slc, true, true) 2735 yys3 := string(yys3Slc) 2736 z.DecSendContainerState(codecSelfer_containerMapValue100) 2737 switch yys3 { 2738 case "ID": 2739 if r.TryDecodeAsNil() { 2740 x.ID = "" 2741 } else { 2742 yyv4 := &x.ID 2743 yym5 := z.DecBinary() 2744 _ = yym5 2745 if false { 2746 } else if z.HasExtensions() && z.DecExt(yyv4) { 2747 } else { 2748 *((*string)(yyv4)) = r.DecodeString() 2749 } 2750 } 2751 case "Node": 2752 if r.TryDecodeAsNil() { 2753 x.Node = "" 2754 } else { 2755 yyv6 := &x.Node 2756 yym7 := z.DecBinary() 2757 _ = yym7 2758 if false { 2759 } else { 2760 *((*string)(yyv6)) = r.DecodeString() 2761 } 2762 } 2763 case "Address": 2764 if r.TryDecodeAsNil() { 2765 x.Address = "" 2766 } else { 2767 yyv8 := &x.Address 2768 yym9 := z.DecBinary() 2769 _ = yym9 2770 if false { 2771 } else if z.HasExtensions() && z.DecExt(yyv8) { 2772 } else { 2773 *((*string)(yyv8)) = r.DecodeString() 2774 } 2775 } 2776 case "Leader": 2777 if r.TryDecodeAsNil() { 2778 x.Leader = false 2779 } else { 2780 yyv10 := &x.Leader 2781 yym11 := z.DecBinary() 2782 _ = yym11 2783 if false { 2784 } else { 2785 *((*bool)(yyv10)) = r.DecodeBool() 2786 } 2787 } 2788 case "Voter": 2789 if r.TryDecodeAsNil() { 2790 x.Voter = false 2791 } else { 2792 yyv12 := &x.Voter 2793 yym13 := z.DecBinary() 2794 _ = yym13 2795 if false { 2796 } else { 2797 *((*bool)(yyv12)) = r.DecodeBool() 2798 } 2799 } 2800 case "RaftProtocol": 2801 if r.TryDecodeAsNil() { 2802 x.RaftProtocol = "" 2803 } else { 2804 yyv14 := &x.RaftProtocol 2805 yym15 := z.DecBinary() 2806 _ = yym15 2807 if false { 2808 } else { 2809 *((*string)(yyv14)) = r.DecodeString() 2810 } 2811 } 2812 default: 2813 z.DecStructFieldNotFound(-1, yys3) 2814 } // end switch yys3 2815 } // end for yyj3 2816 z.DecSendContainerState(codecSelfer_containerMapEnd100) 2817 } 2818 2819 func (x *RaftServer) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { 2820 var h codecSelfer100 2821 z, r := codec1978.GenHelperDecoder(d) 2822 _, _, _ = h, z, r 2823 var yyj16 int 2824 var yyb16 bool 2825 var yyhl16 bool = l >= 0 2826 yyj16++ 2827 if yyhl16 { 2828 yyb16 = yyj16 > l 2829 } else { 2830 yyb16 = r.CheckBreak() 2831 } 2832 if yyb16 { 2833 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 2834 return 2835 } 2836 z.DecSendContainerState(codecSelfer_containerArrayElem100) 2837 if r.TryDecodeAsNil() { 2838 x.ID = "" 2839 } else { 2840 yyv17 := &x.ID 2841 yym18 := z.DecBinary() 2842 _ = yym18 2843 if false { 2844 } else if z.HasExtensions() && z.DecExt(yyv17) { 2845 } else { 2846 *((*string)(yyv17)) = r.DecodeString() 2847 } 2848 } 2849 yyj16++ 2850 if yyhl16 { 2851 yyb16 = yyj16 > l 2852 } else { 2853 yyb16 = r.CheckBreak() 2854 } 2855 if yyb16 { 2856 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 2857 return 2858 } 2859 z.DecSendContainerState(codecSelfer_containerArrayElem100) 2860 if r.TryDecodeAsNil() { 2861 x.Node = "" 2862 } else { 2863 yyv19 := &x.Node 2864 yym20 := z.DecBinary() 2865 _ = yym20 2866 if false { 2867 } else { 2868 *((*string)(yyv19)) = r.DecodeString() 2869 } 2870 } 2871 yyj16++ 2872 if yyhl16 { 2873 yyb16 = yyj16 > l 2874 } else { 2875 yyb16 = r.CheckBreak() 2876 } 2877 if yyb16 { 2878 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 2879 return 2880 } 2881 z.DecSendContainerState(codecSelfer_containerArrayElem100) 2882 if r.TryDecodeAsNil() { 2883 x.Address = "" 2884 } else { 2885 yyv21 := &x.Address 2886 yym22 := z.DecBinary() 2887 _ = yym22 2888 if false { 2889 } else if z.HasExtensions() && z.DecExt(yyv21) { 2890 } else { 2891 *((*string)(yyv21)) = r.DecodeString() 2892 } 2893 } 2894 yyj16++ 2895 if yyhl16 { 2896 yyb16 = yyj16 > l 2897 } else { 2898 yyb16 = r.CheckBreak() 2899 } 2900 if yyb16 { 2901 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 2902 return 2903 } 2904 z.DecSendContainerState(codecSelfer_containerArrayElem100) 2905 if r.TryDecodeAsNil() { 2906 x.Leader = false 2907 } else { 2908 yyv23 := &x.Leader 2909 yym24 := z.DecBinary() 2910 _ = yym24 2911 if false { 2912 } else { 2913 *((*bool)(yyv23)) = r.DecodeBool() 2914 } 2915 } 2916 yyj16++ 2917 if yyhl16 { 2918 yyb16 = yyj16 > l 2919 } else { 2920 yyb16 = r.CheckBreak() 2921 } 2922 if yyb16 { 2923 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 2924 return 2925 } 2926 z.DecSendContainerState(codecSelfer_containerArrayElem100) 2927 if r.TryDecodeAsNil() { 2928 x.Voter = false 2929 } else { 2930 yyv25 := &x.Voter 2931 yym26 := z.DecBinary() 2932 _ = yym26 2933 if false { 2934 } else { 2935 *((*bool)(yyv25)) = r.DecodeBool() 2936 } 2937 } 2938 yyj16++ 2939 if yyhl16 { 2940 yyb16 = yyj16 > l 2941 } else { 2942 yyb16 = r.CheckBreak() 2943 } 2944 if yyb16 { 2945 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 2946 return 2947 } 2948 z.DecSendContainerState(codecSelfer_containerArrayElem100) 2949 if r.TryDecodeAsNil() { 2950 x.RaftProtocol = "" 2951 } else { 2952 yyv27 := &x.RaftProtocol 2953 yym28 := z.DecBinary() 2954 _ = yym28 2955 if false { 2956 } else { 2957 *((*string)(yyv27)) = r.DecodeString() 2958 } 2959 } 2960 for { 2961 yyj16++ 2962 if yyhl16 { 2963 yyb16 = yyj16 > l 2964 } else { 2965 yyb16 = r.CheckBreak() 2966 } 2967 if yyb16 { 2968 break 2969 } 2970 z.DecSendContainerState(codecSelfer_containerArrayElem100) 2971 z.DecStructFieldNotFound(yyj16-1, "") 2972 } 2973 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 2974 } 2975 2976 func (x *RaftConfigurationResponse) CodecEncodeSelf(e *codec1978.Encoder) { 2977 var h codecSelfer100 2978 z, r := codec1978.GenHelperEncoder(e) 2979 _, _, _ = h, z, r 2980 if x == nil { 2981 r.EncodeNil() 2982 } else { 2983 yym1 := z.EncBinary() 2984 _ = yym1 2985 if false { 2986 } else if z.HasExtensions() && z.EncExt(x) { 2987 } else { 2988 yysep2 := !z.EncBinary() 2989 yy2arr2 := z.EncBasicHandle().StructToArray 2990 var yyq2 [2]bool 2991 _, _, _ = yysep2, yyq2, yy2arr2 2992 const yyr2 bool = false 2993 var yynn2 int 2994 if yyr2 || yy2arr2 { 2995 r.EncodeArrayStart(2) 2996 } else { 2997 yynn2 = 2 2998 for _, b := range yyq2 { 2999 if b { 3000 yynn2++ 3001 } 3002 } 3003 r.EncodeMapStart(yynn2) 3004 yynn2 = 0 3005 } 3006 if yyr2 || yy2arr2 { 3007 z.EncSendContainerState(codecSelfer_containerArrayElem100) 3008 if x.Servers == nil { 3009 r.EncodeNil() 3010 } else { 3011 yym4 := z.EncBinary() 3012 _ = yym4 3013 if false { 3014 } else { 3015 h.encSlicePtrtoRaftServer(([]*RaftServer)(x.Servers), e) 3016 } 3017 } 3018 } else { 3019 z.EncSendContainerState(codecSelfer_containerMapKey100) 3020 r.EncodeString(codecSelferC_UTF8100, string("Servers")) 3021 z.EncSendContainerState(codecSelfer_containerMapValue100) 3022 if x.Servers == nil { 3023 r.EncodeNil() 3024 } else { 3025 yym5 := z.EncBinary() 3026 _ = yym5 3027 if false { 3028 } else { 3029 h.encSlicePtrtoRaftServer(([]*RaftServer)(x.Servers), e) 3030 } 3031 } 3032 } 3033 if yyr2 || yy2arr2 { 3034 z.EncSendContainerState(codecSelfer_containerArrayElem100) 3035 yym7 := z.EncBinary() 3036 _ = yym7 3037 if false { 3038 } else { 3039 r.EncodeUint(uint64(x.Index)) 3040 } 3041 } else { 3042 z.EncSendContainerState(codecSelfer_containerMapKey100) 3043 r.EncodeString(codecSelferC_UTF8100, string("Index")) 3044 z.EncSendContainerState(codecSelfer_containerMapValue100) 3045 yym8 := z.EncBinary() 3046 _ = yym8 3047 if false { 3048 } else { 3049 r.EncodeUint(uint64(x.Index)) 3050 } 3051 } 3052 if yyr2 || yy2arr2 { 3053 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 3054 } else { 3055 z.EncSendContainerState(codecSelfer_containerMapEnd100) 3056 } 3057 } 3058 } 3059 } 3060 3061 func (x *RaftConfigurationResponse) CodecDecodeSelf(d *codec1978.Decoder) { 3062 var h codecSelfer100 3063 z, r := codec1978.GenHelperDecoder(d) 3064 _, _, _ = h, z, r 3065 yym1 := z.DecBinary() 3066 _ = yym1 3067 if false { 3068 } else if z.HasExtensions() && z.DecExt(x) { 3069 } else { 3070 yyct2 := r.ContainerType() 3071 if yyct2 == codecSelferValueTypeMap100 { 3072 yyl2 := r.ReadMapStart() 3073 if yyl2 == 0 { 3074 z.DecSendContainerState(codecSelfer_containerMapEnd100) 3075 } else { 3076 x.codecDecodeSelfFromMap(yyl2, d) 3077 } 3078 } else if yyct2 == codecSelferValueTypeArray100 { 3079 yyl2 := r.ReadArrayStart() 3080 if yyl2 == 0 { 3081 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 3082 } else { 3083 x.codecDecodeSelfFromArray(yyl2, d) 3084 } 3085 } else { 3086 panic(codecSelferOnlyMapOrArrayEncodeToStructErr100) 3087 } 3088 } 3089 } 3090 3091 func (x *RaftConfigurationResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { 3092 var h codecSelfer100 3093 z, r := codec1978.GenHelperDecoder(d) 3094 _, _, _ = h, z, r 3095 var yys3Slc = z.DecScratchBuffer() // default slice to decode into 3096 _ = yys3Slc 3097 var yyhl3 bool = l >= 0 3098 for yyj3 := 0; ; yyj3++ { 3099 if yyhl3 { 3100 if yyj3 >= l { 3101 break 3102 } 3103 } else { 3104 if r.CheckBreak() { 3105 break 3106 } 3107 } 3108 z.DecSendContainerState(codecSelfer_containerMapKey100) 3109 yys3Slc = r.DecodeBytes(yys3Slc, true, true) 3110 yys3 := string(yys3Slc) 3111 z.DecSendContainerState(codecSelfer_containerMapValue100) 3112 switch yys3 { 3113 case "Servers": 3114 if r.TryDecodeAsNil() { 3115 x.Servers = nil 3116 } else { 3117 yyv4 := &x.Servers 3118 yym5 := z.DecBinary() 3119 _ = yym5 3120 if false { 3121 } else { 3122 h.decSlicePtrtoRaftServer((*[]*RaftServer)(yyv4), d) 3123 } 3124 } 3125 case "Index": 3126 if r.TryDecodeAsNil() { 3127 x.Index = 0 3128 } else { 3129 yyv6 := &x.Index 3130 yym7 := z.DecBinary() 3131 _ = yym7 3132 if false { 3133 } else { 3134 *((*uint64)(yyv6)) = uint64(r.DecodeUint(64)) 3135 } 3136 } 3137 default: 3138 z.DecStructFieldNotFound(-1, yys3) 3139 } // end switch yys3 3140 } // end for yyj3 3141 z.DecSendContainerState(codecSelfer_containerMapEnd100) 3142 } 3143 3144 func (x *RaftConfigurationResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { 3145 var h codecSelfer100 3146 z, r := codec1978.GenHelperDecoder(d) 3147 _, _, _ = h, z, r 3148 var yyj8 int 3149 var yyb8 bool 3150 var yyhl8 bool = l >= 0 3151 yyj8++ 3152 if yyhl8 { 3153 yyb8 = yyj8 > l 3154 } else { 3155 yyb8 = r.CheckBreak() 3156 } 3157 if yyb8 { 3158 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 3159 return 3160 } 3161 z.DecSendContainerState(codecSelfer_containerArrayElem100) 3162 if r.TryDecodeAsNil() { 3163 x.Servers = nil 3164 } else { 3165 yyv9 := &x.Servers 3166 yym10 := z.DecBinary() 3167 _ = yym10 3168 if false { 3169 } else { 3170 h.decSlicePtrtoRaftServer((*[]*RaftServer)(yyv9), d) 3171 } 3172 } 3173 yyj8++ 3174 if yyhl8 { 3175 yyb8 = yyj8 > l 3176 } else { 3177 yyb8 = r.CheckBreak() 3178 } 3179 if yyb8 { 3180 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 3181 return 3182 } 3183 z.DecSendContainerState(codecSelfer_containerArrayElem100) 3184 if r.TryDecodeAsNil() { 3185 x.Index = 0 3186 } else { 3187 yyv11 := &x.Index 3188 yym12 := z.DecBinary() 3189 _ = yym12 3190 if false { 3191 } else { 3192 *((*uint64)(yyv11)) = uint64(r.DecodeUint(64)) 3193 } 3194 } 3195 for { 3196 yyj8++ 3197 if yyhl8 { 3198 yyb8 = yyj8 > l 3199 } else { 3200 yyb8 = r.CheckBreak() 3201 } 3202 if yyb8 { 3203 break 3204 } 3205 z.DecSendContainerState(codecSelfer_containerArrayElem100) 3206 z.DecStructFieldNotFound(yyj8-1, "") 3207 } 3208 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 3209 } 3210 3211 func (x *RaftPeerByAddressRequest) CodecEncodeSelf(e *codec1978.Encoder) { 3212 var h codecSelfer100 3213 z, r := codec1978.GenHelperEncoder(e) 3214 _, _, _ = h, z, r 3215 if x == nil { 3216 r.EncodeNil() 3217 } else { 3218 yym1 := z.EncBinary() 3219 _ = yym1 3220 if false { 3221 } else if z.HasExtensions() && z.EncExt(x) { 3222 } else { 3223 yysep2 := !z.EncBinary() 3224 yy2arr2 := z.EncBasicHandle().StructToArray 3225 var yyq2 [5]bool 3226 _, _, _ = yysep2, yyq2, yy2arr2 3227 const yyr2 bool = false 3228 var yynn2 int 3229 if yyr2 || yy2arr2 { 3230 r.EncodeArrayStart(5) 3231 } else { 3232 yynn2 = 5 3233 for _, b := range yyq2 { 3234 if b { 3235 yynn2++ 3236 } 3237 } 3238 r.EncodeMapStart(yynn2) 3239 yynn2 = 0 3240 } 3241 if yyr2 || yy2arr2 { 3242 z.EncSendContainerState(codecSelfer_containerArrayElem100) 3243 yym4 := z.EncBinary() 3244 _ = yym4 3245 if false { 3246 } else if z.HasExtensions() && z.EncExt(x.Address) { 3247 } else { 3248 r.EncodeString(codecSelferC_UTF8100, string(x.Address)) 3249 } 3250 } else { 3251 z.EncSendContainerState(codecSelfer_containerMapKey100) 3252 r.EncodeString(codecSelferC_UTF8100, string("Address")) 3253 z.EncSendContainerState(codecSelfer_containerMapValue100) 3254 yym5 := z.EncBinary() 3255 _ = yym5 3256 if false { 3257 } else if z.HasExtensions() && z.EncExt(x.Address) { 3258 } else { 3259 r.EncodeString(codecSelferC_UTF8100, string(x.Address)) 3260 } 3261 } 3262 if yyr2 || yy2arr2 { 3263 z.EncSendContainerState(codecSelfer_containerArrayElem100) 3264 yym7 := z.EncBinary() 3265 _ = yym7 3266 if false { 3267 } else { 3268 r.EncodeString(codecSelferC_UTF8100, string(x.Region)) 3269 } 3270 } else { 3271 z.EncSendContainerState(codecSelfer_containerMapKey100) 3272 r.EncodeString(codecSelferC_UTF8100, string("Region")) 3273 z.EncSendContainerState(codecSelfer_containerMapValue100) 3274 yym8 := z.EncBinary() 3275 _ = yym8 3276 if false { 3277 } else { 3278 r.EncodeString(codecSelferC_UTF8100, string(x.Region)) 3279 } 3280 } 3281 if yyr2 || yy2arr2 { 3282 z.EncSendContainerState(codecSelfer_containerArrayElem100) 3283 yym10 := z.EncBinary() 3284 _ = yym10 3285 if false { 3286 } else { 3287 r.EncodeString(codecSelferC_UTF8100, string(x.Namespace)) 3288 } 3289 } else { 3290 z.EncSendContainerState(codecSelfer_containerMapKey100) 3291 r.EncodeString(codecSelferC_UTF8100, string("Namespace")) 3292 z.EncSendContainerState(codecSelfer_containerMapValue100) 3293 yym11 := z.EncBinary() 3294 _ = yym11 3295 if false { 3296 } else { 3297 r.EncodeString(codecSelferC_UTF8100, string(x.Namespace)) 3298 } 3299 } 3300 if yyr2 || yy2arr2 { 3301 z.EncSendContainerState(codecSelfer_containerArrayElem100) 3302 yym13 := z.EncBinary() 3303 _ = yym13 3304 if false { 3305 } else { 3306 r.EncodeString(codecSelferC_UTF8100, string(x.AuthToken)) 3307 } 3308 } else { 3309 z.EncSendContainerState(codecSelfer_containerMapKey100) 3310 r.EncodeString(codecSelferC_UTF8100, string("AuthToken")) 3311 z.EncSendContainerState(codecSelfer_containerMapValue100) 3312 yym14 := z.EncBinary() 3313 _ = yym14 3314 if false { 3315 } else { 3316 r.EncodeString(codecSelferC_UTF8100, string(x.AuthToken)) 3317 } 3318 } 3319 if yyr2 || yy2arr2 { 3320 z.EncSendContainerState(codecSelfer_containerArrayElem100) 3321 yym16 := z.EncBinary() 3322 _ = yym16 3323 if false { 3324 } else { 3325 r.EncodeBool(bool(x.Forwarded)) 3326 } 3327 } else { 3328 z.EncSendContainerState(codecSelfer_containerMapKey100) 3329 r.EncodeString(codecSelferC_UTF8100, string("Forwarded")) 3330 z.EncSendContainerState(codecSelfer_containerMapValue100) 3331 yym17 := z.EncBinary() 3332 _ = yym17 3333 if false { 3334 } else { 3335 r.EncodeBool(bool(x.Forwarded)) 3336 } 3337 } 3338 if yyr2 || yy2arr2 { 3339 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 3340 } else { 3341 z.EncSendContainerState(codecSelfer_containerMapEnd100) 3342 } 3343 } 3344 } 3345 } 3346 3347 func (x *RaftPeerByAddressRequest) CodecDecodeSelf(d *codec1978.Decoder) { 3348 var h codecSelfer100 3349 z, r := codec1978.GenHelperDecoder(d) 3350 _, _, _ = h, z, r 3351 yym1 := z.DecBinary() 3352 _ = yym1 3353 if false { 3354 } else if z.HasExtensions() && z.DecExt(x) { 3355 } else { 3356 yyct2 := r.ContainerType() 3357 if yyct2 == codecSelferValueTypeMap100 { 3358 yyl2 := r.ReadMapStart() 3359 if yyl2 == 0 { 3360 z.DecSendContainerState(codecSelfer_containerMapEnd100) 3361 } else { 3362 x.codecDecodeSelfFromMap(yyl2, d) 3363 } 3364 } else if yyct2 == codecSelferValueTypeArray100 { 3365 yyl2 := r.ReadArrayStart() 3366 if yyl2 == 0 { 3367 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 3368 } else { 3369 x.codecDecodeSelfFromArray(yyl2, d) 3370 } 3371 } else { 3372 panic(codecSelferOnlyMapOrArrayEncodeToStructErr100) 3373 } 3374 } 3375 } 3376 3377 func (x *RaftPeerByAddressRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { 3378 var h codecSelfer100 3379 z, r := codec1978.GenHelperDecoder(d) 3380 _, _, _ = h, z, r 3381 var yys3Slc = z.DecScratchBuffer() // default slice to decode into 3382 _ = yys3Slc 3383 var yyhl3 bool = l >= 0 3384 for yyj3 := 0; ; yyj3++ { 3385 if yyhl3 { 3386 if yyj3 >= l { 3387 break 3388 } 3389 } else { 3390 if r.CheckBreak() { 3391 break 3392 } 3393 } 3394 z.DecSendContainerState(codecSelfer_containerMapKey100) 3395 yys3Slc = r.DecodeBytes(yys3Slc, true, true) 3396 yys3 := string(yys3Slc) 3397 z.DecSendContainerState(codecSelfer_containerMapValue100) 3398 switch yys3 { 3399 case "Address": 3400 if r.TryDecodeAsNil() { 3401 x.Address = "" 3402 } else { 3403 yyv4 := &x.Address 3404 yym5 := z.DecBinary() 3405 _ = yym5 3406 if false { 3407 } else if z.HasExtensions() && z.DecExt(yyv4) { 3408 } else { 3409 *((*string)(yyv4)) = r.DecodeString() 3410 } 3411 } 3412 case "Region": 3413 if r.TryDecodeAsNil() { 3414 x.Region = "" 3415 } else { 3416 yyv6 := &x.Region 3417 yym7 := z.DecBinary() 3418 _ = yym7 3419 if false { 3420 } else { 3421 *((*string)(yyv6)) = r.DecodeString() 3422 } 3423 } 3424 case "Namespace": 3425 if r.TryDecodeAsNil() { 3426 x.Namespace = "" 3427 } else { 3428 yyv8 := &x.Namespace 3429 yym9 := z.DecBinary() 3430 _ = yym9 3431 if false { 3432 } else { 3433 *((*string)(yyv8)) = r.DecodeString() 3434 } 3435 } 3436 case "AuthToken": 3437 if r.TryDecodeAsNil() { 3438 x.AuthToken = "" 3439 } else { 3440 yyv10 := &x.AuthToken 3441 yym11 := z.DecBinary() 3442 _ = yym11 3443 if false { 3444 } else { 3445 *((*string)(yyv10)) = r.DecodeString() 3446 } 3447 } 3448 case "Forwarded": 3449 if r.TryDecodeAsNil() { 3450 x.Forwarded = false 3451 } else { 3452 yyv12 := &x.Forwarded 3453 yym13 := z.DecBinary() 3454 _ = yym13 3455 if false { 3456 } else { 3457 *((*bool)(yyv12)) = r.DecodeBool() 3458 } 3459 } 3460 default: 3461 z.DecStructFieldNotFound(-1, yys3) 3462 } // end switch yys3 3463 } // end for yyj3 3464 z.DecSendContainerState(codecSelfer_containerMapEnd100) 3465 } 3466 3467 func (x *RaftPeerByAddressRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { 3468 var h codecSelfer100 3469 z, r := codec1978.GenHelperDecoder(d) 3470 _, _, _ = h, z, r 3471 var yyj14 int 3472 var yyb14 bool 3473 var yyhl14 bool = l >= 0 3474 yyj14++ 3475 if yyhl14 { 3476 yyb14 = yyj14 > l 3477 } else { 3478 yyb14 = r.CheckBreak() 3479 } 3480 if yyb14 { 3481 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 3482 return 3483 } 3484 z.DecSendContainerState(codecSelfer_containerArrayElem100) 3485 if r.TryDecodeAsNil() { 3486 x.Address = "" 3487 } else { 3488 yyv15 := &x.Address 3489 yym16 := z.DecBinary() 3490 _ = yym16 3491 if false { 3492 } else if z.HasExtensions() && z.DecExt(yyv15) { 3493 } else { 3494 *((*string)(yyv15)) = r.DecodeString() 3495 } 3496 } 3497 yyj14++ 3498 if yyhl14 { 3499 yyb14 = yyj14 > l 3500 } else { 3501 yyb14 = r.CheckBreak() 3502 } 3503 if yyb14 { 3504 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 3505 return 3506 } 3507 z.DecSendContainerState(codecSelfer_containerArrayElem100) 3508 if r.TryDecodeAsNil() { 3509 x.Region = "" 3510 } else { 3511 yyv17 := &x.Region 3512 yym18 := z.DecBinary() 3513 _ = yym18 3514 if false { 3515 } else { 3516 *((*string)(yyv17)) = r.DecodeString() 3517 } 3518 } 3519 yyj14++ 3520 if yyhl14 { 3521 yyb14 = yyj14 > l 3522 } else { 3523 yyb14 = r.CheckBreak() 3524 } 3525 if yyb14 { 3526 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 3527 return 3528 } 3529 z.DecSendContainerState(codecSelfer_containerArrayElem100) 3530 if r.TryDecodeAsNil() { 3531 x.Namespace = "" 3532 } else { 3533 yyv19 := &x.Namespace 3534 yym20 := z.DecBinary() 3535 _ = yym20 3536 if false { 3537 } else { 3538 *((*string)(yyv19)) = r.DecodeString() 3539 } 3540 } 3541 yyj14++ 3542 if yyhl14 { 3543 yyb14 = yyj14 > l 3544 } else { 3545 yyb14 = r.CheckBreak() 3546 } 3547 if yyb14 { 3548 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 3549 return 3550 } 3551 z.DecSendContainerState(codecSelfer_containerArrayElem100) 3552 if r.TryDecodeAsNil() { 3553 x.AuthToken = "" 3554 } else { 3555 yyv21 := &x.AuthToken 3556 yym22 := z.DecBinary() 3557 _ = yym22 3558 if false { 3559 } else { 3560 *((*string)(yyv21)) = r.DecodeString() 3561 } 3562 } 3563 yyj14++ 3564 if yyhl14 { 3565 yyb14 = yyj14 > l 3566 } else { 3567 yyb14 = r.CheckBreak() 3568 } 3569 if yyb14 { 3570 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 3571 return 3572 } 3573 z.DecSendContainerState(codecSelfer_containerArrayElem100) 3574 if r.TryDecodeAsNil() { 3575 x.Forwarded = false 3576 } else { 3577 yyv23 := &x.Forwarded 3578 yym24 := z.DecBinary() 3579 _ = yym24 3580 if false { 3581 } else { 3582 *((*bool)(yyv23)) = r.DecodeBool() 3583 } 3584 } 3585 for { 3586 yyj14++ 3587 if yyhl14 { 3588 yyb14 = yyj14 > l 3589 } else { 3590 yyb14 = r.CheckBreak() 3591 } 3592 if yyb14 { 3593 break 3594 } 3595 z.DecSendContainerState(codecSelfer_containerArrayElem100) 3596 z.DecStructFieldNotFound(yyj14-1, "") 3597 } 3598 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 3599 } 3600 3601 func (x *RaftPeerByIDRequest) CodecEncodeSelf(e *codec1978.Encoder) { 3602 var h codecSelfer100 3603 z, r := codec1978.GenHelperEncoder(e) 3604 _, _, _ = h, z, r 3605 if x == nil { 3606 r.EncodeNil() 3607 } else { 3608 yym1 := z.EncBinary() 3609 _ = yym1 3610 if false { 3611 } else if z.HasExtensions() && z.EncExt(x) { 3612 } else { 3613 yysep2 := !z.EncBinary() 3614 yy2arr2 := z.EncBasicHandle().StructToArray 3615 var yyq2 [5]bool 3616 _, _, _ = yysep2, yyq2, yy2arr2 3617 const yyr2 bool = false 3618 var yynn2 int 3619 if yyr2 || yy2arr2 { 3620 r.EncodeArrayStart(5) 3621 } else { 3622 yynn2 = 5 3623 for _, b := range yyq2 { 3624 if b { 3625 yynn2++ 3626 } 3627 } 3628 r.EncodeMapStart(yynn2) 3629 yynn2 = 0 3630 } 3631 if yyr2 || yy2arr2 { 3632 z.EncSendContainerState(codecSelfer_containerArrayElem100) 3633 yym4 := z.EncBinary() 3634 _ = yym4 3635 if false { 3636 } else if z.HasExtensions() && z.EncExt(x.ID) { 3637 } else { 3638 r.EncodeString(codecSelferC_UTF8100, string(x.ID)) 3639 } 3640 } else { 3641 z.EncSendContainerState(codecSelfer_containerMapKey100) 3642 r.EncodeString(codecSelferC_UTF8100, string("ID")) 3643 z.EncSendContainerState(codecSelfer_containerMapValue100) 3644 yym5 := z.EncBinary() 3645 _ = yym5 3646 if false { 3647 } else if z.HasExtensions() && z.EncExt(x.ID) { 3648 } else { 3649 r.EncodeString(codecSelferC_UTF8100, string(x.ID)) 3650 } 3651 } 3652 if yyr2 || yy2arr2 { 3653 z.EncSendContainerState(codecSelfer_containerArrayElem100) 3654 yym7 := z.EncBinary() 3655 _ = yym7 3656 if false { 3657 } else { 3658 r.EncodeString(codecSelferC_UTF8100, string(x.Region)) 3659 } 3660 } else { 3661 z.EncSendContainerState(codecSelfer_containerMapKey100) 3662 r.EncodeString(codecSelferC_UTF8100, string("Region")) 3663 z.EncSendContainerState(codecSelfer_containerMapValue100) 3664 yym8 := z.EncBinary() 3665 _ = yym8 3666 if false { 3667 } else { 3668 r.EncodeString(codecSelferC_UTF8100, string(x.Region)) 3669 } 3670 } 3671 if yyr2 || yy2arr2 { 3672 z.EncSendContainerState(codecSelfer_containerArrayElem100) 3673 yym10 := z.EncBinary() 3674 _ = yym10 3675 if false { 3676 } else { 3677 r.EncodeString(codecSelferC_UTF8100, string(x.Namespace)) 3678 } 3679 } else { 3680 z.EncSendContainerState(codecSelfer_containerMapKey100) 3681 r.EncodeString(codecSelferC_UTF8100, string("Namespace")) 3682 z.EncSendContainerState(codecSelfer_containerMapValue100) 3683 yym11 := z.EncBinary() 3684 _ = yym11 3685 if false { 3686 } else { 3687 r.EncodeString(codecSelferC_UTF8100, string(x.Namespace)) 3688 } 3689 } 3690 if yyr2 || yy2arr2 { 3691 z.EncSendContainerState(codecSelfer_containerArrayElem100) 3692 yym13 := z.EncBinary() 3693 _ = yym13 3694 if false { 3695 } else { 3696 r.EncodeString(codecSelferC_UTF8100, string(x.AuthToken)) 3697 } 3698 } else { 3699 z.EncSendContainerState(codecSelfer_containerMapKey100) 3700 r.EncodeString(codecSelferC_UTF8100, string("AuthToken")) 3701 z.EncSendContainerState(codecSelfer_containerMapValue100) 3702 yym14 := z.EncBinary() 3703 _ = yym14 3704 if false { 3705 } else { 3706 r.EncodeString(codecSelferC_UTF8100, string(x.AuthToken)) 3707 } 3708 } 3709 if yyr2 || yy2arr2 { 3710 z.EncSendContainerState(codecSelfer_containerArrayElem100) 3711 yym16 := z.EncBinary() 3712 _ = yym16 3713 if false { 3714 } else { 3715 r.EncodeBool(bool(x.Forwarded)) 3716 } 3717 } else { 3718 z.EncSendContainerState(codecSelfer_containerMapKey100) 3719 r.EncodeString(codecSelferC_UTF8100, string("Forwarded")) 3720 z.EncSendContainerState(codecSelfer_containerMapValue100) 3721 yym17 := z.EncBinary() 3722 _ = yym17 3723 if false { 3724 } else { 3725 r.EncodeBool(bool(x.Forwarded)) 3726 } 3727 } 3728 if yyr2 || yy2arr2 { 3729 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 3730 } else { 3731 z.EncSendContainerState(codecSelfer_containerMapEnd100) 3732 } 3733 } 3734 } 3735 } 3736 3737 func (x *RaftPeerByIDRequest) CodecDecodeSelf(d *codec1978.Decoder) { 3738 var h codecSelfer100 3739 z, r := codec1978.GenHelperDecoder(d) 3740 _, _, _ = h, z, r 3741 yym1 := z.DecBinary() 3742 _ = yym1 3743 if false { 3744 } else if z.HasExtensions() && z.DecExt(x) { 3745 } else { 3746 yyct2 := r.ContainerType() 3747 if yyct2 == codecSelferValueTypeMap100 { 3748 yyl2 := r.ReadMapStart() 3749 if yyl2 == 0 { 3750 z.DecSendContainerState(codecSelfer_containerMapEnd100) 3751 } else { 3752 x.codecDecodeSelfFromMap(yyl2, d) 3753 } 3754 } else if yyct2 == codecSelferValueTypeArray100 { 3755 yyl2 := r.ReadArrayStart() 3756 if yyl2 == 0 { 3757 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 3758 } else { 3759 x.codecDecodeSelfFromArray(yyl2, d) 3760 } 3761 } else { 3762 panic(codecSelferOnlyMapOrArrayEncodeToStructErr100) 3763 } 3764 } 3765 } 3766 3767 func (x *RaftPeerByIDRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { 3768 var h codecSelfer100 3769 z, r := codec1978.GenHelperDecoder(d) 3770 _, _, _ = h, z, r 3771 var yys3Slc = z.DecScratchBuffer() // default slice to decode into 3772 _ = yys3Slc 3773 var yyhl3 bool = l >= 0 3774 for yyj3 := 0; ; yyj3++ { 3775 if yyhl3 { 3776 if yyj3 >= l { 3777 break 3778 } 3779 } else { 3780 if r.CheckBreak() { 3781 break 3782 } 3783 } 3784 z.DecSendContainerState(codecSelfer_containerMapKey100) 3785 yys3Slc = r.DecodeBytes(yys3Slc, true, true) 3786 yys3 := string(yys3Slc) 3787 z.DecSendContainerState(codecSelfer_containerMapValue100) 3788 switch yys3 { 3789 case "ID": 3790 if r.TryDecodeAsNil() { 3791 x.ID = "" 3792 } else { 3793 yyv4 := &x.ID 3794 yym5 := z.DecBinary() 3795 _ = yym5 3796 if false { 3797 } else if z.HasExtensions() && z.DecExt(yyv4) { 3798 } else { 3799 *((*string)(yyv4)) = r.DecodeString() 3800 } 3801 } 3802 case "Region": 3803 if r.TryDecodeAsNil() { 3804 x.Region = "" 3805 } else { 3806 yyv6 := &x.Region 3807 yym7 := z.DecBinary() 3808 _ = yym7 3809 if false { 3810 } else { 3811 *((*string)(yyv6)) = r.DecodeString() 3812 } 3813 } 3814 case "Namespace": 3815 if r.TryDecodeAsNil() { 3816 x.Namespace = "" 3817 } else { 3818 yyv8 := &x.Namespace 3819 yym9 := z.DecBinary() 3820 _ = yym9 3821 if false { 3822 } else { 3823 *((*string)(yyv8)) = r.DecodeString() 3824 } 3825 } 3826 case "AuthToken": 3827 if r.TryDecodeAsNil() { 3828 x.AuthToken = "" 3829 } else { 3830 yyv10 := &x.AuthToken 3831 yym11 := z.DecBinary() 3832 _ = yym11 3833 if false { 3834 } else { 3835 *((*string)(yyv10)) = r.DecodeString() 3836 } 3837 } 3838 case "Forwarded": 3839 if r.TryDecodeAsNil() { 3840 x.Forwarded = false 3841 } else { 3842 yyv12 := &x.Forwarded 3843 yym13 := z.DecBinary() 3844 _ = yym13 3845 if false { 3846 } else { 3847 *((*bool)(yyv12)) = r.DecodeBool() 3848 } 3849 } 3850 default: 3851 z.DecStructFieldNotFound(-1, yys3) 3852 } // end switch yys3 3853 } // end for yyj3 3854 z.DecSendContainerState(codecSelfer_containerMapEnd100) 3855 } 3856 3857 func (x *RaftPeerByIDRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { 3858 var h codecSelfer100 3859 z, r := codec1978.GenHelperDecoder(d) 3860 _, _, _ = h, z, r 3861 var yyj14 int 3862 var yyb14 bool 3863 var yyhl14 bool = l >= 0 3864 yyj14++ 3865 if yyhl14 { 3866 yyb14 = yyj14 > l 3867 } else { 3868 yyb14 = r.CheckBreak() 3869 } 3870 if yyb14 { 3871 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 3872 return 3873 } 3874 z.DecSendContainerState(codecSelfer_containerArrayElem100) 3875 if r.TryDecodeAsNil() { 3876 x.ID = "" 3877 } else { 3878 yyv15 := &x.ID 3879 yym16 := z.DecBinary() 3880 _ = yym16 3881 if false { 3882 } else if z.HasExtensions() && z.DecExt(yyv15) { 3883 } else { 3884 *((*string)(yyv15)) = r.DecodeString() 3885 } 3886 } 3887 yyj14++ 3888 if yyhl14 { 3889 yyb14 = yyj14 > l 3890 } else { 3891 yyb14 = r.CheckBreak() 3892 } 3893 if yyb14 { 3894 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 3895 return 3896 } 3897 z.DecSendContainerState(codecSelfer_containerArrayElem100) 3898 if r.TryDecodeAsNil() { 3899 x.Region = "" 3900 } else { 3901 yyv17 := &x.Region 3902 yym18 := z.DecBinary() 3903 _ = yym18 3904 if false { 3905 } else { 3906 *((*string)(yyv17)) = r.DecodeString() 3907 } 3908 } 3909 yyj14++ 3910 if yyhl14 { 3911 yyb14 = yyj14 > l 3912 } else { 3913 yyb14 = r.CheckBreak() 3914 } 3915 if yyb14 { 3916 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 3917 return 3918 } 3919 z.DecSendContainerState(codecSelfer_containerArrayElem100) 3920 if r.TryDecodeAsNil() { 3921 x.Namespace = "" 3922 } else { 3923 yyv19 := &x.Namespace 3924 yym20 := z.DecBinary() 3925 _ = yym20 3926 if false { 3927 } else { 3928 *((*string)(yyv19)) = r.DecodeString() 3929 } 3930 } 3931 yyj14++ 3932 if yyhl14 { 3933 yyb14 = yyj14 > l 3934 } else { 3935 yyb14 = r.CheckBreak() 3936 } 3937 if yyb14 { 3938 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 3939 return 3940 } 3941 z.DecSendContainerState(codecSelfer_containerArrayElem100) 3942 if r.TryDecodeAsNil() { 3943 x.AuthToken = "" 3944 } else { 3945 yyv21 := &x.AuthToken 3946 yym22 := z.DecBinary() 3947 _ = yym22 3948 if false { 3949 } else { 3950 *((*string)(yyv21)) = r.DecodeString() 3951 } 3952 } 3953 yyj14++ 3954 if yyhl14 { 3955 yyb14 = yyj14 > l 3956 } else { 3957 yyb14 = r.CheckBreak() 3958 } 3959 if yyb14 { 3960 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 3961 return 3962 } 3963 z.DecSendContainerState(codecSelfer_containerArrayElem100) 3964 if r.TryDecodeAsNil() { 3965 x.Forwarded = false 3966 } else { 3967 yyv23 := &x.Forwarded 3968 yym24 := z.DecBinary() 3969 _ = yym24 3970 if false { 3971 } else { 3972 *((*bool)(yyv23)) = r.DecodeBool() 3973 } 3974 } 3975 for { 3976 yyj14++ 3977 if yyhl14 { 3978 yyb14 = yyj14 > l 3979 } else { 3980 yyb14 = r.CheckBreak() 3981 } 3982 if yyb14 { 3983 break 3984 } 3985 z.DecSendContainerState(codecSelfer_containerArrayElem100) 3986 z.DecStructFieldNotFound(yyj14-1, "") 3987 } 3988 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 3989 } 3990 3991 func (x *AutopilotSetConfigRequest) CodecEncodeSelf(e *codec1978.Encoder) { 3992 var h codecSelfer100 3993 z, r := codec1978.GenHelperEncoder(e) 3994 _, _, _ = h, z, r 3995 if x == nil { 3996 r.EncodeNil() 3997 } else { 3998 yym1 := z.EncBinary() 3999 _ = yym1 4000 if false { 4001 } else if z.HasExtensions() && z.EncExt(x) { 4002 } else { 4003 yysep2 := !z.EncBinary() 4004 yy2arr2 := z.EncBasicHandle().StructToArray 4005 var yyq2 [7]bool 4006 _, _, _ = yysep2, yyq2, yy2arr2 4007 const yyr2 bool = false 4008 var yynn2 int 4009 if yyr2 || yy2arr2 { 4010 r.EncodeArrayStart(7) 4011 } else { 4012 yynn2 = 7 4013 for _, b := range yyq2 { 4014 if b { 4015 yynn2++ 4016 } 4017 } 4018 r.EncodeMapStart(yynn2) 4019 yynn2 = 0 4020 } 4021 if yyr2 || yy2arr2 { 4022 z.EncSendContainerState(codecSelfer_containerArrayElem100) 4023 yym4 := z.EncBinary() 4024 _ = yym4 4025 if false { 4026 } else { 4027 r.EncodeString(codecSelferC_UTF8100, string(x.Datacenter)) 4028 } 4029 } else { 4030 z.EncSendContainerState(codecSelfer_containerMapKey100) 4031 r.EncodeString(codecSelferC_UTF8100, string("Datacenter")) 4032 z.EncSendContainerState(codecSelfer_containerMapValue100) 4033 yym5 := z.EncBinary() 4034 _ = yym5 4035 if false { 4036 } else { 4037 r.EncodeString(codecSelferC_UTF8100, string(x.Datacenter)) 4038 } 4039 } 4040 if yyr2 || yy2arr2 { 4041 z.EncSendContainerState(codecSelfer_containerArrayElem100) 4042 yy7 := &x.Config 4043 yy7.CodecEncodeSelf(e) 4044 } else { 4045 z.EncSendContainerState(codecSelfer_containerMapKey100) 4046 r.EncodeString(codecSelferC_UTF8100, string("Config")) 4047 z.EncSendContainerState(codecSelfer_containerMapValue100) 4048 yy9 := &x.Config 4049 yy9.CodecEncodeSelf(e) 4050 } 4051 if yyr2 || yy2arr2 { 4052 z.EncSendContainerState(codecSelfer_containerArrayElem100) 4053 yym12 := z.EncBinary() 4054 _ = yym12 4055 if false { 4056 } else { 4057 r.EncodeBool(bool(x.CAS)) 4058 } 4059 } else { 4060 z.EncSendContainerState(codecSelfer_containerMapKey100) 4061 r.EncodeString(codecSelferC_UTF8100, string("CAS")) 4062 z.EncSendContainerState(codecSelfer_containerMapValue100) 4063 yym13 := z.EncBinary() 4064 _ = yym13 4065 if false { 4066 } else { 4067 r.EncodeBool(bool(x.CAS)) 4068 } 4069 } 4070 if yyr2 || yy2arr2 { 4071 z.EncSendContainerState(codecSelfer_containerArrayElem100) 4072 yym15 := z.EncBinary() 4073 _ = yym15 4074 if false { 4075 } else { 4076 r.EncodeString(codecSelferC_UTF8100, string(x.Region)) 4077 } 4078 } else { 4079 z.EncSendContainerState(codecSelfer_containerMapKey100) 4080 r.EncodeString(codecSelferC_UTF8100, string("Region")) 4081 z.EncSendContainerState(codecSelfer_containerMapValue100) 4082 yym16 := z.EncBinary() 4083 _ = yym16 4084 if false { 4085 } else { 4086 r.EncodeString(codecSelferC_UTF8100, string(x.Region)) 4087 } 4088 } 4089 if yyr2 || yy2arr2 { 4090 z.EncSendContainerState(codecSelfer_containerArrayElem100) 4091 yym18 := z.EncBinary() 4092 _ = yym18 4093 if false { 4094 } else { 4095 r.EncodeString(codecSelferC_UTF8100, string(x.Namespace)) 4096 } 4097 } else { 4098 z.EncSendContainerState(codecSelfer_containerMapKey100) 4099 r.EncodeString(codecSelferC_UTF8100, string("Namespace")) 4100 z.EncSendContainerState(codecSelfer_containerMapValue100) 4101 yym19 := z.EncBinary() 4102 _ = yym19 4103 if false { 4104 } else { 4105 r.EncodeString(codecSelferC_UTF8100, string(x.Namespace)) 4106 } 4107 } 4108 if yyr2 || yy2arr2 { 4109 z.EncSendContainerState(codecSelfer_containerArrayElem100) 4110 yym21 := z.EncBinary() 4111 _ = yym21 4112 if false { 4113 } else { 4114 r.EncodeString(codecSelferC_UTF8100, string(x.AuthToken)) 4115 } 4116 } else { 4117 z.EncSendContainerState(codecSelfer_containerMapKey100) 4118 r.EncodeString(codecSelferC_UTF8100, string("AuthToken")) 4119 z.EncSendContainerState(codecSelfer_containerMapValue100) 4120 yym22 := z.EncBinary() 4121 _ = yym22 4122 if false { 4123 } else { 4124 r.EncodeString(codecSelferC_UTF8100, string(x.AuthToken)) 4125 } 4126 } 4127 if yyr2 || yy2arr2 { 4128 z.EncSendContainerState(codecSelfer_containerArrayElem100) 4129 yym24 := z.EncBinary() 4130 _ = yym24 4131 if false { 4132 } else { 4133 r.EncodeBool(bool(x.Forwarded)) 4134 } 4135 } else { 4136 z.EncSendContainerState(codecSelfer_containerMapKey100) 4137 r.EncodeString(codecSelferC_UTF8100, string("Forwarded")) 4138 z.EncSendContainerState(codecSelfer_containerMapValue100) 4139 yym25 := z.EncBinary() 4140 _ = yym25 4141 if false { 4142 } else { 4143 r.EncodeBool(bool(x.Forwarded)) 4144 } 4145 } 4146 if yyr2 || yy2arr2 { 4147 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 4148 } else { 4149 z.EncSendContainerState(codecSelfer_containerMapEnd100) 4150 } 4151 } 4152 } 4153 } 4154 4155 func (x *AutopilotSetConfigRequest) CodecDecodeSelf(d *codec1978.Decoder) { 4156 var h codecSelfer100 4157 z, r := codec1978.GenHelperDecoder(d) 4158 _, _, _ = h, z, r 4159 yym1 := z.DecBinary() 4160 _ = yym1 4161 if false { 4162 } else if z.HasExtensions() && z.DecExt(x) { 4163 } else { 4164 yyct2 := r.ContainerType() 4165 if yyct2 == codecSelferValueTypeMap100 { 4166 yyl2 := r.ReadMapStart() 4167 if yyl2 == 0 { 4168 z.DecSendContainerState(codecSelfer_containerMapEnd100) 4169 } else { 4170 x.codecDecodeSelfFromMap(yyl2, d) 4171 } 4172 } else if yyct2 == codecSelferValueTypeArray100 { 4173 yyl2 := r.ReadArrayStart() 4174 if yyl2 == 0 { 4175 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 4176 } else { 4177 x.codecDecodeSelfFromArray(yyl2, d) 4178 } 4179 } else { 4180 panic(codecSelferOnlyMapOrArrayEncodeToStructErr100) 4181 } 4182 } 4183 } 4184 4185 func (x *AutopilotSetConfigRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { 4186 var h codecSelfer100 4187 z, r := codec1978.GenHelperDecoder(d) 4188 _, _, _ = h, z, r 4189 var yys3Slc = z.DecScratchBuffer() // default slice to decode into 4190 _ = yys3Slc 4191 var yyhl3 bool = l >= 0 4192 for yyj3 := 0; ; yyj3++ { 4193 if yyhl3 { 4194 if yyj3 >= l { 4195 break 4196 } 4197 } else { 4198 if r.CheckBreak() { 4199 break 4200 } 4201 } 4202 z.DecSendContainerState(codecSelfer_containerMapKey100) 4203 yys3Slc = r.DecodeBytes(yys3Slc, true, true) 4204 yys3 := string(yys3Slc) 4205 z.DecSendContainerState(codecSelfer_containerMapValue100) 4206 switch yys3 { 4207 case "Datacenter": 4208 if r.TryDecodeAsNil() { 4209 x.Datacenter = "" 4210 } else { 4211 yyv4 := &x.Datacenter 4212 yym5 := z.DecBinary() 4213 _ = yym5 4214 if false { 4215 } else { 4216 *((*string)(yyv4)) = r.DecodeString() 4217 } 4218 } 4219 case "Config": 4220 if r.TryDecodeAsNil() { 4221 x.Config = AutopilotConfig{} 4222 } else { 4223 yyv6 := &x.Config 4224 yyv6.CodecDecodeSelf(d) 4225 } 4226 case "CAS": 4227 if r.TryDecodeAsNil() { 4228 x.CAS = false 4229 } else { 4230 yyv7 := &x.CAS 4231 yym8 := z.DecBinary() 4232 _ = yym8 4233 if false { 4234 } else { 4235 *((*bool)(yyv7)) = r.DecodeBool() 4236 } 4237 } 4238 case "Region": 4239 if r.TryDecodeAsNil() { 4240 x.Region = "" 4241 } else { 4242 yyv9 := &x.Region 4243 yym10 := z.DecBinary() 4244 _ = yym10 4245 if false { 4246 } else { 4247 *((*string)(yyv9)) = r.DecodeString() 4248 } 4249 } 4250 case "Namespace": 4251 if r.TryDecodeAsNil() { 4252 x.Namespace = "" 4253 } else { 4254 yyv11 := &x.Namespace 4255 yym12 := z.DecBinary() 4256 _ = yym12 4257 if false { 4258 } else { 4259 *((*string)(yyv11)) = r.DecodeString() 4260 } 4261 } 4262 case "AuthToken": 4263 if r.TryDecodeAsNil() { 4264 x.AuthToken = "" 4265 } else { 4266 yyv13 := &x.AuthToken 4267 yym14 := z.DecBinary() 4268 _ = yym14 4269 if false { 4270 } else { 4271 *((*string)(yyv13)) = r.DecodeString() 4272 } 4273 } 4274 case "Forwarded": 4275 if r.TryDecodeAsNil() { 4276 x.Forwarded = false 4277 } else { 4278 yyv15 := &x.Forwarded 4279 yym16 := z.DecBinary() 4280 _ = yym16 4281 if false { 4282 } else { 4283 *((*bool)(yyv15)) = r.DecodeBool() 4284 } 4285 } 4286 default: 4287 z.DecStructFieldNotFound(-1, yys3) 4288 } // end switch yys3 4289 } // end for yyj3 4290 z.DecSendContainerState(codecSelfer_containerMapEnd100) 4291 } 4292 4293 func (x *AutopilotSetConfigRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { 4294 var h codecSelfer100 4295 z, r := codec1978.GenHelperDecoder(d) 4296 _, _, _ = h, z, r 4297 var yyj17 int 4298 var yyb17 bool 4299 var yyhl17 bool = l >= 0 4300 yyj17++ 4301 if yyhl17 { 4302 yyb17 = yyj17 > l 4303 } else { 4304 yyb17 = r.CheckBreak() 4305 } 4306 if yyb17 { 4307 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 4308 return 4309 } 4310 z.DecSendContainerState(codecSelfer_containerArrayElem100) 4311 if r.TryDecodeAsNil() { 4312 x.Datacenter = "" 4313 } else { 4314 yyv18 := &x.Datacenter 4315 yym19 := z.DecBinary() 4316 _ = yym19 4317 if false { 4318 } else { 4319 *((*string)(yyv18)) = r.DecodeString() 4320 } 4321 } 4322 yyj17++ 4323 if yyhl17 { 4324 yyb17 = yyj17 > l 4325 } else { 4326 yyb17 = r.CheckBreak() 4327 } 4328 if yyb17 { 4329 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 4330 return 4331 } 4332 z.DecSendContainerState(codecSelfer_containerArrayElem100) 4333 if r.TryDecodeAsNil() { 4334 x.Config = AutopilotConfig{} 4335 } else { 4336 yyv20 := &x.Config 4337 yyv20.CodecDecodeSelf(d) 4338 } 4339 yyj17++ 4340 if yyhl17 { 4341 yyb17 = yyj17 > l 4342 } else { 4343 yyb17 = r.CheckBreak() 4344 } 4345 if yyb17 { 4346 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 4347 return 4348 } 4349 z.DecSendContainerState(codecSelfer_containerArrayElem100) 4350 if r.TryDecodeAsNil() { 4351 x.CAS = false 4352 } else { 4353 yyv21 := &x.CAS 4354 yym22 := z.DecBinary() 4355 _ = yym22 4356 if false { 4357 } else { 4358 *((*bool)(yyv21)) = r.DecodeBool() 4359 } 4360 } 4361 yyj17++ 4362 if yyhl17 { 4363 yyb17 = yyj17 > l 4364 } else { 4365 yyb17 = r.CheckBreak() 4366 } 4367 if yyb17 { 4368 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 4369 return 4370 } 4371 z.DecSendContainerState(codecSelfer_containerArrayElem100) 4372 if r.TryDecodeAsNil() { 4373 x.Region = "" 4374 } else { 4375 yyv23 := &x.Region 4376 yym24 := z.DecBinary() 4377 _ = yym24 4378 if false { 4379 } else { 4380 *((*string)(yyv23)) = r.DecodeString() 4381 } 4382 } 4383 yyj17++ 4384 if yyhl17 { 4385 yyb17 = yyj17 > l 4386 } else { 4387 yyb17 = r.CheckBreak() 4388 } 4389 if yyb17 { 4390 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 4391 return 4392 } 4393 z.DecSendContainerState(codecSelfer_containerArrayElem100) 4394 if r.TryDecodeAsNil() { 4395 x.Namespace = "" 4396 } else { 4397 yyv25 := &x.Namespace 4398 yym26 := z.DecBinary() 4399 _ = yym26 4400 if false { 4401 } else { 4402 *((*string)(yyv25)) = r.DecodeString() 4403 } 4404 } 4405 yyj17++ 4406 if yyhl17 { 4407 yyb17 = yyj17 > l 4408 } else { 4409 yyb17 = r.CheckBreak() 4410 } 4411 if yyb17 { 4412 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 4413 return 4414 } 4415 z.DecSendContainerState(codecSelfer_containerArrayElem100) 4416 if r.TryDecodeAsNil() { 4417 x.AuthToken = "" 4418 } else { 4419 yyv27 := &x.AuthToken 4420 yym28 := z.DecBinary() 4421 _ = yym28 4422 if false { 4423 } else { 4424 *((*string)(yyv27)) = r.DecodeString() 4425 } 4426 } 4427 yyj17++ 4428 if yyhl17 { 4429 yyb17 = yyj17 > l 4430 } else { 4431 yyb17 = r.CheckBreak() 4432 } 4433 if yyb17 { 4434 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 4435 return 4436 } 4437 z.DecSendContainerState(codecSelfer_containerArrayElem100) 4438 if r.TryDecodeAsNil() { 4439 x.Forwarded = false 4440 } else { 4441 yyv29 := &x.Forwarded 4442 yym30 := z.DecBinary() 4443 _ = yym30 4444 if false { 4445 } else { 4446 *((*bool)(yyv29)) = r.DecodeBool() 4447 } 4448 } 4449 for { 4450 yyj17++ 4451 if yyhl17 { 4452 yyb17 = yyj17 > l 4453 } else { 4454 yyb17 = r.CheckBreak() 4455 } 4456 if yyb17 { 4457 break 4458 } 4459 z.DecSendContainerState(codecSelfer_containerArrayElem100) 4460 z.DecStructFieldNotFound(yyj17-1, "") 4461 } 4462 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 4463 } 4464 4465 func (x *AutopilotConfig) CodecEncodeSelf(e *codec1978.Encoder) { 4466 var h codecSelfer100 4467 z, r := codec1978.GenHelperEncoder(e) 4468 _, _, _ = h, z, r 4469 if x == nil { 4470 r.EncodeNil() 4471 } else { 4472 yym1 := z.EncBinary() 4473 _ = yym1 4474 if false { 4475 } else if z.HasExtensions() && z.EncExt(x) { 4476 } else { 4477 yysep2 := !z.EncBinary() 4478 yy2arr2 := z.EncBasicHandle().StructToArray 4479 var yyq2 [9]bool 4480 _, _, _ = yysep2, yyq2, yy2arr2 4481 const yyr2 bool = false 4482 var yynn2 int 4483 if yyr2 || yy2arr2 { 4484 r.EncodeArrayStart(9) 4485 } else { 4486 yynn2 = 9 4487 for _, b := range yyq2 { 4488 if b { 4489 yynn2++ 4490 } 4491 } 4492 r.EncodeMapStart(yynn2) 4493 yynn2 = 0 4494 } 4495 if yyr2 || yy2arr2 { 4496 z.EncSendContainerState(codecSelfer_containerArrayElem100) 4497 yym4 := z.EncBinary() 4498 _ = yym4 4499 if false { 4500 } else { 4501 r.EncodeBool(bool(x.CleanupDeadServers)) 4502 } 4503 } else { 4504 z.EncSendContainerState(codecSelfer_containerMapKey100) 4505 r.EncodeString(codecSelferC_UTF8100, string("CleanupDeadServers")) 4506 z.EncSendContainerState(codecSelfer_containerMapValue100) 4507 yym5 := z.EncBinary() 4508 _ = yym5 4509 if false { 4510 } else { 4511 r.EncodeBool(bool(x.CleanupDeadServers)) 4512 } 4513 } 4514 if yyr2 || yy2arr2 { 4515 z.EncSendContainerState(codecSelfer_containerArrayElem100) 4516 yym7 := z.EncBinary() 4517 _ = yym7 4518 if false { 4519 } else if z.HasExtensions() && z.EncExt(x.ServerStabilizationTime) { 4520 } else { 4521 r.EncodeInt(int64(x.ServerStabilizationTime)) 4522 } 4523 } else { 4524 z.EncSendContainerState(codecSelfer_containerMapKey100) 4525 r.EncodeString(codecSelferC_UTF8100, string("ServerStabilizationTime")) 4526 z.EncSendContainerState(codecSelfer_containerMapValue100) 4527 yym8 := z.EncBinary() 4528 _ = yym8 4529 if false { 4530 } else if z.HasExtensions() && z.EncExt(x.ServerStabilizationTime) { 4531 } else { 4532 r.EncodeInt(int64(x.ServerStabilizationTime)) 4533 } 4534 } 4535 if yyr2 || yy2arr2 { 4536 z.EncSendContainerState(codecSelfer_containerArrayElem100) 4537 yym10 := z.EncBinary() 4538 _ = yym10 4539 if false { 4540 } else if z.HasExtensions() && z.EncExt(x.LastContactThreshold) { 4541 } else { 4542 r.EncodeInt(int64(x.LastContactThreshold)) 4543 } 4544 } else { 4545 z.EncSendContainerState(codecSelfer_containerMapKey100) 4546 r.EncodeString(codecSelferC_UTF8100, string("LastContactThreshold")) 4547 z.EncSendContainerState(codecSelfer_containerMapValue100) 4548 yym11 := z.EncBinary() 4549 _ = yym11 4550 if false { 4551 } else if z.HasExtensions() && z.EncExt(x.LastContactThreshold) { 4552 } else { 4553 r.EncodeInt(int64(x.LastContactThreshold)) 4554 } 4555 } 4556 if yyr2 || yy2arr2 { 4557 z.EncSendContainerState(codecSelfer_containerArrayElem100) 4558 yym13 := z.EncBinary() 4559 _ = yym13 4560 if false { 4561 } else { 4562 r.EncodeUint(uint64(x.MaxTrailingLogs)) 4563 } 4564 } else { 4565 z.EncSendContainerState(codecSelfer_containerMapKey100) 4566 r.EncodeString(codecSelferC_UTF8100, string("MaxTrailingLogs")) 4567 z.EncSendContainerState(codecSelfer_containerMapValue100) 4568 yym14 := z.EncBinary() 4569 _ = yym14 4570 if false { 4571 } else { 4572 r.EncodeUint(uint64(x.MaxTrailingLogs)) 4573 } 4574 } 4575 if yyr2 || yy2arr2 { 4576 z.EncSendContainerState(codecSelfer_containerArrayElem100) 4577 yym16 := z.EncBinary() 4578 _ = yym16 4579 if false { 4580 } else { 4581 r.EncodeBool(bool(x.EnableRedundancyZones)) 4582 } 4583 } else { 4584 z.EncSendContainerState(codecSelfer_containerMapKey100) 4585 r.EncodeString(codecSelferC_UTF8100, string("EnableRedundancyZones")) 4586 z.EncSendContainerState(codecSelfer_containerMapValue100) 4587 yym17 := z.EncBinary() 4588 _ = yym17 4589 if false { 4590 } else { 4591 r.EncodeBool(bool(x.EnableRedundancyZones)) 4592 } 4593 } 4594 if yyr2 || yy2arr2 { 4595 z.EncSendContainerState(codecSelfer_containerArrayElem100) 4596 yym19 := z.EncBinary() 4597 _ = yym19 4598 if false { 4599 } else { 4600 r.EncodeBool(bool(x.DisableUpgradeMigration)) 4601 } 4602 } else { 4603 z.EncSendContainerState(codecSelfer_containerMapKey100) 4604 r.EncodeString(codecSelferC_UTF8100, string("DisableUpgradeMigration")) 4605 z.EncSendContainerState(codecSelfer_containerMapValue100) 4606 yym20 := z.EncBinary() 4607 _ = yym20 4608 if false { 4609 } else { 4610 r.EncodeBool(bool(x.DisableUpgradeMigration)) 4611 } 4612 } 4613 if yyr2 || yy2arr2 { 4614 z.EncSendContainerState(codecSelfer_containerArrayElem100) 4615 yym22 := z.EncBinary() 4616 _ = yym22 4617 if false { 4618 } else { 4619 r.EncodeBool(bool(x.EnableCustomUpgrades)) 4620 } 4621 } else { 4622 z.EncSendContainerState(codecSelfer_containerMapKey100) 4623 r.EncodeString(codecSelferC_UTF8100, string("EnableCustomUpgrades")) 4624 z.EncSendContainerState(codecSelfer_containerMapValue100) 4625 yym23 := z.EncBinary() 4626 _ = yym23 4627 if false { 4628 } else { 4629 r.EncodeBool(bool(x.EnableCustomUpgrades)) 4630 } 4631 } 4632 if yyr2 || yy2arr2 { 4633 z.EncSendContainerState(codecSelfer_containerArrayElem100) 4634 yym25 := z.EncBinary() 4635 _ = yym25 4636 if false { 4637 } else { 4638 r.EncodeUint(uint64(x.CreateIndex)) 4639 } 4640 } else { 4641 z.EncSendContainerState(codecSelfer_containerMapKey100) 4642 r.EncodeString(codecSelferC_UTF8100, string("CreateIndex")) 4643 z.EncSendContainerState(codecSelfer_containerMapValue100) 4644 yym26 := z.EncBinary() 4645 _ = yym26 4646 if false { 4647 } else { 4648 r.EncodeUint(uint64(x.CreateIndex)) 4649 } 4650 } 4651 if yyr2 || yy2arr2 { 4652 z.EncSendContainerState(codecSelfer_containerArrayElem100) 4653 yym28 := z.EncBinary() 4654 _ = yym28 4655 if false { 4656 } else { 4657 r.EncodeUint(uint64(x.ModifyIndex)) 4658 } 4659 } else { 4660 z.EncSendContainerState(codecSelfer_containerMapKey100) 4661 r.EncodeString(codecSelferC_UTF8100, string("ModifyIndex")) 4662 z.EncSendContainerState(codecSelfer_containerMapValue100) 4663 yym29 := z.EncBinary() 4664 _ = yym29 4665 if false { 4666 } else { 4667 r.EncodeUint(uint64(x.ModifyIndex)) 4668 } 4669 } 4670 if yyr2 || yy2arr2 { 4671 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 4672 } else { 4673 z.EncSendContainerState(codecSelfer_containerMapEnd100) 4674 } 4675 } 4676 } 4677 } 4678 4679 func (x *AutopilotConfig) CodecDecodeSelf(d *codec1978.Decoder) { 4680 var h codecSelfer100 4681 z, r := codec1978.GenHelperDecoder(d) 4682 _, _, _ = h, z, r 4683 yym1 := z.DecBinary() 4684 _ = yym1 4685 if false { 4686 } else if z.HasExtensions() && z.DecExt(x) { 4687 } else { 4688 yyct2 := r.ContainerType() 4689 if yyct2 == codecSelferValueTypeMap100 { 4690 yyl2 := r.ReadMapStart() 4691 if yyl2 == 0 { 4692 z.DecSendContainerState(codecSelfer_containerMapEnd100) 4693 } else { 4694 x.codecDecodeSelfFromMap(yyl2, d) 4695 } 4696 } else if yyct2 == codecSelferValueTypeArray100 { 4697 yyl2 := r.ReadArrayStart() 4698 if yyl2 == 0 { 4699 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 4700 } else { 4701 x.codecDecodeSelfFromArray(yyl2, d) 4702 } 4703 } else { 4704 panic(codecSelferOnlyMapOrArrayEncodeToStructErr100) 4705 } 4706 } 4707 } 4708 4709 func (x *AutopilotConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { 4710 var h codecSelfer100 4711 z, r := codec1978.GenHelperDecoder(d) 4712 _, _, _ = h, z, r 4713 var yys3Slc = z.DecScratchBuffer() // default slice to decode into 4714 _ = yys3Slc 4715 var yyhl3 bool = l >= 0 4716 for yyj3 := 0; ; yyj3++ { 4717 if yyhl3 { 4718 if yyj3 >= l { 4719 break 4720 } 4721 } else { 4722 if r.CheckBreak() { 4723 break 4724 } 4725 } 4726 z.DecSendContainerState(codecSelfer_containerMapKey100) 4727 yys3Slc = r.DecodeBytes(yys3Slc, true, true) 4728 yys3 := string(yys3Slc) 4729 z.DecSendContainerState(codecSelfer_containerMapValue100) 4730 switch yys3 { 4731 case "CleanupDeadServers": 4732 if r.TryDecodeAsNil() { 4733 x.CleanupDeadServers = false 4734 } else { 4735 yyv4 := &x.CleanupDeadServers 4736 yym5 := z.DecBinary() 4737 _ = yym5 4738 if false { 4739 } else { 4740 *((*bool)(yyv4)) = r.DecodeBool() 4741 } 4742 } 4743 case "ServerStabilizationTime": 4744 if r.TryDecodeAsNil() { 4745 x.ServerStabilizationTime = 0 4746 } else { 4747 yyv6 := &x.ServerStabilizationTime 4748 yym7 := z.DecBinary() 4749 _ = yym7 4750 if false { 4751 } else if z.HasExtensions() && z.DecExt(yyv6) { 4752 } else { 4753 *((*int64)(yyv6)) = int64(r.DecodeInt(64)) 4754 } 4755 } 4756 case "LastContactThreshold": 4757 if r.TryDecodeAsNil() { 4758 x.LastContactThreshold = 0 4759 } else { 4760 yyv8 := &x.LastContactThreshold 4761 yym9 := z.DecBinary() 4762 _ = yym9 4763 if false { 4764 } else if z.HasExtensions() && z.DecExt(yyv8) { 4765 } else { 4766 *((*int64)(yyv8)) = int64(r.DecodeInt(64)) 4767 } 4768 } 4769 case "MaxTrailingLogs": 4770 if r.TryDecodeAsNil() { 4771 x.MaxTrailingLogs = 0 4772 } else { 4773 yyv10 := &x.MaxTrailingLogs 4774 yym11 := z.DecBinary() 4775 _ = yym11 4776 if false { 4777 } else { 4778 *((*uint64)(yyv10)) = uint64(r.DecodeUint(64)) 4779 } 4780 } 4781 case "EnableRedundancyZones": 4782 if r.TryDecodeAsNil() { 4783 x.EnableRedundancyZones = false 4784 } else { 4785 yyv12 := &x.EnableRedundancyZones 4786 yym13 := z.DecBinary() 4787 _ = yym13 4788 if false { 4789 } else { 4790 *((*bool)(yyv12)) = r.DecodeBool() 4791 } 4792 } 4793 case "DisableUpgradeMigration": 4794 if r.TryDecodeAsNil() { 4795 x.DisableUpgradeMigration = false 4796 } else { 4797 yyv14 := &x.DisableUpgradeMigration 4798 yym15 := z.DecBinary() 4799 _ = yym15 4800 if false { 4801 } else { 4802 *((*bool)(yyv14)) = r.DecodeBool() 4803 } 4804 } 4805 case "EnableCustomUpgrades": 4806 if r.TryDecodeAsNil() { 4807 x.EnableCustomUpgrades = false 4808 } else { 4809 yyv16 := &x.EnableCustomUpgrades 4810 yym17 := z.DecBinary() 4811 _ = yym17 4812 if false { 4813 } else { 4814 *((*bool)(yyv16)) = r.DecodeBool() 4815 } 4816 } 4817 case "CreateIndex": 4818 if r.TryDecodeAsNil() { 4819 x.CreateIndex = 0 4820 } else { 4821 yyv18 := &x.CreateIndex 4822 yym19 := z.DecBinary() 4823 _ = yym19 4824 if false { 4825 } else { 4826 *((*uint64)(yyv18)) = uint64(r.DecodeUint(64)) 4827 } 4828 } 4829 case "ModifyIndex": 4830 if r.TryDecodeAsNil() { 4831 x.ModifyIndex = 0 4832 } else { 4833 yyv20 := &x.ModifyIndex 4834 yym21 := z.DecBinary() 4835 _ = yym21 4836 if false { 4837 } else { 4838 *((*uint64)(yyv20)) = uint64(r.DecodeUint(64)) 4839 } 4840 } 4841 default: 4842 z.DecStructFieldNotFound(-1, yys3) 4843 } // end switch yys3 4844 } // end for yyj3 4845 z.DecSendContainerState(codecSelfer_containerMapEnd100) 4846 } 4847 4848 func (x *AutopilotConfig) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { 4849 var h codecSelfer100 4850 z, r := codec1978.GenHelperDecoder(d) 4851 _, _, _ = h, z, r 4852 var yyj22 int 4853 var yyb22 bool 4854 var yyhl22 bool = l >= 0 4855 yyj22++ 4856 if yyhl22 { 4857 yyb22 = yyj22 > l 4858 } else { 4859 yyb22 = r.CheckBreak() 4860 } 4861 if yyb22 { 4862 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 4863 return 4864 } 4865 z.DecSendContainerState(codecSelfer_containerArrayElem100) 4866 if r.TryDecodeAsNil() { 4867 x.CleanupDeadServers = false 4868 } else { 4869 yyv23 := &x.CleanupDeadServers 4870 yym24 := z.DecBinary() 4871 _ = yym24 4872 if false { 4873 } else { 4874 *((*bool)(yyv23)) = r.DecodeBool() 4875 } 4876 } 4877 yyj22++ 4878 if yyhl22 { 4879 yyb22 = yyj22 > l 4880 } else { 4881 yyb22 = r.CheckBreak() 4882 } 4883 if yyb22 { 4884 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 4885 return 4886 } 4887 z.DecSendContainerState(codecSelfer_containerArrayElem100) 4888 if r.TryDecodeAsNil() { 4889 x.ServerStabilizationTime = 0 4890 } else { 4891 yyv25 := &x.ServerStabilizationTime 4892 yym26 := z.DecBinary() 4893 _ = yym26 4894 if false { 4895 } else if z.HasExtensions() && z.DecExt(yyv25) { 4896 } else { 4897 *((*int64)(yyv25)) = int64(r.DecodeInt(64)) 4898 } 4899 } 4900 yyj22++ 4901 if yyhl22 { 4902 yyb22 = yyj22 > l 4903 } else { 4904 yyb22 = r.CheckBreak() 4905 } 4906 if yyb22 { 4907 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 4908 return 4909 } 4910 z.DecSendContainerState(codecSelfer_containerArrayElem100) 4911 if r.TryDecodeAsNil() { 4912 x.LastContactThreshold = 0 4913 } else { 4914 yyv27 := &x.LastContactThreshold 4915 yym28 := z.DecBinary() 4916 _ = yym28 4917 if false { 4918 } else if z.HasExtensions() && z.DecExt(yyv27) { 4919 } else { 4920 *((*int64)(yyv27)) = int64(r.DecodeInt(64)) 4921 } 4922 } 4923 yyj22++ 4924 if yyhl22 { 4925 yyb22 = yyj22 > l 4926 } else { 4927 yyb22 = r.CheckBreak() 4928 } 4929 if yyb22 { 4930 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 4931 return 4932 } 4933 z.DecSendContainerState(codecSelfer_containerArrayElem100) 4934 if r.TryDecodeAsNil() { 4935 x.MaxTrailingLogs = 0 4936 } else { 4937 yyv29 := &x.MaxTrailingLogs 4938 yym30 := z.DecBinary() 4939 _ = yym30 4940 if false { 4941 } else { 4942 *((*uint64)(yyv29)) = uint64(r.DecodeUint(64)) 4943 } 4944 } 4945 yyj22++ 4946 if yyhl22 { 4947 yyb22 = yyj22 > l 4948 } else { 4949 yyb22 = r.CheckBreak() 4950 } 4951 if yyb22 { 4952 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 4953 return 4954 } 4955 z.DecSendContainerState(codecSelfer_containerArrayElem100) 4956 if r.TryDecodeAsNil() { 4957 x.EnableRedundancyZones = false 4958 } else { 4959 yyv31 := &x.EnableRedundancyZones 4960 yym32 := z.DecBinary() 4961 _ = yym32 4962 if false { 4963 } else { 4964 *((*bool)(yyv31)) = r.DecodeBool() 4965 } 4966 } 4967 yyj22++ 4968 if yyhl22 { 4969 yyb22 = yyj22 > l 4970 } else { 4971 yyb22 = r.CheckBreak() 4972 } 4973 if yyb22 { 4974 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 4975 return 4976 } 4977 z.DecSendContainerState(codecSelfer_containerArrayElem100) 4978 if r.TryDecodeAsNil() { 4979 x.DisableUpgradeMigration = false 4980 } else { 4981 yyv33 := &x.DisableUpgradeMigration 4982 yym34 := z.DecBinary() 4983 _ = yym34 4984 if false { 4985 } else { 4986 *((*bool)(yyv33)) = r.DecodeBool() 4987 } 4988 } 4989 yyj22++ 4990 if yyhl22 { 4991 yyb22 = yyj22 > l 4992 } else { 4993 yyb22 = r.CheckBreak() 4994 } 4995 if yyb22 { 4996 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 4997 return 4998 } 4999 z.DecSendContainerState(codecSelfer_containerArrayElem100) 5000 if r.TryDecodeAsNil() { 5001 x.EnableCustomUpgrades = false 5002 } else { 5003 yyv35 := &x.EnableCustomUpgrades 5004 yym36 := z.DecBinary() 5005 _ = yym36 5006 if false { 5007 } else { 5008 *((*bool)(yyv35)) = r.DecodeBool() 5009 } 5010 } 5011 yyj22++ 5012 if yyhl22 { 5013 yyb22 = yyj22 > l 5014 } else { 5015 yyb22 = r.CheckBreak() 5016 } 5017 if yyb22 { 5018 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 5019 return 5020 } 5021 z.DecSendContainerState(codecSelfer_containerArrayElem100) 5022 if r.TryDecodeAsNil() { 5023 x.CreateIndex = 0 5024 } else { 5025 yyv37 := &x.CreateIndex 5026 yym38 := z.DecBinary() 5027 _ = yym38 5028 if false { 5029 } else { 5030 *((*uint64)(yyv37)) = uint64(r.DecodeUint(64)) 5031 } 5032 } 5033 yyj22++ 5034 if yyhl22 { 5035 yyb22 = yyj22 > l 5036 } else { 5037 yyb22 = r.CheckBreak() 5038 } 5039 if yyb22 { 5040 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 5041 return 5042 } 5043 z.DecSendContainerState(codecSelfer_containerArrayElem100) 5044 if r.TryDecodeAsNil() { 5045 x.ModifyIndex = 0 5046 } else { 5047 yyv39 := &x.ModifyIndex 5048 yym40 := z.DecBinary() 5049 _ = yym40 5050 if false { 5051 } else { 5052 *((*uint64)(yyv39)) = uint64(r.DecodeUint(64)) 5053 } 5054 } 5055 for { 5056 yyj22++ 5057 if yyhl22 { 5058 yyb22 = yyj22 > l 5059 } else { 5060 yyb22 = r.CheckBreak() 5061 } 5062 if yyb22 { 5063 break 5064 } 5065 z.DecSendContainerState(codecSelfer_containerArrayElem100) 5066 z.DecStructFieldNotFound(yyj22-1, "") 5067 } 5068 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 5069 } 5070 5071 func (x *SchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { 5072 var h codecSelfer100 5073 z, r := codec1978.GenHelperEncoder(e) 5074 _, _, _ = h, z, r 5075 if x == nil { 5076 r.EncodeNil() 5077 } else { 5078 yym1 := z.EncBinary() 5079 _ = yym1 5080 if false { 5081 } else if z.HasExtensions() && z.EncExt(x) { 5082 } else { 5083 yysep2 := !z.EncBinary() 5084 yy2arr2 := z.EncBasicHandle().StructToArray 5085 var yyq2 [3]bool 5086 _, _, _ = yysep2, yyq2, yy2arr2 5087 const yyr2 bool = false 5088 var yynn2 int 5089 if yyr2 || yy2arr2 { 5090 r.EncodeArrayStart(3) 5091 } else { 5092 yynn2 = 3 5093 for _, b := range yyq2 { 5094 if b { 5095 yynn2++ 5096 } 5097 } 5098 r.EncodeMapStart(yynn2) 5099 yynn2 = 0 5100 } 5101 if yyr2 || yy2arr2 { 5102 z.EncSendContainerState(codecSelfer_containerArrayElem100) 5103 yy4 := &x.PreemptionConfig 5104 yy4.CodecEncodeSelf(e) 5105 } else { 5106 z.EncSendContainerState(codecSelfer_containerMapKey100) 5107 r.EncodeString(codecSelferC_UTF8100, string("PreemptionConfig")) 5108 z.EncSendContainerState(codecSelfer_containerMapValue100) 5109 yy6 := &x.PreemptionConfig 5110 yy6.CodecEncodeSelf(e) 5111 } 5112 if yyr2 || yy2arr2 { 5113 z.EncSendContainerState(codecSelfer_containerArrayElem100) 5114 yym9 := z.EncBinary() 5115 _ = yym9 5116 if false { 5117 } else { 5118 r.EncodeUint(uint64(x.CreateIndex)) 5119 } 5120 } else { 5121 z.EncSendContainerState(codecSelfer_containerMapKey100) 5122 r.EncodeString(codecSelferC_UTF8100, string("CreateIndex")) 5123 z.EncSendContainerState(codecSelfer_containerMapValue100) 5124 yym10 := z.EncBinary() 5125 _ = yym10 5126 if false { 5127 } else { 5128 r.EncodeUint(uint64(x.CreateIndex)) 5129 } 5130 } 5131 if yyr2 || yy2arr2 { 5132 z.EncSendContainerState(codecSelfer_containerArrayElem100) 5133 yym12 := z.EncBinary() 5134 _ = yym12 5135 if false { 5136 } else { 5137 r.EncodeUint(uint64(x.ModifyIndex)) 5138 } 5139 } else { 5140 z.EncSendContainerState(codecSelfer_containerMapKey100) 5141 r.EncodeString(codecSelferC_UTF8100, string("ModifyIndex")) 5142 z.EncSendContainerState(codecSelfer_containerMapValue100) 5143 yym13 := z.EncBinary() 5144 _ = yym13 5145 if false { 5146 } else { 5147 r.EncodeUint(uint64(x.ModifyIndex)) 5148 } 5149 } 5150 if yyr2 || yy2arr2 { 5151 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 5152 } else { 5153 z.EncSendContainerState(codecSelfer_containerMapEnd100) 5154 } 5155 } 5156 } 5157 } 5158 5159 func (x *SchedulerConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { 5160 var h codecSelfer100 5161 z, r := codec1978.GenHelperDecoder(d) 5162 _, _, _ = h, z, r 5163 yym1 := z.DecBinary() 5164 _ = yym1 5165 if false { 5166 } else if z.HasExtensions() && z.DecExt(x) { 5167 } else { 5168 yyct2 := r.ContainerType() 5169 if yyct2 == codecSelferValueTypeMap100 { 5170 yyl2 := r.ReadMapStart() 5171 if yyl2 == 0 { 5172 z.DecSendContainerState(codecSelfer_containerMapEnd100) 5173 } else { 5174 x.codecDecodeSelfFromMap(yyl2, d) 5175 } 5176 } else if yyct2 == codecSelferValueTypeArray100 { 5177 yyl2 := r.ReadArrayStart() 5178 if yyl2 == 0 { 5179 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 5180 } else { 5181 x.codecDecodeSelfFromArray(yyl2, d) 5182 } 5183 } else { 5184 panic(codecSelferOnlyMapOrArrayEncodeToStructErr100) 5185 } 5186 } 5187 } 5188 5189 func (x *SchedulerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { 5190 var h codecSelfer100 5191 z, r := codec1978.GenHelperDecoder(d) 5192 _, _, _ = h, z, r 5193 var yys3Slc = z.DecScratchBuffer() // default slice to decode into 5194 _ = yys3Slc 5195 var yyhl3 bool = l >= 0 5196 for yyj3 := 0; ; yyj3++ { 5197 if yyhl3 { 5198 if yyj3 >= l { 5199 break 5200 } 5201 } else { 5202 if r.CheckBreak() { 5203 break 5204 } 5205 } 5206 z.DecSendContainerState(codecSelfer_containerMapKey100) 5207 yys3Slc = r.DecodeBytes(yys3Slc, true, true) 5208 yys3 := string(yys3Slc) 5209 z.DecSendContainerState(codecSelfer_containerMapValue100) 5210 switch yys3 { 5211 case "PreemptionConfig": 5212 if r.TryDecodeAsNil() { 5213 x.PreemptionConfig = PreemptionConfig{} 5214 } else { 5215 yyv4 := &x.PreemptionConfig 5216 yyv4.CodecDecodeSelf(d) 5217 } 5218 case "CreateIndex": 5219 if r.TryDecodeAsNil() { 5220 x.CreateIndex = 0 5221 } else { 5222 yyv5 := &x.CreateIndex 5223 yym6 := z.DecBinary() 5224 _ = yym6 5225 if false { 5226 } else { 5227 *((*uint64)(yyv5)) = uint64(r.DecodeUint(64)) 5228 } 5229 } 5230 case "ModifyIndex": 5231 if r.TryDecodeAsNil() { 5232 x.ModifyIndex = 0 5233 } else { 5234 yyv7 := &x.ModifyIndex 5235 yym8 := z.DecBinary() 5236 _ = yym8 5237 if false { 5238 } else { 5239 *((*uint64)(yyv7)) = uint64(r.DecodeUint(64)) 5240 } 5241 } 5242 default: 5243 z.DecStructFieldNotFound(-1, yys3) 5244 } // end switch yys3 5245 } // end for yyj3 5246 z.DecSendContainerState(codecSelfer_containerMapEnd100) 5247 } 5248 5249 func (x *SchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { 5250 var h codecSelfer100 5251 z, r := codec1978.GenHelperDecoder(d) 5252 _, _, _ = h, z, r 5253 var yyj9 int 5254 var yyb9 bool 5255 var yyhl9 bool = l >= 0 5256 yyj9++ 5257 if yyhl9 { 5258 yyb9 = yyj9 > l 5259 } else { 5260 yyb9 = r.CheckBreak() 5261 } 5262 if yyb9 { 5263 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 5264 return 5265 } 5266 z.DecSendContainerState(codecSelfer_containerArrayElem100) 5267 if r.TryDecodeAsNil() { 5268 x.PreemptionConfig = PreemptionConfig{} 5269 } else { 5270 yyv10 := &x.PreemptionConfig 5271 yyv10.CodecDecodeSelf(d) 5272 } 5273 yyj9++ 5274 if yyhl9 { 5275 yyb9 = yyj9 > l 5276 } else { 5277 yyb9 = r.CheckBreak() 5278 } 5279 if yyb9 { 5280 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 5281 return 5282 } 5283 z.DecSendContainerState(codecSelfer_containerArrayElem100) 5284 if r.TryDecodeAsNil() { 5285 x.CreateIndex = 0 5286 } else { 5287 yyv11 := &x.CreateIndex 5288 yym12 := z.DecBinary() 5289 _ = yym12 5290 if false { 5291 } else { 5292 *((*uint64)(yyv11)) = uint64(r.DecodeUint(64)) 5293 } 5294 } 5295 yyj9++ 5296 if yyhl9 { 5297 yyb9 = yyj9 > l 5298 } else { 5299 yyb9 = r.CheckBreak() 5300 } 5301 if yyb9 { 5302 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 5303 return 5304 } 5305 z.DecSendContainerState(codecSelfer_containerArrayElem100) 5306 if r.TryDecodeAsNil() { 5307 x.ModifyIndex = 0 5308 } else { 5309 yyv13 := &x.ModifyIndex 5310 yym14 := z.DecBinary() 5311 _ = yym14 5312 if false { 5313 } else { 5314 *((*uint64)(yyv13)) = uint64(r.DecodeUint(64)) 5315 } 5316 } 5317 for { 5318 yyj9++ 5319 if yyhl9 { 5320 yyb9 = yyj9 > l 5321 } else { 5322 yyb9 = r.CheckBreak() 5323 } 5324 if yyb9 { 5325 break 5326 } 5327 z.DecSendContainerState(codecSelfer_containerArrayElem100) 5328 z.DecStructFieldNotFound(yyj9-1, "") 5329 } 5330 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 5331 } 5332 5333 func (x *SchedulerConfigurationResponse) CodecEncodeSelf(e *codec1978.Encoder) { 5334 var h codecSelfer100 5335 z, r := codec1978.GenHelperEncoder(e) 5336 _, _, _ = h, z, r 5337 if x == nil { 5338 r.EncodeNil() 5339 } else { 5340 yym1 := z.EncBinary() 5341 _ = yym1 5342 if false { 5343 } else if z.HasExtensions() && z.EncExt(x) { 5344 } else { 5345 yysep2 := !z.EncBinary() 5346 yy2arr2 := z.EncBasicHandle().StructToArray 5347 var yyq2 [4]bool 5348 _, _, _ = yysep2, yyq2, yy2arr2 5349 const yyr2 bool = false 5350 var yynn2 int 5351 if yyr2 || yy2arr2 { 5352 r.EncodeArrayStart(4) 5353 } else { 5354 yynn2 = 4 5355 for _, b := range yyq2 { 5356 if b { 5357 yynn2++ 5358 } 5359 } 5360 r.EncodeMapStart(yynn2) 5361 yynn2 = 0 5362 } 5363 if yyr2 || yy2arr2 { 5364 z.EncSendContainerState(codecSelfer_containerArrayElem100) 5365 if x.SchedulerConfig == nil { 5366 r.EncodeNil() 5367 } else { 5368 x.SchedulerConfig.CodecEncodeSelf(e) 5369 } 5370 } else { 5371 z.EncSendContainerState(codecSelfer_containerMapKey100) 5372 r.EncodeString(codecSelferC_UTF8100, string("SchedulerConfig")) 5373 z.EncSendContainerState(codecSelfer_containerMapValue100) 5374 if x.SchedulerConfig == nil { 5375 r.EncodeNil() 5376 } else { 5377 x.SchedulerConfig.CodecEncodeSelf(e) 5378 } 5379 } 5380 if yyr2 || yy2arr2 { 5381 z.EncSendContainerState(codecSelfer_containerArrayElem100) 5382 yym7 := z.EncBinary() 5383 _ = yym7 5384 if false { 5385 } else { 5386 r.EncodeUint(uint64(x.Index)) 5387 } 5388 } else { 5389 z.EncSendContainerState(codecSelfer_containerMapKey100) 5390 r.EncodeString(codecSelferC_UTF8100, string("Index")) 5391 z.EncSendContainerState(codecSelfer_containerMapValue100) 5392 yym8 := z.EncBinary() 5393 _ = yym8 5394 if false { 5395 } else { 5396 r.EncodeUint(uint64(x.Index)) 5397 } 5398 } 5399 if yyr2 || yy2arr2 { 5400 z.EncSendContainerState(codecSelfer_containerArrayElem100) 5401 yym10 := z.EncBinary() 5402 _ = yym10 5403 if false { 5404 } else if z.HasExtensions() && z.EncExt(x.LastContact) { 5405 } else { 5406 r.EncodeInt(int64(x.LastContact)) 5407 } 5408 } else { 5409 z.EncSendContainerState(codecSelfer_containerMapKey100) 5410 r.EncodeString(codecSelferC_UTF8100, string("LastContact")) 5411 z.EncSendContainerState(codecSelfer_containerMapValue100) 5412 yym11 := z.EncBinary() 5413 _ = yym11 5414 if false { 5415 } else if z.HasExtensions() && z.EncExt(x.LastContact) { 5416 } else { 5417 r.EncodeInt(int64(x.LastContact)) 5418 } 5419 } 5420 if yyr2 || yy2arr2 { 5421 z.EncSendContainerState(codecSelfer_containerArrayElem100) 5422 yym13 := z.EncBinary() 5423 _ = yym13 5424 if false { 5425 } else { 5426 r.EncodeBool(bool(x.KnownLeader)) 5427 } 5428 } else { 5429 z.EncSendContainerState(codecSelfer_containerMapKey100) 5430 r.EncodeString(codecSelferC_UTF8100, string("KnownLeader")) 5431 z.EncSendContainerState(codecSelfer_containerMapValue100) 5432 yym14 := z.EncBinary() 5433 _ = yym14 5434 if false { 5435 } else { 5436 r.EncodeBool(bool(x.KnownLeader)) 5437 } 5438 } 5439 if yyr2 || yy2arr2 { 5440 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 5441 } else { 5442 z.EncSendContainerState(codecSelfer_containerMapEnd100) 5443 } 5444 } 5445 } 5446 } 5447 5448 func (x *SchedulerConfigurationResponse) CodecDecodeSelf(d *codec1978.Decoder) { 5449 var h codecSelfer100 5450 z, r := codec1978.GenHelperDecoder(d) 5451 _, _, _ = h, z, r 5452 yym1 := z.DecBinary() 5453 _ = yym1 5454 if false { 5455 } else if z.HasExtensions() && z.DecExt(x) { 5456 } else { 5457 yyct2 := r.ContainerType() 5458 if yyct2 == codecSelferValueTypeMap100 { 5459 yyl2 := r.ReadMapStart() 5460 if yyl2 == 0 { 5461 z.DecSendContainerState(codecSelfer_containerMapEnd100) 5462 } else { 5463 x.codecDecodeSelfFromMap(yyl2, d) 5464 } 5465 } else if yyct2 == codecSelferValueTypeArray100 { 5466 yyl2 := r.ReadArrayStart() 5467 if yyl2 == 0 { 5468 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 5469 } else { 5470 x.codecDecodeSelfFromArray(yyl2, d) 5471 } 5472 } else { 5473 panic(codecSelferOnlyMapOrArrayEncodeToStructErr100) 5474 } 5475 } 5476 } 5477 5478 func (x *SchedulerConfigurationResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { 5479 var h codecSelfer100 5480 z, r := codec1978.GenHelperDecoder(d) 5481 _, _, _ = h, z, r 5482 var yys3Slc = z.DecScratchBuffer() // default slice to decode into 5483 _ = yys3Slc 5484 var yyhl3 bool = l >= 0 5485 for yyj3 := 0; ; yyj3++ { 5486 if yyhl3 { 5487 if yyj3 >= l { 5488 break 5489 } 5490 } else { 5491 if r.CheckBreak() { 5492 break 5493 } 5494 } 5495 z.DecSendContainerState(codecSelfer_containerMapKey100) 5496 yys3Slc = r.DecodeBytes(yys3Slc, true, true) 5497 yys3 := string(yys3Slc) 5498 z.DecSendContainerState(codecSelfer_containerMapValue100) 5499 switch yys3 { 5500 case "SchedulerConfig": 5501 if r.TryDecodeAsNil() { 5502 if x.SchedulerConfig != nil { 5503 x.SchedulerConfig = nil 5504 } 5505 } else { 5506 if x.SchedulerConfig == nil { 5507 x.SchedulerConfig = new(SchedulerConfiguration) 5508 } 5509 x.SchedulerConfig.CodecDecodeSelf(d) 5510 } 5511 case "Index": 5512 if r.TryDecodeAsNil() { 5513 x.Index = 0 5514 } else { 5515 yyv5 := &x.Index 5516 yym6 := z.DecBinary() 5517 _ = yym6 5518 if false { 5519 } else { 5520 *((*uint64)(yyv5)) = uint64(r.DecodeUint(64)) 5521 } 5522 } 5523 case "LastContact": 5524 if r.TryDecodeAsNil() { 5525 x.LastContact = 0 5526 } else { 5527 yyv7 := &x.LastContact 5528 yym8 := z.DecBinary() 5529 _ = yym8 5530 if false { 5531 } else if z.HasExtensions() && z.DecExt(yyv7) { 5532 } else { 5533 *((*int64)(yyv7)) = int64(r.DecodeInt(64)) 5534 } 5535 } 5536 case "KnownLeader": 5537 if r.TryDecodeAsNil() { 5538 x.KnownLeader = false 5539 } else { 5540 yyv9 := &x.KnownLeader 5541 yym10 := z.DecBinary() 5542 _ = yym10 5543 if false { 5544 } else { 5545 *((*bool)(yyv9)) = r.DecodeBool() 5546 } 5547 } 5548 default: 5549 z.DecStructFieldNotFound(-1, yys3) 5550 } // end switch yys3 5551 } // end for yyj3 5552 z.DecSendContainerState(codecSelfer_containerMapEnd100) 5553 } 5554 5555 func (x *SchedulerConfigurationResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { 5556 var h codecSelfer100 5557 z, r := codec1978.GenHelperDecoder(d) 5558 _, _, _ = h, z, r 5559 var yyj11 int 5560 var yyb11 bool 5561 var yyhl11 bool = l >= 0 5562 yyj11++ 5563 if yyhl11 { 5564 yyb11 = yyj11 > l 5565 } else { 5566 yyb11 = r.CheckBreak() 5567 } 5568 if yyb11 { 5569 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 5570 return 5571 } 5572 z.DecSendContainerState(codecSelfer_containerArrayElem100) 5573 if r.TryDecodeAsNil() { 5574 if x.SchedulerConfig != nil { 5575 x.SchedulerConfig = nil 5576 } 5577 } else { 5578 if x.SchedulerConfig == nil { 5579 x.SchedulerConfig = new(SchedulerConfiguration) 5580 } 5581 x.SchedulerConfig.CodecDecodeSelf(d) 5582 } 5583 yyj11++ 5584 if yyhl11 { 5585 yyb11 = yyj11 > l 5586 } else { 5587 yyb11 = r.CheckBreak() 5588 } 5589 if yyb11 { 5590 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 5591 return 5592 } 5593 z.DecSendContainerState(codecSelfer_containerArrayElem100) 5594 if r.TryDecodeAsNil() { 5595 x.Index = 0 5596 } else { 5597 yyv13 := &x.Index 5598 yym14 := z.DecBinary() 5599 _ = yym14 5600 if false { 5601 } else { 5602 *((*uint64)(yyv13)) = uint64(r.DecodeUint(64)) 5603 } 5604 } 5605 yyj11++ 5606 if yyhl11 { 5607 yyb11 = yyj11 > l 5608 } else { 5609 yyb11 = r.CheckBreak() 5610 } 5611 if yyb11 { 5612 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 5613 return 5614 } 5615 z.DecSendContainerState(codecSelfer_containerArrayElem100) 5616 if r.TryDecodeAsNil() { 5617 x.LastContact = 0 5618 } else { 5619 yyv15 := &x.LastContact 5620 yym16 := z.DecBinary() 5621 _ = yym16 5622 if false { 5623 } else if z.HasExtensions() && z.DecExt(yyv15) { 5624 } else { 5625 *((*int64)(yyv15)) = int64(r.DecodeInt(64)) 5626 } 5627 } 5628 yyj11++ 5629 if yyhl11 { 5630 yyb11 = yyj11 > l 5631 } else { 5632 yyb11 = r.CheckBreak() 5633 } 5634 if yyb11 { 5635 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 5636 return 5637 } 5638 z.DecSendContainerState(codecSelfer_containerArrayElem100) 5639 if r.TryDecodeAsNil() { 5640 x.KnownLeader = false 5641 } else { 5642 yyv17 := &x.KnownLeader 5643 yym18 := z.DecBinary() 5644 _ = yym18 5645 if false { 5646 } else { 5647 *((*bool)(yyv17)) = r.DecodeBool() 5648 } 5649 } 5650 for { 5651 yyj11++ 5652 if yyhl11 { 5653 yyb11 = yyj11 > l 5654 } else { 5655 yyb11 = r.CheckBreak() 5656 } 5657 if yyb11 { 5658 break 5659 } 5660 z.DecSendContainerState(codecSelfer_containerArrayElem100) 5661 z.DecStructFieldNotFound(yyj11-1, "") 5662 } 5663 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 5664 } 5665 5666 func (x *SchedulerSetConfigurationResponse) CodecEncodeSelf(e *codec1978.Encoder) { 5667 var h codecSelfer100 5668 z, r := codec1978.GenHelperEncoder(e) 5669 _, _, _ = h, z, r 5670 if x == nil { 5671 r.EncodeNil() 5672 } else { 5673 yym1 := z.EncBinary() 5674 _ = yym1 5675 if false { 5676 } else if z.HasExtensions() && z.EncExt(x) { 5677 } else { 5678 yysep2 := !z.EncBinary() 5679 yy2arr2 := z.EncBasicHandle().StructToArray 5680 var yyq2 [2]bool 5681 _, _, _ = yysep2, yyq2, yy2arr2 5682 const yyr2 bool = false 5683 var yynn2 int 5684 if yyr2 || yy2arr2 { 5685 r.EncodeArrayStart(2) 5686 } else { 5687 yynn2 = 2 5688 for _, b := range yyq2 { 5689 if b { 5690 yynn2++ 5691 } 5692 } 5693 r.EncodeMapStart(yynn2) 5694 yynn2 = 0 5695 } 5696 if yyr2 || yy2arr2 { 5697 z.EncSendContainerState(codecSelfer_containerArrayElem100) 5698 yym4 := z.EncBinary() 5699 _ = yym4 5700 if false { 5701 } else { 5702 r.EncodeBool(bool(x.Updated)) 5703 } 5704 } else { 5705 z.EncSendContainerState(codecSelfer_containerMapKey100) 5706 r.EncodeString(codecSelferC_UTF8100, string("Updated")) 5707 z.EncSendContainerState(codecSelfer_containerMapValue100) 5708 yym5 := z.EncBinary() 5709 _ = yym5 5710 if false { 5711 } else { 5712 r.EncodeBool(bool(x.Updated)) 5713 } 5714 } 5715 if yyr2 || yy2arr2 { 5716 z.EncSendContainerState(codecSelfer_containerArrayElem100) 5717 yym7 := z.EncBinary() 5718 _ = yym7 5719 if false { 5720 } else { 5721 r.EncodeUint(uint64(x.Index)) 5722 } 5723 } else { 5724 z.EncSendContainerState(codecSelfer_containerMapKey100) 5725 r.EncodeString(codecSelferC_UTF8100, string("Index")) 5726 z.EncSendContainerState(codecSelfer_containerMapValue100) 5727 yym8 := z.EncBinary() 5728 _ = yym8 5729 if false { 5730 } else { 5731 r.EncodeUint(uint64(x.Index)) 5732 } 5733 } 5734 if yyr2 || yy2arr2 { 5735 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 5736 } else { 5737 z.EncSendContainerState(codecSelfer_containerMapEnd100) 5738 } 5739 } 5740 } 5741 } 5742 5743 func (x *SchedulerSetConfigurationResponse) CodecDecodeSelf(d *codec1978.Decoder) { 5744 var h codecSelfer100 5745 z, r := codec1978.GenHelperDecoder(d) 5746 _, _, _ = h, z, r 5747 yym1 := z.DecBinary() 5748 _ = yym1 5749 if false { 5750 } else if z.HasExtensions() && z.DecExt(x) { 5751 } else { 5752 yyct2 := r.ContainerType() 5753 if yyct2 == codecSelferValueTypeMap100 { 5754 yyl2 := r.ReadMapStart() 5755 if yyl2 == 0 { 5756 z.DecSendContainerState(codecSelfer_containerMapEnd100) 5757 } else { 5758 x.codecDecodeSelfFromMap(yyl2, d) 5759 } 5760 } else if yyct2 == codecSelferValueTypeArray100 { 5761 yyl2 := r.ReadArrayStart() 5762 if yyl2 == 0 { 5763 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 5764 } else { 5765 x.codecDecodeSelfFromArray(yyl2, d) 5766 } 5767 } else { 5768 panic(codecSelferOnlyMapOrArrayEncodeToStructErr100) 5769 } 5770 } 5771 } 5772 5773 func (x *SchedulerSetConfigurationResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { 5774 var h codecSelfer100 5775 z, r := codec1978.GenHelperDecoder(d) 5776 _, _, _ = h, z, r 5777 var yys3Slc = z.DecScratchBuffer() // default slice to decode into 5778 _ = yys3Slc 5779 var yyhl3 bool = l >= 0 5780 for yyj3 := 0; ; yyj3++ { 5781 if yyhl3 { 5782 if yyj3 >= l { 5783 break 5784 } 5785 } else { 5786 if r.CheckBreak() { 5787 break 5788 } 5789 } 5790 z.DecSendContainerState(codecSelfer_containerMapKey100) 5791 yys3Slc = r.DecodeBytes(yys3Slc, true, true) 5792 yys3 := string(yys3Slc) 5793 z.DecSendContainerState(codecSelfer_containerMapValue100) 5794 switch yys3 { 5795 case "Updated": 5796 if r.TryDecodeAsNil() { 5797 x.Updated = false 5798 } else { 5799 yyv4 := &x.Updated 5800 yym5 := z.DecBinary() 5801 _ = yym5 5802 if false { 5803 } else { 5804 *((*bool)(yyv4)) = r.DecodeBool() 5805 } 5806 } 5807 case "Index": 5808 if r.TryDecodeAsNil() { 5809 x.Index = 0 5810 } else { 5811 yyv6 := &x.Index 5812 yym7 := z.DecBinary() 5813 _ = yym7 5814 if false { 5815 } else { 5816 *((*uint64)(yyv6)) = uint64(r.DecodeUint(64)) 5817 } 5818 } 5819 default: 5820 z.DecStructFieldNotFound(-1, yys3) 5821 } // end switch yys3 5822 } // end for yyj3 5823 z.DecSendContainerState(codecSelfer_containerMapEnd100) 5824 } 5825 5826 func (x *SchedulerSetConfigurationResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { 5827 var h codecSelfer100 5828 z, r := codec1978.GenHelperDecoder(d) 5829 _, _, _ = h, z, r 5830 var yyj8 int 5831 var yyb8 bool 5832 var yyhl8 bool = l >= 0 5833 yyj8++ 5834 if yyhl8 { 5835 yyb8 = yyj8 > l 5836 } else { 5837 yyb8 = r.CheckBreak() 5838 } 5839 if yyb8 { 5840 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 5841 return 5842 } 5843 z.DecSendContainerState(codecSelfer_containerArrayElem100) 5844 if r.TryDecodeAsNil() { 5845 x.Updated = false 5846 } else { 5847 yyv9 := &x.Updated 5848 yym10 := z.DecBinary() 5849 _ = yym10 5850 if false { 5851 } else { 5852 *((*bool)(yyv9)) = r.DecodeBool() 5853 } 5854 } 5855 yyj8++ 5856 if yyhl8 { 5857 yyb8 = yyj8 > l 5858 } else { 5859 yyb8 = r.CheckBreak() 5860 } 5861 if yyb8 { 5862 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 5863 return 5864 } 5865 z.DecSendContainerState(codecSelfer_containerArrayElem100) 5866 if r.TryDecodeAsNil() { 5867 x.Index = 0 5868 } else { 5869 yyv11 := &x.Index 5870 yym12 := z.DecBinary() 5871 _ = yym12 5872 if false { 5873 } else { 5874 *((*uint64)(yyv11)) = uint64(r.DecodeUint(64)) 5875 } 5876 } 5877 for { 5878 yyj8++ 5879 if yyhl8 { 5880 yyb8 = yyj8 > l 5881 } else { 5882 yyb8 = r.CheckBreak() 5883 } 5884 if yyb8 { 5885 break 5886 } 5887 z.DecSendContainerState(codecSelfer_containerArrayElem100) 5888 z.DecStructFieldNotFound(yyj8-1, "") 5889 } 5890 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 5891 } 5892 5893 func (x *PreemptionConfig) CodecEncodeSelf(e *codec1978.Encoder) { 5894 var h codecSelfer100 5895 z, r := codec1978.GenHelperEncoder(e) 5896 _, _, _ = h, z, r 5897 if x == nil { 5898 r.EncodeNil() 5899 } else { 5900 yym1 := z.EncBinary() 5901 _ = yym1 5902 if false { 5903 } else if z.HasExtensions() && z.EncExt(x) { 5904 } else { 5905 yysep2 := !z.EncBinary() 5906 yy2arr2 := z.EncBasicHandle().StructToArray 5907 var yyq2 [1]bool 5908 _, _, _ = yysep2, yyq2, yy2arr2 5909 const yyr2 bool = false 5910 var yynn2 int 5911 if yyr2 || yy2arr2 { 5912 r.EncodeArrayStart(1) 5913 } else { 5914 yynn2 = 1 5915 for _, b := range yyq2 { 5916 if b { 5917 yynn2++ 5918 } 5919 } 5920 r.EncodeMapStart(yynn2) 5921 yynn2 = 0 5922 } 5923 if yyr2 || yy2arr2 { 5924 z.EncSendContainerState(codecSelfer_containerArrayElem100) 5925 yym4 := z.EncBinary() 5926 _ = yym4 5927 if false { 5928 } else { 5929 r.EncodeBool(bool(x.SystemSchedulerEnabled)) 5930 } 5931 } else { 5932 z.EncSendContainerState(codecSelfer_containerMapKey100) 5933 r.EncodeString(codecSelferC_UTF8100, string("SystemSchedulerEnabled")) 5934 z.EncSendContainerState(codecSelfer_containerMapValue100) 5935 yym5 := z.EncBinary() 5936 _ = yym5 5937 if false { 5938 } else { 5939 r.EncodeBool(bool(x.SystemSchedulerEnabled)) 5940 } 5941 } 5942 if yyr2 || yy2arr2 { 5943 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 5944 } else { 5945 z.EncSendContainerState(codecSelfer_containerMapEnd100) 5946 } 5947 } 5948 } 5949 } 5950 5951 func (x *PreemptionConfig) CodecDecodeSelf(d *codec1978.Decoder) { 5952 var h codecSelfer100 5953 z, r := codec1978.GenHelperDecoder(d) 5954 _, _, _ = h, z, r 5955 yym1 := z.DecBinary() 5956 _ = yym1 5957 if false { 5958 } else if z.HasExtensions() && z.DecExt(x) { 5959 } else { 5960 yyct2 := r.ContainerType() 5961 if yyct2 == codecSelferValueTypeMap100 { 5962 yyl2 := r.ReadMapStart() 5963 if yyl2 == 0 { 5964 z.DecSendContainerState(codecSelfer_containerMapEnd100) 5965 } else { 5966 x.codecDecodeSelfFromMap(yyl2, d) 5967 } 5968 } else if yyct2 == codecSelferValueTypeArray100 { 5969 yyl2 := r.ReadArrayStart() 5970 if yyl2 == 0 { 5971 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 5972 } else { 5973 x.codecDecodeSelfFromArray(yyl2, d) 5974 } 5975 } else { 5976 panic(codecSelferOnlyMapOrArrayEncodeToStructErr100) 5977 } 5978 } 5979 } 5980 5981 func (x *PreemptionConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { 5982 var h codecSelfer100 5983 z, r := codec1978.GenHelperDecoder(d) 5984 _, _, _ = h, z, r 5985 var yys3Slc = z.DecScratchBuffer() // default slice to decode into 5986 _ = yys3Slc 5987 var yyhl3 bool = l >= 0 5988 for yyj3 := 0; ; yyj3++ { 5989 if yyhl3 { 5990 if yyj3 >= l { 5991 break 5992 } 5993 } else { 5994 if r.CheckBreak() { 5995 break 5996 } 5997 } 5998 z.DecSendContainerState(codecSelfer_containerMapKey100) 5999 yys3Slc = r.DecodeBytes(yys3Slc, true, true) 6000 yys3 := string(yys3Slc) 6001 z.DecSendContainerState(codecSelfer_containerMapValue100) 6002 switch yys3 { 6003 case "SystemSchedulerEnabled": 6004 if r.TryDecodeAsNil() { 6005 x.SystemSchedulerEnabled = false 6006 } else { 6007 yyv4 := &x.SystemSchedulerEnabled 6008 yym5 := z.DecBinary() 6009 _ = yym5 6010 if false { 6011 } else { 6012 *((*bool)(yyv4)) = r.DecodeBool() 6013 } 6014 } 6015 default: 6016 z.DecStructFieldNotFound(-1, yys3) 6017 } // end switch yys3 6018 } // end for yyj3 6019 z.DecSendContainerState(codecSelfer_containerMapEnd100) 6020 } 6021 6022 func (x *PreemptionConfig) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { 6023 var h codecSelfer100 6024 z, r := codec1978.GenHelperDecoder(d) 6025 _, _, _ = h, z, r 6026 var yyj6 int 6027 var yyb6 bool 6028 var yyhl6 bool = l >= 0 6029 yyj6++ 6030 if yyhl6 { 6031 yyb6 = yyj6 > l 6032 } else { 6033 yyb6 = r.CheckBreak() 6034 } 6035 if yyb6 { 6036 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 6037 return 6038 } 6039 z.DecSendContainerState(codecSelfer_containerArrayElem100) 6040 if r.TryDecodeAsNil() { 6041 x.SystemSchedulerEnabled = false 6042 } else { 6043 yyv7 := &x.SystemSchedulerEnabled 6044 yym8 := z.DecBinary() 6045 _ = yym8 6046 if false { 6047 } else { 6048 *((*bool)(yyv7)) = r.DecodeBool() 6049 } 6050 } 6051 for { 6052 yyj6++ 6053 if yyhl6 { 6054 yyb6 = yyj6 > l 6055 } else { 6056 yyb6 = r.CheckBreak() 6057 } 6058 if yyb6 { 6059 break 6060 } 6061 z.DecSendContainerState(codecSelfer_containerArrayElem100) 6062 z.DecStructFieldNotFound(yyj6-1, "") 6063 } 6064 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 6065 } 6066 6067 func (x *SchedulerSetConfigRequest) CodecEncodeSelf(e *codec1978.Encoder) { 6068 var h codecSelfer100 6069 z, r := codec1978.GenHelperEncoder(e) 6070 _, _, _ = h, z, r 6071 if x == nil { 6072 r.EncodeNil() 6073 } else { 6074 yym1 := z.EncBinary() 6075 _ = yym1 6076 if false { 6077 } else if z.HasExtensions() && z.EncExt(x) { 6078 } else { 6079 yysep2 := !z.EncBinary() 6080 yy2arr2 := z.EncBasicHandle().StructToArray 6081 var yyq2 [6]bool 6082 _, _, _ = yysep2, yyq2, yy2arr2 6083 const yyr2 bool = false 6084 var yynn2 int 6085 if yyr2 || yy2arr2 { 6086 r.EncodeArrayStart(6) 6087 } else { 6088 yynn2 = 6 6089 for _, b := range yyq2 { 6090 if b { 6091 yynn2++ 6092 } 6093 } 6094 r.EncodeMapStart(yynn2) 6095 yynn2 = 0 6096 } 6097 if yyr2 || yy2arr2 { 6098 z.EncSendContainerState(codecSelfer_containerArrayElem100) 6099 yy4 := &x.Config 6100 yy4.CodecEncodeSelf(e) 6101 } else { 6102 z.EncSendContainerState(codecSelfer_containerMapKey100) 6103 r.EncodeString(codecSelferC_UTF8100, string("Config")) 6104 z.EncSendContainerState(codecSelfer_containerMapValue100) 6105 yy6 := &x.Config 6106 yy6.CodecEncodeSelf(e) 6107 } 6108 if yyr2 || yy2arr2 { 6109 z.EncSendContainerState(codecSelfer_containerArrayElem100) 6110 yym9 := z.EncBinary() 6111 _ = yym9 6112 if false { 6113 } else { 6114 r.EncodeBool(bool(x.CAS)) 6115 } 6116 } else { 6117 z.EncSendContainerState(codecSelfer_containerMapKey100) 6118 r.EncodeString(codecSelferC_UTF8100, string("CAS")) 6119 z.EncSendContainerState(codecSelfer_containerMapValue100) 6120 yym10 := z.EncBinary() 6121 _ = yym10 6122 if false { 6123 } else { 6124 r.EncodeBool(bool(x.CAS)) 6125 } 6126 } 6127 if yyr2 || yy2arr2 { 6128 z.EncSendContainerState(codecSelfer_containerArrayElem100) 6129 yym12 := z.EncBinary() 6130 _ = yym12 6131 if false { 6132 } else { 6133 r.EncodeString(codecSelferC_UTF8100, string(x.Region)) 6134 } 6135 } else { 6136 z.EncSendContainerState(codecSelfer_containerMapKey100) 6137 r.EncodeString(codecSelferC_UTF8100, string("Region")) 6138 z.EncSendContainerState(codecSelfer_containerMapValue100) 6139 yym13 := z.EncBinary() 6140 _ = yym13 6141 if false { 6142 } else { 6143 r.EncodeString(codecSelferC_UTF8100, string(x.Region)) 6144 } 6145 } 6146 if yyr2 || yy2arr2 { 6147 z.EncSendContainerState(codecSelfer_containerArrayElem100) 6148 yym15 := z.EncBinary() 6149 _ = yym15 6150 if false { 6151 } else { 6152 r.EncodeString(codecSelferC_UTF8100, string(x.Namespace)) 6153 } 6154 } else { 6155 z.EncSendContainerState(codecSelfer_containerMapKey100) 6156 r.EncodeString(codecSelferC_UTF8100, string("Namespace")) 6157 z.EncSendContainerState(codecSelfer_containerMapValue100) 6158 yym16 := z.EncBinary() 6159 _ = yym16 6160 if false { 6161 } else { 6162 r.EncodeString(codecSelferC_UTF8100, string(x.Namespace)) 6163 } 6164 } 6165 if yyr2 || yy2arr2 { 6166 z.EncSendContainerState(codecSelfer_containerArrayElem100) 6167 yym18 := z.EncBinary() 6168 _ = yym18 6169 if false { 6170 } else { 6171 r.EncodeString(codecSelferC_UTF8100, string(x.AuthToken)) 6172 } 6173 } else { 6174 z.EncSendContainerState(codecSelfer_containerMapKey100) 6175 r.EncodeString(codecSelferC_UTF8100, string("AuthToken")) 6176 z.EncSendContainerState(codecSelfer_containerMapValue100) 6177 yym19 := z.EncBinary() 6178 _ = yym19 6179 if false { 6180 } else { 6181 r.EncodeString(codecSelferC_UTF8100, string(x.AuthToken)) 6182 } 6183 } 6184 if yyr2 || yy2arr2 { 6185 z.EncSendContainerState(codecSelfer_containerArrayElem100) 6186 yym21 := z.EncBinary() 6187 _ = yym21 6188 if false { 6189 } else { 6190 r.EncodeBool(bool(x.Forwarded)) 6191 } 6192 } else { 6193 z.EncSendContainerState(codecSelfer_containerMapKey100) 6194 r.EncodeString(codecSelferC_UTF8100, string("Forwarded")) 6195 z.EncSendContainerState(codecSelfer_containerMapValue100) 6196 yym22 := z.EncBinary() 6197 _ = yym22 6198 if false { 6199 } else { 6200 r.EncodeBool(bool(x.Forwarded)) 6201 } 6202 } 6203 if yyr2 || yy2arr2 { 6204 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 6205 } else { 6206 z.EncSendContainerState(codecSelfer_containerMapEnd100) 6207 } 6208 } 6209 } 6210 } 6211 6212 func (x *SchedulerSetConfigRequest) CodecDecodeSelf(d *codec1978.Decoder) { 6213 var h codecSelfer100 6214 z, r := codec1978.GenHelperDecoder(d) 6215 _, _, _ = h, z, r 6216 yym1 := z.DecBinary() 6217 _ = yym1 6218 if false { 6219 } else if z.HasExtensions() && z.DecExt(x) { 6220 } else { 6221 yyct2 := r.ContainerType() 6222 if yyct2 == codecSelferValueTypeMap100 { 6223 yyl2 := r.ReadMapStart() 6224 if yyl2 == 0 { 6225 z.DecSendContainerState(codecSelfer_containerMapEnd100) 6226 } else { 6227 x.codecDecodeSelfFromMap(yyl2, d) 6228 } 6229 } else if yyct2 == codecSelferValueTypeArray100 { 6230 yyl2 := r.ReadArrayStart() 6231 if yyl2 == 0 { 6232 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 6233 } else { 6234 x.codecDecodeSelfFromArray(yyl2, d) 6235 } 6236 } else { 6237 panic(codecSelferOnlyMapOrArrayEncodeToStructErr100) 6238 } 6239 } 6240 } 6241 6242 func (x *SchedulerSetConfigRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { 6243 var h codecSelfer100 6244 z, r := codec1978.GenHelperDecoder(d) 6245 _, _, _ = h, z, r 6246 var yys3Slc = z.DecScratchBuffer() // default slice to decode into 6247 _ = yys3Slc 6248 var yyhl3 bool = l >= 0 6249 for yyj3 := 0; ; yyj3++ { 6250 if yyhl3 { 6251 if yyj3 >= l { 6252 break 6253 } 6254 } else { 6255 if r.CheckBreak() { 6256 break 6257 } 6258 } 6259 z.DecSendContainerState(codecSelfer_containerMapKey100) 6260 yys3Slc = r.DecodeBytes(yys3Slc, true, true) 6261 yys3 := string(yys3Slc) 6262 z.DecSendContainerState(codecSelfer_containerMapValue100) 6263 switch yys3 { 6264 case "Config": 6265 if r.TryDecodeAsNil() { 6266 x.Config = SchedulerConfiguration{} 6267 } else { 6268 yyv4 := &x.Config 6269 yyv4.CodecDecodeSelf(d) 6270 } 6271 case "CAS": 6272 if r.TryDecodeAsNil() { 6273 x.CAS = false 6274 } else { 6275 yyv5 := &x.CAS 6276 yym6 := z.DecBinary() 6277 _ = yym6 6278 if false { 6279 } else { 6280 *((*bool)(yyv5)) = r.DecodeBool() 6281 } 6282 } 6283 case "Region": 6284 if r.TryDecodeAsNil() { 6285 x.Region = "" 6286 } else { 6287 yyv7 := &x.Region 6288 yym8 := z.DecBinary() 6289 _ = yym8 6290 if false { 6291 } else { 6292 *((*string)(yyv7)) = r.DecodeString() 6293 } 6294 } 6295 case "Namespace": 6296 if r.TryDecodeAsNil() { 6297 x.Namespace = "" 6298 } else { 6299 yyv9 := &x.Namespace 6300 yym10 := z.DecBinary() 6301 _ = yym10 6302 if false { 6303 } else { 6304 *((*string)(yyv9)) = r.DecodeString() 6305 } 6306 } 6307 case "AuthToken": 6308 if r.TryDecodeAsNil() { 6309 x.AuthToken = "" 6310 } else { 6311 yyv11 := &x.AuthToken 6312 yym12 := z.DecBinary() 6313 _ = yym12 6314 if false { 6315 } else { 6316 *((*string)(yyv11)) = r.DecodeString() 6317 } 6318 } 6319 case "Forwarded": 6320 if r.TryDecodeAsNil() { 6321 x.Forwarded = false 6322 } else { 6323 yyv13 := &x.Forwarded 6324 yym14 := z.DecBinary() 6325 _ = yym14 6326 if false { 6327 } else { 6328 *((*bool)(yyv13)) = r.DecodeBool() 6329 } 6330 } 6331 default: 6332 z.DecStructFieldNotFound(-1, yys3) 6333 } // end switch yys3 6334 } // end for yyj3 6335 z.DecSendContainerState(codecSelfer_containerMapEnd100) 6336 } 6337 6338 func (x *SchedulerSetConfigRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { 6339 var h codecSelfer100 6340 z, r := codec1978.GenHelperDecoder(d) 6341 _, _, _ = h, z, r 6342 var yyj15 int 6343 var yyb15 bool 6344 var yyhl15 bool = l >= 0 6345 yyj15++ 6346 if yyhl15 { 6347 yyb15 = yyj15 > l 6348 } else { 6349 yyb15 = r.CheckBreak() 6350 } 6351 if yyb15 { 6352 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 6353 return 6354 } 6355 z.DecSendContainerState(codecSelfer_containerArrayElem100) 6356 if r.TryDecodeAsNil() { 6357 x.Config = SchedulerConfiguration{} 6358 } else { 6359 yyv16 := &x.Config 6360 yyv16.CodecDecodeSelf(d) 6361 } 6362 yyj15++ 6363 if yyhl15 { 6364 yyb15 = yyj15 > l 6365 } else { 6366 yyb15 = r.CheckBreak() 6367 } 6368 if yyb15 { 6369 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 6370 return 6371 } 6372 z.DecSendContainerState(codecSelfer_containerArrayElem100) 6373 if r.TryDecodeAsNil() { 6374 x.CAS = false 6375 } else { 6376 yyv17 := &x.CAS 6377 yym18 := z.DecBinary() 6378 _ = yym18 6379 if false { 6380 } else { 6381 *((*bool)(yyv17)) = r.DecodeBool() 6382 } 6383 } 6384 yyj15++ 6385 if yyhl15 { 6386 yyb15 = yyj15 > l 6387 } else { 6388 yyb15 = r.CheckBreak() 6389 } 6390 if yyb15 { 6391 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 6392 return 6393 } 6394 z.DecSendContainerState(codecSelfer_containerArrayElem100) 6395 if r.TryDecodeAsNil() { 6396 x.Region = "" 6397 } else { 6398 yyv19 := &x.Region 6399 yym20 := z.DecBinary() 6400 _ = yym20 6401 if false { 6402 } else { 6403 *((*string)(yyv19)) = r.DecodeString() 6404 } 6405 } 6406 yyj15++ 6407 if yyhl15 { 6408 yyb15 = yyj15 > l 6409 } else { 6410 yyb15 = r.CheckBreak() 6411 } 6412 if yyb15 { 6413 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 6414 return 6415 } 6416 z.DecSendContainerState(codecSelfer_containerArrayElem100) 6417 if r.TryDecodeAsNil() { 6418 x.Namespace = "" 6419 } else { 6420 yyv21 := &x.Namespace 6421 yym22 := z.DecBinary() 6422 _ = yym22 6423 if false { 6424 } else { 6425 *((*string)(yyv21)) = r.DecodeString() 6426 } 6427 } 6428 yyj15++ 6429 if yyhl15 { 6430 yyb15 = yyj15 > l 6431 } else { 6432 yyb15 = r.CheckBreak() 6433 } 6434 if yyb15 { 6435 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 6436 return 6437 } 6438 z.DecSendContainerState(codecSelfer_containerArrayElem100) 6439 if r.TryDecodeAsNil() { 6440 x.AuthToken = "" 6441 } else { 6442 yyv23 := &x.AuthToken 6443 yym24 := z.DecBinary() 6444 _ = yym24 6445 if false { 6446 } else { 6447 *((*string)(yyv23)) = r.DecodeString() 6448 } 6449 } 6450 yyj15++ 6451 if yyhl15 { 6452 yyb15 = yyj15 > l 6453 } else { 6454 yyb15 = r.CheckBreak() 6455 } 6456 if yyb15 { 6457 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 6458 return 6459 } 6460 z.DecSendContainerState(codecSelfer_containerArrayElem100) 6461 if r.TryDecodeAsNil() { 6462 x.Forwarded = false 6463 } else { 6464 yyv25 := &x.Forwarded 6465 yym26 := z.DecBinary() 6466 _ = yym26 6467 if false { 6468 } else { 6469 *((*bool)(yyv25)) = r.DecodeBool() 6470 } 6471 } 6472 for { 6473 yyj15++ 6474 if yyhl15 { 6475 yyb15 = yyj15 > l 6476 } else { 6477 yyb15 = r.CheckBreak() 6478 } 6479 if yyb15 { 6480 break 6481 } 6482 z.DecSendContainerState(codecSelfer_containerArrayElem100) 6483 z.DecStructFieldNotFound(yyj15-1, "") 6484 } 6485 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 6486 } 6487 6488 func (x *StreamingRpcHeader) CodecEncodeSelf(e *codec1978.Encoder) { 6489 var h codecSelfer100 6490 z, r := codec1978.GenHelperEncoder(e) 6491 _, _, _ = h, z, r 6492 if x == nil { 6493 r.EncodeNil() 6494 } else { 6495 yym1 := z.EncBinary() 6496 _ = yym1 6497 if false { 6498 } else if z.HasExtensions() && z.EncExt(x) { 6499 } else { 6500 yysep2 := !z.EncBinary() 6501 yy2arr2 := z.EncBasicHandle().StructToArray 6502 var yyq2 [1]bool 6503 _, _, _ = yysep2, yyq2, yy2arr2 6504 const yyr2 bool = false 6505 var yynn2 int 6506 if yyr2 || yy2arr2 { 6507 r.EncodeArrayStart(1) 6508 } else { 6509 yynn2 = 1 6510 for _, b := range yyq2 { 6511 if b { 6512 yynn2++ 6513 } 6514 } 6515 r.EncodeMapStart(yynn2) 6516 yynn2 = 0 6517 } 6518 if yyr2 || yy2arr2 { 6519 z.EncSendContainerState(codecSelfer_containerArrayElem100) 6520 yym4 := z.EncBinary() 6521 _ = yym4 6522 if false { 6523 } else { 6524 r.EncodeString(codecSelferC_UTF8100, string(x.Method)) 6525 } 6526 } else { 6527 z.EncSendContainerState(codecSelfer_containerMapKey100) 6528 r.EncodeString(codecSelferC_UTF8100, string("Method")) 6529 z.EncSendContainerState(codecSelfer_containerMapValue100) 6530 yym5 := z.EncBinary() 6531 _ = yym5 6532 if false { 6533 } else { 6534 r.EncodeString(codecSelferC_UTF8100, string(x.Method)) 6535 } 6536 } 6537 if yyr2 || yy2arr2 { 6538 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 6539 } else { 6540 z.EncSendContainerState(codecSelfer_containerMapEnd100) 6541 } 6542 } 6543 } 6544 } 6545 6546 func (x *StreamingRpcHeader) CodecDecodeSelf(d *codec1978.Decoder) { 6547 var h codecSelfer100 6548 z, r := codec1978.GenHelperDecoder(d) 6549 _, _, _ = h, z, r 6550 yym1 := z.DecBinary() 6551 _ = yym1 6552 if false { 6553 } else if z.HasExtensions() && z.DecExt(x) { 6554 } else { 6555 yyct2 := r.ContainerType() 6556 if yyct2 == codecSelferValueTypeMap100 { 6557 yyl2 := r.ReadMapStart() 6558 if yyl2 == 0 { 6559 z.DecSendContainerState(codecSelfer_containerMapEnd100) 6560 } else { 6561 x.codecDecodeSelfFromMap(yyl2, d) 6562 } 6563 } else if yyct2 == codecSelferValueTypeArray100 { 6564 yyl2 := r.ReadArrayStart() 6565 if yyl2 == 0 { 6566 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 6567 } else { 6568 x.codecDecodeSelfFromArray(yyl2, d) 6569 } 6570 } else { 6571 panic(codecSelferOnlyMapOrArrayEncodeToStructErr100) 6572 } 6573 } 6574 } 6575 6576 func (x *StreamingRpcHeader) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { 6577 var h codecSelfer100 6578 z, r := codec1978.GenHelperDecoder(d) 6579 _, _, _ = h, z, r 6580 var yys3Slc = z.DecScratchBuffer() // default slice to decode into 6581 _ = yys3Slc 6582 var yyhl3 bool = l >= 0 6583 for yyj3 := 0; ; yyj3++ { 6584 if yyhl3 { 6585 if yyj3 >= l { 6586 break 6587 } 6588 } else { 6589 if r.CheckBreak() { 6590 break 6591 } 6592 } 6593 z.DecSendContainerState(codecSelfer_containerMapKey100) 6594 yys3Slc = r.DecodeBytes(yys3Slc, true, true) 6595 yys3 := string(yys3Slc) 6596 z.DecSendContainerState(codecSelfer_containerMapValue100) 6597 switch yys3 { 6598 case "Method": 6599 if r.TryDecodeAsNil() { 6600 x.Method = "" 6601 } else { 6602 yyv4 := &x.Method 6603 yym5 := z.DecBinary() 6604 _ = yym5 6605 if false { 6606 } else { 6607 *((*string)(yyv4)) = r.DecodeString() 6608 } 6609 } 6610 default: 6611 z.DecStructFieldNotFound(-1, yys3) 6612 } // end switch yys3 6613 } // end for yyj3 6614 z.DecSendContainerState(codecSelfer_containerMapEnd100) 6615 } 6616 6617 func (x *StreamingRpcHeader) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { 6618 var h codecSelfer100 6619 z, r := codec1978.GenHelperDecoder(d) 6620 _, _, _ = h, z, r 6621 var yyj6 int 6622 var yyb6 bool 6623 var yyhl6 bool = l >= 0 6624 yyj6++ 6625 if yyhl6 { 6626 yyb6 = yyj6 > l 6627 } else { 6628 yyb6 = r.CheckBreak() 6629 } 6630 if yyb6 { 6631 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 6632 return 6633 } 6634 z.DecSendContainerState(codecSelfer_containerArrayElem100) 6635 if r.TryDecodeAsNil() { 6636 x.Method = "" 6637 } else { 6638 yyv7 := &x.Method 6639 yym8 := z.DecBinary() 6640 _ = yym8 6641 if false { 6642 } else { 6643 *((*string)(yyv7)) = r.DecodeString() 6644 } 6645 } 6646 for { 6647 yyj6++ 6648 if yyhl6 { 6649 yyb6 = yyj6 > l 6650 } else { 6651 yyb6 = r.CheckBreak() 6652 } 6653 if yyb6 { 6654 break 6655 } 6656 z.DecSendContainerState(codecSelfer_containerArrayElem100) 6657 z.DecStructFieldNotFound(yyj6-1, "") 6658 } 6659 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 6660 } 6661 6662 func (x *StreamingRpcAck) CodecEncodeSelf(e *codec1978.Encoder) { 6663 var h codecSelfer100 6664 z, r := codec1978.GenHelperEncoder(e) 6665 _, _, _ = h, z, r 6666 if x == nil { 6667 r.EncodeNil() 6668 } else { 6669 yym1 := z.EncBinary() 6670 _ = yym1 6671 if false { 6672 } else if z.HasExtensions() && z.EncExt(x) { 6673 } else { 6674 yysep2 := !z.EncBinary() 6675 yy2arr2 := z.EncBasicHandle().StructToArray 6676 var yyq2 [1]bool 6677 _, _, _ = yysep2, yyq2, yy2arr2 6678 const yyr2 bool = false 6679 var yynn2 int 6680 if yyr2 || yy2arr2 { 6681 r.EncodeArrayStart(1) 6682 } else { 6683 yynn2 = 1 6684 for _, b := range yyq2 { 6685 if b { 6686 yynn2++ 6687 } 6688 } 6689 r.EncodeMapStart(yynn2) 6690 yynn2 = 0 6691 } 6692 if yyr2 || yy2arr2 { 6693 z.EncSendContainerState(codecSelfer_containerArrayElem100) 6694 yym4 := z.EncBinary() 6695 _ = yym4 6696 if false { 6697 } else { 6698 r.EncodeString(codecSelferC_UTF8100, string(x.Error)) 6699 } 6700 } else { 6701 z.EncSendContainerState(codecSelfer_containerMapKey100) 6702 r.EncodeString(codecSelferC_UTF8100, string("Error")) 6703 z.EncSendContainerState(codecSelfer_containerMapValue100) 6704 yym5 := z.EncBinary() 6705 _ = yym5 6706 if false { 6707 } else { 6708 r.EncodeString(codecSelferC_UTF8100, string(x.Error)) 6709 } 6710 } 6711 if yyr2 || yy2arr2 { 6712 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 6713 } else { 6714 z.EncSendContainerState(codecSelfer_containerMapEnd100) 6715 } 6716 } 6717 } 6718 } 6719 6720 func (x *StreamingRpcAck) CodecDecodeSelf(d *codec1978.Decoder) { 6721 var h codecSelfer100 6722 z, r := codec1978.GenHelperDecoder(d) 6723 _, _, _ = h, z, r 6724 yym1 := z.DecBinary() 6725 _ = yym1 6726 if false { 6727 } else if z.HasExtensions() && z.DecExt(x) { 6728 } else { 6729 yyct2 := r.ContainerType() 6730 if yyct2 == codecSelferValueTypeMap100 { 6731 yyl2 := r.ReadMapStart() 6732 if yyl2 == 0 { 6733 z.DecSendContainerState(codecSelfer_containerMapEnd100) 6734 } else { 6735 x.codecDecodeSelfFromMap(yyl2, d) 6736 } 6737 } else if yyct2 == codecSelferValueTypeArray100 { 6738 yyl2 := r.ReadArrayStart() 6739 if yyl2 == 0 { 6740 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 6741 } else { 6742 x.codecDecodeSelfFromArray(yyl2, d) 6743 } 6744 } else { 6745 panic(codecSelferOnlyMapOrArrayEncodeToStructErr100) 6746 } 6747 } 6748 } 6749 6750 func (x *StreamingRpcAck) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { 6751 var h codecSelfer100 6752 z, r := codec1978.GenHelperDecoder(d) 6753 _, _, _ = h, z, r 6754 var yys3Slc = z.DecScratchBuffer() // default slice to decode into 6755 _ = yys3Slc 6756 var yyhl3 bool = l >= 0 6757 for yyj3 := 0; ; yyj3++ { 6758 if yyhl3 { 6759 if yyj3 >= l { 6760 break 6761 } 6762 } else { 6763 if r.CheckBreak() { 6764 break 6765 } 6766 } 6767 z.DecSendContainerState(codecSelfer_containerMapKey100) 6768 yys3Slc = r.DecodeBytes(yys3Slc, true, true) 6769 yys3 := string(yys3Slc) 6770 z.DecSendContainerState(codecSelfer_containerMapValue100) 6771 switch yys3 { 6772 case "Error": 6773 if r.TryDecodeAsNil() { 6774 x.Error = "" 6775 } else { 6776 yyv4 := &x.Error 6777 yym5 := z.DecBinary() 6778 _ = yym5 6779 if false { 6780 } else { 6781 *((*string)(yyv4)) = r.DecodeString() 6782 } 6783 } 6784 default: 6785 z.DecStructFieldNotFound(-1, yys3) 6786 } // end switch yys3 6787 } // end for yyj3 6788 z.DecSendContainerState(codecSelfer_containerMapEnd100) 6789 } 6790 6791 func (x *StreamingRpcAck) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { 6792 var h codecSelfer100 6793 z, r := codec1978.GenHelperDecoder(d) 6794 _, _, _ = h, z, r 6795 var yyj6 int 6796 var yyb6 bool 6797 var yyhl6 bool = l >= 0 6798 yyj6++ 6799 if yyhl6 { 6800 yyb6 = yyj6 > l 6801 } else { 6802 yyb6 = r.CheckBreak() 6803 } 6804 if yyb6 { 6805 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 6806 return 6807 } 6808 z.DecSendContainerState(codecSelfer_containerArrayElem100) 6809 if r.TryDecodeAsNil() { 6810 x.Error = "" 6811 } else { 6812 yyv7 := &x.Error 6813 yym8 := z.DecBinary() 6814 _ = yym8 6815 if false { 6816 } else { 6817 *((*string)(yyv7)) = r.DecodeString() 6818 } 6819 } 6820 for { 6821 yyj6++ 6822 if yyhl6 { 6823 yyb6 = yyj6 > l 6824 } else { 6825 yyb6 = r.CheckBreak() 6826 } 6827 if yyb6 { 6828 break 6829 } 6830 z.DecSendContainerState(codecSelfer_containerArrayElem100) 6831 z.DecStructFieldNotFound(yyj6-1, "") 6832 } 6833 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 6834 } 6835 6836 func (x *StreamingRpcRegistry) CodecEncodeSelf(e *codec1978.Encoder) { 6837 var h codecSelfer100 6838 z, r := codec1978.GenHelperEncoder(e) 6839 _, _, _ = h, z, r 6840 if x == nil { 6841 r.EncodeNil() 6842 } else { 6843 yym1 := z.EncBinary() 6844 _ = yym1 6845 if false { 6846 } else if z.HasExtensions() && z.EncExt(x) { 6847 } else { 6848 yysep2 := !z.EncBinary() 6849 yy2arr2 := z.EncBasicHandle().StructToArray 6850 var yyq2 [0]bool 6851 _, _, _ = yysep2, yyq2, yy2arr2 6852 const yyr2 bool = false 6853 var yynn2 int 6854 if yyr2 || yy2arr2 { 6855 r.EncodeArrayStart(0) 6856 } else { 6857 yynn2 = 0 6858 for _, b := range yyq2 { 6859 if b { 6860 yynn2++ 6861 } 6862 } 6863 r.EncodeMapStart(yynn2) 6864 yynn2 = 0 6865 } 6866 if yyr2 || yy2arr2 { 6867 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 6868 } else { 6869 z.EncSendContainerState(codecSelfer_containerMapEnd100) 6870 } 6871 } 6872 } 6873 } 6874 6875 func (x *StreamingRpcRegistry) CodecDecodeSelf(d *codec1978.Decoder) { 6876 var h codecSelfer100 6877 z, r := codec1978.GenHelperDecoder(d) 6878 _, _, _ = h, z, r 6879 yym1 := z.DecBinary() 6880 _ = yym1 6881 if false { 6882 } else if z.HasExtensions() && z.DecExt(x) { 6883 } else { 6884 yyct2 := r.ContainerType() 6885 if yyct2 == codecSelferValueTypeMap100 { 6886 yyl2 := r.ReadMapStart() 6887 if yyl2 == 0 { 6888 z.DecSendContainerState(codecSelfer_containerMapEnd100) 6889 } else { 6890 x.codecDecodeSelfFromMap(yyl2, d) 6891 } 6892 } else if yyct2 == codecSelferValueTypeArray100 { 6893 yyl2 := r.ReadArrayStart() 6894 if yyl2 == 0 { 6895 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 6896 } else { 6897 x.codecDecodeSelfFromArray(yyl2, d) 6898 } 6899 } else { 6900 panic(codecSelferOnlyMapOrArrayEncodeToStructErr100) 6901 } 6902 } 6903 } 6904 6905 func (x *StreamingRpcRegistry) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { 6906 var h codecSelfer100 6907 z, r := codec1978.GenHelperDecoder(d) 6908 _, _, _ = h, z, r 6909 var yys3Slc = z.DecScratchBuffer() // default slice to decode into 6910 _ = yys3Slc 6911 var yyhl3 bool = l >= 0 6912 for yyj3 := 0; ; yyj3++ { 6913 if yyhl3 { 6914 if yyj3 >= l { 6915 break 6916 } 6917 } else { 6918 if r.CheckBreak() { 6919 break 6920 } 6921 } 6922 z.DecSendContainerState(codecSelfer_containerMapKey100) 6923 yys3Slc = r.DecodeBytes(yys3Slc, true, true) 6924 yys3 := string(yys3Slc) 6925 z.DecSendContainerState(codecSelfer_containerMapValue100) 6926 switch yys3 { 6927 default: 6928 z.DecStructFieldNotFound(-1, yys3) 6929 } // end switch yys3 6930 } // end for yyj3 6931 z.DecSendContainerState(codecSelfer_containerMapEnd100) 6932 } 6933 6934 func (x *StreamingRpcRegistry) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { 6935 var h codecSelfer100 6936 z, r := codec1978.GenHelperDecoder(d) 6937 _, _, _ = h, z, r 6938 var yyj4 int 6939 var yyb4 bool 6940 var yyhl4 bool = l >= 0 6941 for { 6942 yyj4++ 6943 if yyhl4 { 6944 yyb4 = yyj4 > l 6945 } else { 6946 yyb4 = r.CheckBreak() 6947 } 6948 if yyb4 { 6949 break 6950 } 6951 z.DecSendContainerState(codecSelfer_containerArrayElem100) 6952 z.DecStructFieldNotFound(yyj4-1, "") 6953 } 6954 z.DecSendContainerState(codecSelfer_containerArrayEnd100) 6955 } 6956 6957 func (x codecSelfer100) encBitmap(v Bitmap, e *codec1978.Encoder) { 6958 var h codecSelfer100 6959 z, r := codec1978.GenHelperEncoder(e) 6960 _, _, _ = h, z, r 6961 r.EncodeStringBytes(codecSelferC_RAW100, []byte(v)) 6962 } 6963 6964 func (x codecSelfer100) decBitmap(v *Bitmap, d *codec1978.Decoder) { 6965 var h codecSelfer100 6966 z, r := codec1978.GenHelperDecoder(d) 6967 _, _, _ = h, z, r 6968 *v = r.DecodeBytes(*((*[]byte)(v)), false, false) 6969 } 6970 6971 func (x codecSelfer100) encSlicePtrtoFieldDiff(v []*FieldDiff, e *codec1978.Encoder) { 6972 var h codecSelfer100 6973 z, r := codec1978.GenHelperEncoder(e) 6974 _, _, _ = h, z, r 6975 r.EncodeArrayStart(len(v)) 6976 for _, yyv1 := range v { 6977 z.EncSendContainerState(codecSelfer_containerArrayElem100) 6978 if yyv1 == nil { 6979 r.EncodeNil() 6980 } else { 6981 yyv1.CodecEncodeSelf(e) 6982 } 6983 } 6984 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 6985 } 6986 6987 func (x codecSelfer100) decSlicePtrtoFieldDiff(v *[]*FieldDiff, d *codec1978.Decoder) { 6988 var h codecSelfer100 6989 z, r := codec1978.GenHelperDecoder(d) 6990 _, _, _ = h, z, r 6991 6992 yyv1 := *v 6993 yyh1, yyl1 := z.DecSliceHelperStart() 6994 var yyc1 bool 6995 _ = yyc1 6996 if yyl1 == 0 { 6997 if yyv1 == nil { 6998 yyv1 = []*FieldDiff{} 6999 yyc1 = true 7000 } else if len(yyv1) != 0 { 7001 yyv1 = yyv1[:0] 7002 yyc1 = true 7003 } 7004 } else if yyl1 > 0 { 7005 var yyrr1, yyrl1 int 7006 var yyrt1 bool 7007 _, _ = yyrl1, yyrt1 7008 yyrr1 = yyl1 // len(yyv1) 7009 if yyl1 > cap(yyv1) { 7010 7011 yyrg1 := len(yyv1) > 0 7012 yyv21 := yyv1 7013 yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) 7014 if yyrt1 { 7015 if yyrl1 <= cap(yyv1) { 7016 yyv1 = yyv1[:yyrl1] 7017 } else { 7018 yyv1 = make([]*FieldDiff, yyrl1) 7019 } 7020 } else { 7021 yyv1 = make([]*FieldDiff, yyrl1) 7022 } 7023 yyc1 = true 7024 yyrr1 = len(yyv1) 7025 if yyrg1 { 7026 copy(yyv1, yyv21) 7027 } 7028 } else if yyl1 != len(yyv1) { 7029 yyv1 = yyv1[:yyl1] 7030 yyc1 = true 7031 } 7032 yyj1 := 0 7033 for ; yyj1 < yyrr1; yyj1++ { 7034 yyh1.ElemContainerState(yyj1) 7035 if r.TryDecodeAsNil() { 7036 if yyv1[yyj1] != nil { 7037 *yyv1[yyj1] = FieldDiff{} 7038 } 7039 } else { 7040 if yyv1[yyj1] == nil { 7041 yyv1[yyj1] = new(FieldDiff) 7042 } 7043 yyw2 := yyv1[yyj1] 7044 yyw2.CodecDecodeSelf(d) 7045 } 7046 7047 } 7048 if yyrt1 { 7049 for ; yyj1 < yyl1; yyj1++ { 7050 yyv1 = append(yyv1, nil) 7051 yyh1.ElemContainerState(yyj1) 7052 if r.TryDecodeAsNil() { 7053 if yyv1[yyj1] != nil { 7054 *yyv1[yyj1] = FieldDiff{} 7055 } 7056 } else { 7057 if yyv1[yyj1] == nil { 7058 yyv1[yyj1] = new(FieldDiff) 7059 } 7060 yyw3 := yyv1[yyj1] 7061 yyw3.CodecDecodeSelf(d) 7062 } 7063 7064 } 7065 } 7066 7067 } else { 7068 yyj1 := 0 7069 for ; !r.CheckBreak(); yyj1++ { 7070 7071 if yyj1 >= len(yyv1) { 7072 yyv1 = append(yyv1, nil) // var yyz1 *FieldDiff 7073 yyc1 = true 7074 } 7075 yyh1.ElemContainerState(yyj1) 7076 if yyj1 < len(yyv1) { 7077 if r.TryDecodeAsNil() { 7078 if yyv1[yyj1] != nil { 7079 *yyv1[yyj1] = FieldDiff{} 7080 } 7081 } else { 7082 if yyv1[yyj1] == nil { 7083 yyv1[yyj1] = new(FieldDiff) 7084 } 7085 yyw4 := yyv1[yyj1] 7086 yyw4.CodecDecodeSelf(d) 7087 } 7088 7089 } else { 7090 z.DecSwallow() 7091 } 7092 7093 } 7094 if yyj1 < len(yyv1) { 7095 yyv1 = yyv1[:yyj1] 7096 yyc1 = true 7097 } else if yyj1 == 0 && yyv1 == nil { 7098 yyv1 = []*FieldDiff{} 7099 yyc1 = true 7100 } 7101 } 7102 yyh1.End() 7103 if yyc1 { 7104 *v = yyv1 7105 } 7106 } 7107 7108 func (x codecSelfer100) encSlicePtrtoObjectDiff(v []*ObjectDiff, e *codec1978.Encoder) { 7109 var h codecSelfer100 7110 z, r := codec1978.GenHelperEncoder(e) 7111 _, _, _ = h, z, r 7112 r.EncodeArrayStart(len(v)) 7113 for _, yyv1 := range v { 7114 z.EncSendContainerState(codecSelfer_containerArrayElem100) 7115 if yyv1 == nil { 7116 r.EncodeNil() 7117 } else { 7118 yyv1.CodecEncodeSelf(e) 7119 } 7120 } 7121 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 7122 } 7123 7124 func (x codecSelfer100) decSlicePtrtoObjectDiff(v *[]*ObjectDiff, d *codec1978.Decoder) { 7125 var h codecSelfer100 7126 z, r := codec1978.GenHelperDecoder(d) 7127 _, _, _ = h, z, r 7128 7129 yyv1 := *v 7130 yyh1, yyl1 := z.DecSliceHelperStart() 7131 var yyc1 bool 7132 _ = yyc1 7133 if yyl1 == 0 { 7134 if yyv1 == nil { 7135 yyv1 = []*ObjectDiff{} 7136 yyc1 = true 7137 } else if len(yyv1) != 0 { 7138 yyv1 = yyv1[:0] 7139 yyc1 = true 7140 } 7141 } else if yyl1 > 0 { 7142 var yyrr1, yyrl1 int 7143 var yyrt1 bool 7144 _, _ = yyrl1, yyrt1 7145 yyrr1 = yyl1 // len(yyv1) 7146 if yyl1 > cap(yyv1) { 7147 7148 yyrg1 := len(yyv1) > 0 7149 yyv21 := yyv1 7150 yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) 7151 if yyrt1 { 7152 if yyrl1 <= cap(yyv1) { 7153 yyv1 = yyv1[:yyrl1] 7154 } else { 7155 yyv1 = make([]*ObjectDiff, yyrl1) 7156 } 7157 } else { 7158 yyv1 = make([]*ObjectDiff, yyrl1) 7159 } 7160 yyc1 = true 7161 yyrr1 = len(yyv1) 7162 if yyrg1 { 7163 copy(yyv1, yyv21) 7164 } 7165 } else if yyl1 != len(yyv1) { 7166 yyv1 = yyv1[:yyl1] 7167 yyc1 = true 7168 } 7169 yyj1 := 0 7170 for ; yyj1 < yyrr1; yyj1++ { 7171 yyh1.ElemContainerState(yyj1) 7172 if r.TryDecodeAsNil() { 7173 if yyv1[yyj1] != nil { 7174 *yyv1[yyj1] = ObjectDiff{} 7175 } 7176 } else { 7177 if yyv1[yyj1] == nil { 7178 yyv1[yyj1] = new(ObjectDiff) 7179 } 7180 yyw2 := yyv1[yyj1] 7181 yyw2.CodecDecodeSelf(d) 7182 } 7183 7184 } 7185 if yyrt1 { 7186 for ; yyj1 < yyl1; yyj1++ { 7187 yyv1 = append(yyv1, nil) 7188 yyh1.ElemContainerState(yyj1) 7189 if r.TryDecodeAsNil() { 7190 if yyv1[yyj1] != nil { 7191 *yyv1[yyj1] = ObjectDiff{} 7192 } 7193 } else { 7194 if yyv1[yyj1] == nil { 7195 yyv1[yyj1] = new(ObjectDiff) 7196 } 7197 yyw3 := yyv1[yyj1] 7198 yyw3.CodecDecodeSelf(d) 7199 } 7200 7201 } 7202 } 7203 7204 } else { 7205 yyj1 := 0 7206 for ; !r.CheckBreak(); yyj1++ { 7207 7208 if yyj1 >= len(yyv1) { 7209 yyv1 = append(yyv1, nil) // var yyz1 *ObjectDiff 7210 yyc1 = true 7211 } 7212 yyh1.ElemContainerState(yyj1) 7213 if yyj1 < len(yyv1) { 7214 if r.TryDecodeAsNil() { 7215 if yyv1[yyj1] != nil { 7216 *yyv1[yyj1] = ObjectDiff{} 7217 } 7218 } else { 7219 if yyv1[yyj1] == nil { 7220 yyv1[yyj1] = new(ObjectDiff) 7221 } 7222 yyw4 := yyv1[yyj1] 7223 yyw4.CodecDecodeSelf(d) 7224 } 7225 7226 } else { 7227 z.DecSwallow() 7228 } 7229 7230 } 7231 if yyj1 < len(yyv1) { 7232 yyv1 = yyv1[:yyj1] 7233 yyc1 = true 7234 } else if yyj1 == 0 && yyv1 == nil { 7235 yyv1 = []*ObjectDiff{} 7236 yyc1 = true 7237 } 7238 } 7239 yyh1.End() 7240 if yyc1 { 7241 *v = yyv1 7242 } 7243 } 7244 7245 func (x codecSelfer100) encSlicePtrtoTaskGroupDiff(v []*TaskGroupDiff, e *codec1978.Encoder) { 7246 var h codecSelfer100 7247 z, r := codec1978.GenHelperEncoder(e) 7248 _, _, _ = h, z, r 7249 r.EncodeArrayStart(len(v)) 7250 for _, yyv1 := range v { 7251 z.EncSendContainerState(codecSelfer_containerArrayElem100) 7252 if yyv1 == nil { 7253 r.EncodeNil() 7254 } else { 7255 yyv1.CodecEncodeSelf(e) 7256 } 7257 } 7258 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 7259 } 7260 7261 func (x codecSelfer100) decSlicePtrtoTaskGroupDiff(v *[]*TaskGroupDiff, d *codec1978.Decoder) { 7262 var h codecSelfer100 7263 z, r := codec1978.GenHelperDecoder(d) 7264 _, _, _ = h, z, r 7265 7266 yyv1 := *v 7267 yyh1, yyl1 := z.DecSliceHelperStart() 7268 var yyc1 bool 7269 _ = yyc1 7270 if yyl1 == 0 { 7271 if yyv1 == nil { 7272 yyv1 = []*TaskGroupDiff{} 7273 yyc1 = true 7274 } else if len(yyv1) != 0 { 7275 yyv1 = yyv1[:0] 7276 yyc1 = true 7277 } 7278 } else if yyl1 > 0 { 7279 var yyrr1, yyrl1 int 7280 var yyrt1 bool 7281 _, _ = yyrl1, yyrt1 7282 yyrr1 = yyl1 // len(yyv1) 7283 if yyl1 > cap(yyv1) { 7284 7285 yyrg1 := len(yyv1) > 0 7286 yyv21 := yyv1 7287 yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) 7288 if yyrt1 { 7289 if yyrl1 <= cap(yyv1) { 7290 yyv1 = yyv1[:yyrl1] 7291 } else { 7292 yyv1 = make([]*TaskGroupDiff, yyrl1) 7293 } 7294 } else { 7295 yyv1 = make([]*TaskGroupDiff, yyrl1) 7296 } 7297 yyc1 = true 7298 yyrr1 = len(yyv1) 7299 if yyrg1 { 7300 copy(yyv1, yyv21) 7301 } 7302 } else if yyl1 != len(yyv1) { 7303 yyv1 = yyv1[:yyl1] 7304 yyc1 = true 7305 } 7306 yyj1 := 0 7307 for ; yyj1 < yyrr1; yyj1++ { 7308 yyh1.ElemContainerState(yyj1) 7309 if r.TryDecodeAsNil() { 7310 if yyv1[yyj1] != nil { 7311 *yyv1[yyj1] = TaskGroupDiff{} 7312 } 7313 } else { 7314 if yyv1[yyj1] == nil { 7315 yyv1[yyj1] = new(TaskGroupDiff) 7316 } 7317 yyw2 := yyv1[yyj1] 7318 yyw2.CodecDecodeSelf(d) 7319 } 7320 7321 } 7322 if yyrt1 { 7323 for ; yyj1 < yyl1; yyj1++ { 7324 yyv1 = append(yyv1, nil) 7325 yyh1.ElemContainerState(yyj1) 7326 if r.TryDecodeAsNil() { 7327 if yyv1[yyj1] != nil { 7328 *yyv1[yyj1] = TaskGroupDiff{} 7329 } 7330 } else { 7331 if yyv1[yyj1] == nil { 7332 yyv1[yyj1] = new(TaskGroupDiff) 7333 } 7334 yyw3 := yyv1[yyj1] 7335 yyw3.CodecDecodeSelf(d) 7336 } 7337 7338 } 7339 } 7340 7341 } else { 7342 yyj1 := 0 7343 for ; !r.CheckBreak(); yyj1++ { 7344 7345 if yyj1 >= len(yyv1) { 7346 yyv1 = append(yyv1, nil) // var yyz1 *TaskGroupDiff 7347 yyc1 = true 7348 } 7349 yyh1.ElemContainerState(yyj1) 7350 if yyj1 < len(yyv1) { 7351 if r.TryDecodeAsNil() { 7352 if yyv1[yyj1] != nil { 7353 *yyv1[yyj1] = TaskGroupDiff{} 7354 } 7355 } else { 7356 if yyv1[yyj1] == nil { 7357 yyv1[yyj1] = new(TaskGroupDiff) 7358 } 7359 yyw4 := yyv1[yyj1] 7360 yyw4.CodecDecodeSelf(d) 7361 } 7362 7363 } else { 7364 z.DecSwallow() 7365 } 7366 7367 } 7368 if yyj1 < len(yyv1) { 7369 yyv1 = yyv1[:yyj1] 7370 yyc1 = true 7371 } else if yyj1 == 0 && yyv1 == nil { 7372 yyv1 = []*TaskGroupDiff{} 7373 yyc1 = true 7374 } 7375 } 7376 yyh1.End() 7377 if yyc1 { 7378 *v = yyv1 7379 } 7380 } 7381 7382 func (x codecSelfer100) encSlicePtrtoTaskDiff(v []*TaskDiff, e *codec1978.Encoder) { 7383 var h codecSelfer100 7384 z, r := codec1978.GenHelperEncoder(e) 7385 _, _, _ = h, z, r 7386 r.EncodeArrayStart(len(v)) 7387 for _, yyv1 := range v { 7388 z.EncSendContainerState(codecSelfer_containerArrayElem100) 7389 if yyv1 == nil { 7390 r.EncodeNil() 7391 } else { 7392 yyv1.CodecEncodeSelf(e) 7393 } 7394 } 7395 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 7396 } 7397 7398 func (x codecSelfer100) decSlicePtrtoTaskDiff(v *[]*TaskDiff, d *codec1978.Decoder) { 7399 var h codecSelfer100 7400 z, r := codec1978.GenHelperDecoder(d) 7401 _, _, _ = h, z, r 7402 7403 yyv1 := *v 7404 yyh1, yyl1 := z.DecSliceHelperStart() 7405 var yyc1 bool 7406 _ = yyc1 7407 if yyl1 == 0 { 7408 if yyv1 == nil { 7409 yyv1 = []*TaskDiff{} 7410 yyc1 = true 7411 } else if len(yyv1) != 0 { 7412 yyv1 = yyv1[:0] 7413 yyc1 = true 7414 } 7415 } else if yyl1 > 0 { 7416 var yyrr1, yyrl1 int 7417 var yyrt1 bool 7418 _, _ = yyrl1, yyrt1 7419 yyrr1 = yyl1 // len(yyv1) 7420 if yyl1 > cap(yyv1) { 7421 7422 yyrg1 := len(yyv1) > 0 7423 yyv21 := yyv1 7424 yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) 7425 if yyrt1 { 7426 if yyrl1 <= cap(yyv1) { 7427 yyv1 = yyv1[:yyrl1] 7428 } else { 7429 yyv1 = make([]*TaskDiff, yyrl1) 7430 } 7431 } else { 7432 yyv1 = make([]*TaskDiff, yyrl1) 7433 } 7434 yyc1 = true 7435 yyrr1 = len(yyv1) 7436 if yyrg1 { 7437 copy(yyv1, yyv21) 7438 } 7439 } else if yyl1 != len(yyv1) { 7440 yyv1 = yyv1[:yyl1] 7441 yyc1 = true 7442 } 7443 yyj1 := 0 7444 for ; yyj1 < yyrr1; yyj1++ { 7445 yyh1.ElemContainerState(yyj1) 7446 if r.TryDecodeAsNil() { 7447 if yyv1[yyj1] != nil { 7448 *yyv1[yyj1] = TaskDiff{} 7449 } 7450 } else { 7451 if yyv1[yyj1] == nil { 7452 yyv1[yyj1] = new(TaskDiff) 7453 } 7454 yyw2 := yyv1[yyj1] 7455 yyw2.CodecDecodeSelf(d) 7456 } 7457 7458 } 7459 if yyrt1 { 7460 for ; yyj1 < yyl1; yyj1++ { 7461 yyv1 = append(yyv1, nil) 7462 yyh1.ElemContainerState(yyj1) 7463 if r.TryDecodeAsNil() { 7464 if yyv1[yyj1] != nil { 7465 *yyv1[yyj1] = TaskDiff{} 7466 } 7467 } else { 7468 if yyv1[yyj1] == nil { 7469 yyv1[yyj1] = new(TaskDiff) 7470 } 7471 yyw3 := yyv1[yyj1] 7472 yyw3.CodecDecodeSelf(d) 7473 } 7474 7475 } 7476 } 7477 7478 } else { 7479 yyj1 := 0 7480 for ; !r.CheckBreak(); yyj1++ { 7481 7482 if yyj1 >= len(yyv1) { 7483 yyv1 = append(yyv1, nil) // var yyz1 *TaskDiff 7484 yyc1 = true 7485 } 7486 yyh1.ElemContainerState(yyj1) 7487 if yyj1 < len(yyv1) { 7488 if r.TryDecodeAsNil() { 7489 if yyv1[yyj1] != nil { 7490 *yyv1[yyj1] = TaskDiff{} 7491 } 7492 } else { 7493 if yyv1[yyj1] == nil { 7494 yyv1[yyj1] = new(TaskDiff) 7495 } 7496 yyw4 := yyv1[yyj1] 7497 yyw4.CodecDecodeSelf(d) 7498 } 7499 7500 } else { 7501 z.DecSwallow() 7502 } 7503 7504 } 7505 if yyj1 < len(yyv1) { 7506 yyv1 = yyv1[:yyj1] 7507 yyc1 = true 7508 } else if yyj1 == 0 && yyv1 == nil { 7509 yyv1 = []*TaskDiff{} 7510 yyc1 = true 7511 } 7512 } 7513 yyh1.End() 7514 if yyc1 { 7515 *v = yyv1 7516 } 7517 } 7518 7519 func (x codecSelfer100) encTaskGroupDiffs(v TaskGroupDiffs, e *codec1978.Encoder) { 7520 var h codecSelfer100 7521 z, r := codec1978.GenHelperEncoder(e) 7522 _, _, _ = h, z, r 7523 r.EncodeArrayStart(len(v)) 7524 for _, yyv1 := range v { 7525 z.EncSendContainerState(codecSelfer_containerArrayElem100) 7526 if yyv1 == nil { 7527 r.EncodeNil() 7528 } else { 7529 yyv1.CodecEncodeSelf(e) 7530 } 7531 } 7532 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 7533 } 7534 7535 func (x codecSelfer100) decTaskGroupDiffs(v *TaskGroupDiffs, d *codec1978.Decoder) { 7536 var h codecSelfer100 7537 z, r := codec1978.GenHelperDecoder(d) 7538 _, _, _ = h, z, r 7539 7540 yyv1 := *v 7541 yyh1, yyl1 := z.DecSliceHelperStart() 7542 var yyc1 bool 7543 _ = yyc1 7544 if yyl1 == 0 { 7545 if yyv1 == nil { 7546 yyv1 = []*TaskGroupDiff{} 7547 yyc1 = true 7548 } else if len(yyv1) != 0 { 7549 yyv1 = yyv1[:0] 7550 yyc1 = true 7551 } 7552 } else if yyl1 > 0 { 7553 var yyrr1, yyrl1 int 7554 var yyrt1 bool 7555 _, _ = yyrl1, yyrt1 7556 yyrr1 = yyl1 // len(yyv1) 7557 if yyl1 > cap(yyv1) { 7558 7559 yyrg1 := len(yyv1) > 0 7560 yyv21 := yyv1 7561 yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) 7562 if yyrt1 { 7563 if yyrl1 <= cap(yyv1) { 7564 yyv1 = yyv1[:yyrl1] 7565 } else { 7566 yyv1 = make([]*TaskGroupDiff, yyrl1) 7567 } 7568 } else { 7569 yyv1 = make([]*TaskGroupDiff, yyrl1) 7570 } 7571 yyc1 = true 7572 yyrr1 = len(yyv1) 7573 if yyrg1 { 7574 copy(yyv1, yyv21) 7575 } 7576 } else if yyl1 != len(yyv1) { 7577 yyv1 = yyv1[:yyl1] 7578 yyc1 = true 7579 } 7580 yyj1 := 0 7581 for ; yyj1 < yyrr1; yyj1++ { 7582 yyh1.ElemContainerState(yyj1) 7583 if r.TryDecodeAsNil() { 7584 if yyv1[yyj1] != nil { 7585 *yyv1[yyj1] = TaskGroupDiff{} 7586 } 7587 } else { 7588 if yyv1[yyj1] == nil { 7589 yyv1[yyj1] = new(TaskGroupDiff) 7590 } 7591 yyw2 := yyv1[yyj1] 7592 yyw2.CodecDecodeSelf(d) 7593 } 7594 7595 } 7596 if yyrt1 { 7597 for ; yyj1 < yyl1; yyj1++ { 7598 yyv1 = append(yyv1, nil) 7599 yyh1.ElemContainerState(yyj1) 7600 if r.TryDecodeAsNil() { 7601 if yyv1[yyj1] != nil { 7602 *yyv1[yyj1] = TaskGroupDiff{} 7603 } 7604 } else { 7605 if yyv1[yyj1] == nil { 7606 yyv1[yyj1] = new(TaskGroupDiff) 7607 } 7608 yyw3 := yyv1[yyj1] 7609 yyw3.CodecDecodeSelf(d) 7610 } 7611 7612 } 7613 } 7614 7615 } else { 7616 yyj1 := 0 7617 for ; !r.CheckBreak(); yyj1++ { 7618 7619 if yyj1 >= len(yyv1) { 7620 yyv1 = append(yyv1, nil) // var yyz1 *TaskGroupDiff 7621 yyc1 = true 7622 } 7623 yyh1.ElemContainerState(yyj1) 7624 if yyj1 < len(yyv1) { 7625 if r.TryDecodeAsNil() { 7626 if yyv1[yyj1] != nil { 7627 *yyv1[yyj1] = TaskGroupDiff{} 7628 } 7629 } else { 7630 if yyv1[yyj1] == nil { 7631 yyv1[yyj1] = new(TaskGroupDiff) 7632 } 7633 yyw4 := yyv1[yyj1] 7634 yyw4.CodecDecodeSelf(d) 7635 } 7636 7637 } else { 7638 z.DecSwallow() 7639 } 7640 7641 } 7642 if yyj1 < len(yyv1) { 7643 yyv1 = yyv1[:yyj1] 7644 yyc1 = true 7645 } else if yyj1 == 0 && yyv1 == nil { 7646 yyv1 = []*TaskGroupDiff{} 7647 yyc1 = true 7648 } 7649 } 7650 yyh1.End() 7651 if yyc1 { 7652 *v = yyv1 7653 } 7654 } 7655 7656 func (x codecSelfer100) encTaskDiffs(v TaskDiffs, e *codec1978.Encoder) { 7657 var h codecSelfer100 7658 z, r := codec1978.GenHelperEncoder(e) 7659 _, _, _ = h, z, r 7660 r.EncodeArrayStart(len(v)) 7661 for _, yyv1 := range v { 7662 z.EncSendContainerState(codecSelfer_containerArrayElem100) 7663 if yyv1 == nil { 7664 r.EncodeNil() 7665 } else { 7666 yyv1.CodecEncodeSelf(e) 7667 } 7668 } 7669 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 7670 } 7671 7672 func (x codecSelfer100) decTaskDiffs(v *TaskDiffs, d *codec1978.Decoder) { 7673 var h codecSelfer100 7674 z, r := codec1978.GenHelperDecoder(d) 7675 _, _, _ = h, z, r 7676 7677 yyv1 := *v 7678 yyh1, yyl1 := z.DecSliceHelperStart() 7679 var yyc1 bool 7680 _ = yyc1 7681 if yyl1 == 0 { 7682 if yyv1 == nil { 7683 yyv1 = []*TaskDiff{} 7684 yyc1 = true 7685 } else if len(yyv1) != 0 { 7686 yyv1 = yyv1[:0] 7687 yyc1 = true 7688 } 7689 } else if yyl1 > 0 { 7690 var yyrr1, yyrl1 int 7691 var yyrt1 bool 7692 _, _ = yyrl1, yyrt1 7693 yyrr1 = yyl1 // len(yyv1) 7694 if yyl1 > cap(yyv1) { 7695 7696 yyrg1 := len(yyv1) > 0 7697 yyv21 := yyv1 7698 yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) 7699 if yyrt1 { 7700 if yyrl1 <= cap(yyv1) { 7701 yyv1 = yyv1[:yyrl1] 7702 } else { 7703 yyv1 = make([]*TaskDiff, yyrl1) 7704 } 7705 } else { 7706 yyv1 = make([]*TaskDiff, yyrl1) 7707 } 7708 yyc1 = true 7709 yyrr1 = len(yyv1) 7710 if yyrg1 { 7711 copy(yyv1, yyv21) 7712 } 7713 } else if yyl1 != len(yyv1) { 7714 yyv1 = yyv1[:yyl1] 7715 yyc1 = true 7716 } 7717 yyj1 := 0 7718 for ; yyj1 < yyrr1; yyj1++ { 7719 yyh1.ElemContainerState(yyj1) 7720 if r.TryDecodeAsNil() { 7721 if yyv1[yyj1] != nil { 7722 *yyv1[yyj1] = TaskDiff{} 7723 } 7724 } else { 7725 if yyv1[yyj1] == nil { 7726 yyv1[yyj1] = new(TaskDiff) 7727 } 7728 yyw2 := yyv1[yyj1] 7729 yyw2.CodecDecodeSelf(d) 7730 } 7731 7732 } 7733 if yyrt1 { 7734 for ; yyj1 < yyl1; yyj1++ { 7735 yyv1 = append(yyv1, nil) 7736 yyh1.ElemContainerState(yyj1) 7737 if r.TryDecodeAsNil() { 7738 if yyv1[yyj1] != nil { 7739 *yyv1[yyj1] = TaskDiff{} 7740 } 7741 } else { 7742 if yyv1[yyj1] == nil { 7743 yyv1[yyj1] = new(TaskDiff) 7744 } 7745 yyw3 := yyv1[yyj1] 7746 yyw3.CodecDecodeSelf(d) 7747 } 7748 7749 } 7750 } 7751 7752 } else { 7753 yyj1 := 0 7754 for ; !r.CheckBreak(); yyj1++ { 7755 7756 if yyj1 >= len(yyv1) { 7757 yyv1 = append(yyv1, nil) // var yyz1 *TaskDiff 7758 yyc1 = true 7759 } 7760 yyh1.ElemContainerState(yyj1) 7761 if yyj1 < len(yyv1) { 7762 if r.TryDecodeAsNil() { 7763 if yyv1[yyj1] != nil { 7764 *yyv1[yyj1] = TaskDiff{} 7765 } 7766 } else { 7767 if yyv1[yyj1] == nil { 7768 yyv1[yyj1] = new(TaskDiff) 7769 } 7770 yyw4 := yyv1[yyj1] 7771 yyw4.CodecDecodeSelf(d) 7772 } 7773 7774 } else { 7775 z.DecSwallow() 7776 } 7777 7778 } 7779 if yyj1 < len(yyv1) { 7780 yyv1 = yyv1[:yyj1] 7781 yyc1 = true 7782 } else if yyj1 == 0 && yyv1 == nil { 7783 yyv1 = []*TaskDiff{} 7784 yyc1 = true 7785 } 7786 } 7787 yyh1.End() 7788 if yyc1 { 7789 *v = yyv1 7790 } 7791 } 7792 7793 func (x codecSelfer100) encObjectDiffs(v ObjectDiffs, e *codec1978.Encoder) { 7794 var h codecSelfer100 7795 z, r := codec1978.GenHelperEncoder(e) 7796 _, _, _ = h, z, r 7797 r.EncodeArrayStart(len(v)) 7798 for _, yyv1 := range v { 7799 z.EncSendContainerState(codecSelfer_containerArrayElem100) 7800 if yyv1 == nil { 7801 r.EncodeNil() 7802 } else { 7803 yyv1.CodecEncodeSelf(e) 7804 } 7805 } 7806 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 7807 } 7808 7809 func (x codecSelfer100) decObjectDiffs(v *ObjectDiffs, d *codec1978.Decoder) { 7810 var h codecSelfer100 7811 z, r := codec1978.GenHelperDecoder(d) 7812 _, _, _ = h, z, r 7813 7814 yyv1 := *v 7815 yyh1, yyl1 := z.DecSliceHelperStart() 7816 var yyc1 bool 7817 _ = yyc1 7818 if yyl1 == 0 { 7819 if yyv1 == nil { 7820 yyv1 = []*ObjectDiff{} 7821 yyc1 = true 7822 } else if len(yyv1) != 0 { 7823 yyv1 = yyv1[:0] 7824 yyc1 = true 7825 } 7826 } else if yyl1 > 0 { 7827 var yyrr1, yyrl1 int 7828 var yyrt1 bool 7829 _, _ = yyrl1, yyrt1 7830 yyrr1 = yyl1 // len(yyv1) 7831 if yyl1 > cap(yyv1) { 7832 7833 yyrg1 := len(yyv1) > 0 7834 yyv21 := yyv1 7835 yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) 7836 if yyrt1 { 7837 if yyrl1 <= cap(yyv1) { 7838 yyv1 = yyv1[:yyrl1] 7839 } else { 7840 yyv1 = make([]*ObjectDiff, yyrl1) 7841 } 7842 } else { 7843 yyv1 = make([]*ObjectDiff, yyrl1) 7844 } 7845 yyc1 = true 7846 yyrr1 = len(yyv1) 7847 if yyrg1 { 7848 copy(yyv1, yyv21) 7849 } 7850 } else if yyl1 != len(yyv1) { 7851 yyv1 = yyv1[:yyl1] 7852 yyc1 = true 7853 } 7854 yyj1 := 0 7855 for ; yyj1 < yyrr1; yyj1++ { 7856 yyh1.ElemContainerState(yyj1) 7857 if r.TryDecodeAsNil() { 7858 if yyv1[yyj1] != nil { 7859 *yyv1[yyj1] = ObjectDiff{} 7860 } 7861 } else { 7862 if yyv1[yyj1] == nil { 7863 yyv1[yyj1] = new(ObjectDiff) 7864 } 7865 yyw2 := yyv1[yyj1] 7866 yyw2.CodecDecodeSelf(d) 7867 } 7868 7869 } 7870 if yyrt1 { 7871 for ; yyj1 < yyl1; yyj1++ { 7872 yyv1 = append(yyv1, nil) 7873 yyh1.ElemContainerState(yyj1) 7874 if r.TryDecodeAsNil() { 7875 if yyv1[yyj1] != nil { 7876 *yyv1[yyj1] = ObjectDiff{} 7877 } 7878 } else { 7879 if yyv1[yyj1] == nil { 7880 yyv1[yyj1] = new(ObjectDiff) 7881 } 7882 yyw3 := yyv1[yyj1] 7883 yyw3.CodecDecodeSelf(d) 7884 } 7885 7886 } 7887 } 7888 7889 } else { 7890 yyj1 := 0 7891 for ; !r.CheckBreak(); yyj1++ { 7892 7893 if yyj1 >= len(yyv1) { 7894 yyv1 = append(yyv1, nil) // var yyz1 *ObjectDiff 7895 yyc1 = true 7896 } 7897 yyh1.ElemContainerState(yyj1) 7898 if yyj1 < len(yyv1) { 7899 if r.TryDecodeAsNil() { 7900 if yyv1[yyj1] != nil { 7901 *yyv1[yyj1] = ObjectDiff{} 7902 } 7903 } else { 7904 if yyv1[yyj1] == nil { 7905 yyv1[yyj1] = new(ObjectDiff) 7906 } 7907 yyw4 := yyv1[yyj1] 7908 yyw4.CodecDecodeSelf(d) 7909 } 7910 7911 } else { 7912 z.DecSwallow() 7913 } 7914 7915 } 7916 if yyj1 < len(yyv1) { 7917 yyv1 = yyv1[:yyj1] 7918 yyc1 = true 7919 } else if yyj1 == 0 && yyv1 == nil { 7920 yyv1 = []*ObjectDiff{} 7921 yyc1 = true 7922 } 7923 } 7924 yyh1.End() 7925 if yyc1 { 7926 *v = yyv1 7927 } 7928 } 7929 7930 func (x codecSelfer100) encFieldDiffs(v FieldDiffs, e *codec1978.Encoder) { 7931 var h codecSelfer100 7932 z, r := codec1978.GenHelperEncoder(e) 7933 _, _, _ = h, z, r 7934 r.EncodeArrayStart(len(v)) 7935 for _, yyv1 := range v { 7936 z.EncSendContainerState(codecSelfer_containerArrayElem100) 7937 if yyv1 == nil { 7938 r.EncodeNil() 7939 } else { 7940 yyv1.CodecEncodeSelf(e) 7941 } 7942 } 7943 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 7944 } 7945 7946 func (x codecSelfer100) decFieldDiffs(v *FieldDiffs, d *codec1978.Decoder) { 7947 var h codecSelfer100 7948 z, r := codec1978.GenHelperDecoder(d) 7949 _, _, _ = h, z, r 7950 7951 yyv1 := *v 7952 yyh1, yyl1 := z.DecSliceHelperStart() 7953 var yyc1 bool 7954 _ = yyc1 7955 if yyl1 == 0 { 7956 if yyv1 == nil { 7957 yyv1 = []*FieldDiff{} 7958 yyc1 = true 7959 } else if len(yyv1) != 0 { 7960 yyv1 = yyv1[:0] 7961 yyc1 = true 7962 } 7963 } else if yyl1 > 0 { 7964 var yyrr1, yyrl1 int 7965 var yyrt1 bool 7966 _, _ = yyrl1, yyrt1 7967 yyrr1 = yyl1 // len(yyv1) 7968 if yyl1 > cap(yyv1) { 7969 7970 yyrg1 := len(yyv1) > 0 7971 yyv21 := yyv1 7972 yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) 7973 if yyrt1 { 7974 if yyrl1 <= cap(yyv1) { 7975 yyv1 = yyv1[:yyrl1] 7976 } else { 7977 yyv1 = make([]*FieldDiff, yyrl1) 7978 } 7979 } else { 7980 yyv1 = make([]*FieldDiff, yyrl1) 7981 } 7982 yyc1 = true 7983 yyrr1 = len(yyv1) 7984 if yyrg1 { 7985 copy(yyv1, yyv21) 7986 } 7987 } else if yyl1 != len(yyv1) { 7988 yyv1 = yyv1[:yyl1] 7989 yyc1 = true 7990 } 7991 yyj1 := 0 7992 for ; yyj1 < yyrr1; yyj1++ { 7993 yyh1.ElemContainerState(yyj1) 7994 if r.TryDecodeAsNil() { 7995 if yyv1[yyj1] != nil { 7996 *yyv1[yyj1] = FieldDiff{} 7997 } 7998 } else { 7999 if yyv1[yyj1] == nil { 8000 yyv1[yyj1] = new(FieldDiff) 8001 } 8002 yyw2 := yyv1[yyj1] 8003 yyw2.CodecDecodeSelf(d) 8004 } 8005 8006 } 8007 if yyrt1 { 8008 for ; yyj1 < yyl1; yyj1++ { 8009 yyv1 = append(yyv1, nil) 8010 yyh1.ElemContainerState(yyj1) 8011 if r.TryDecodeAsNil() { 8012 if yyv1[yyj1] != nil { 8013 *yyv1[yyj1] = FieldDiff{} 8014 } 8015 } else { 8016 if yyv1[yyj1] == nil { 8017 yyv1[yyj1] = new(FieldDiff) 8018 } 8019 yyw3 := yyv1[yyj1] 8020 yyw3.CodecDecodeSelf(d) 8021 } 8022 8023 } 8024 } 8025 8026 } else { 8027 yyj1 := 0 8028 for ; !r.CheckBreak(); yyj1++ { 8029 8030 if yyj1 >= len(yyv1) { 8031 yyv1 = append(yyv1, nil) // var yyz1 *FieldDiff 8032 yyc1 = true 8033 } 8034 yyh1.ElemContainerState(yyj1) 8035 if yyj1 < len(yyv1) { 8036 if r.TryDecodeAsNil() { 8037 if yyv1[yyj1] != nil { 8038 *yyv1[yyj1] = FieldDiff{} 8039 } 8040 } else { 8041 if yyv1[yyj1] == nil { 8042 yyv1[yyj1] = new(FieldDiff) 8043 } 8044 yyw4 := yyv1[yyj1] 8045 yyw4.CodecDecodeSelf(d) 8046 } 8047 8048 } else { 8049 z.DecSwallow() 8050 } 8051 8052 } 8053 if yyj1 < len(yyv1) { 8054 yyv1 = yyv1[:yyj1] 8055 yyc1 = true 8056 } else if yyj1 == 0 && yyv1 == nil { 8057 yyv1 = []*FieldDiff{} 8058 yyc1 = true 8059 } 8060 } 8061 yyh1.End() 8062 if yyc1 { 8063 *v = yyv1 8064 } 8065 } 8066 8067 func (x codecSelfer100) encSlicePtrtoNetworkResource(v []*NetworkResource, e *codec1978.Encoder) { 8068 var h codecSelfer100 8069 z, r := codec1978.GenHelperEncoder(e) 8070 _, _, _ = h, z, r 8071 r.EncodeArrayStart(len(v)) 8072 for _, yyv1 := range v { 8073 z.EncSendContainerState(codecSelfer_containerArrayElem100) 8074 if yyv1 == nil { 8075 r.EncodeNil() 8076 } else { 8077 yym2 := z.EncBinary() 8078 _ = yym2 8079 if false { 8080 } else if z.HasExtensions() && z.EncExt(yyv1) { 8081 } else { 8082 z.EncFallback(yyv1) 8083 } 8084 } 8085 } 8086 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 8087 } 8088 8089 func (x codecSelfer100) decSlicePtrtoNetworkResource(v *[]*NetworkResource, d *codec1978.Decoder) { 8090 var h codecSelfer100 8091 z, r := codec1978.GenHelperDecoder(d) 8092 _, _, _ = h, z, r 8093 8094 yyv1 := *v 8095 yyh1, yyl1 := z.DecSliceHelperStart() 8096 var yyc1 bool 8097 _ = yyc1 8098 if yyl1 == 0 { 8099 if yyv1 == nil { 8100 yyv1 = []*NetworkResource{} 8101 yyc1 = true 8102 } else if len(yyv1) != 0 { 8103 yyv1 = yyv1[:0] 8104 yyc1 = true 8105 } 8106 } else if yyl1 > 0 { 8107 var yyrr1, yyrl1 int 8108 var yyrt1 bool 8109 _, _ = yyrl1, yyrt1 8110 yyrr1 = yyl1 // len(yyv1) 8111 if yyl1 > cap(yyv1) { 8112 8113 yyrg1 := len(yyv1) > 0 8114 yyv21 := yyv1 8115 yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) 8116 if yyrt1 { 8117 if yyrl1 <= cap(yyv1) { 8118 yyv1 = yyv1[:yyrl1] 8119 } else { 8120 yyv1 = make([]*NetworkResource, yyrl1) 8121 } 8122 } else { 8123 yyv1 = make([]*NetworkResource, yyrl1) 8124 } 8125 yyc1 = true 8126 yyrr1 = len(yyv1) 8127 if yyrg1 { 8128 copy(yyv1, yyv21) 8129 } 8130 } else if yyl1 != len(yyv1) { 8131 yyv1 = yyv1[:yyl1] 8132 yyc1 = true 8133 } 8134 yyj1 := 0 8135 for ; yyj1 < yyrr1; yyj1++ { 8136 yyh1.ElemContainerState(yyj1) 8137 if r.TryDecodeAsNil() { 8138 if yyv1[yyj1] != nil { 8139 *yyv1[yyj1] = NetworkResource{} 8140 } 8141 } else { 8142 if yyv1[yyj1] == nil { 8143 yyv1[yyj1] = new(NetworkResource) 8144 } 8145 yyw2 := yyv1[yyj1] 8146 yym3 := z.DecBinary() 8147 _ = yym3 8148 if false { 8149 } else if z.HasExtensions() && z.DecExt(yyw2) { 8150 } else { 8151 z.DecFallback(yyw2, false) 8152 } 8153 } 8154 8155 } 8156 if yyrt1 { 8157 for ; yyj1 < yyl1; yyj1++ { 8158 yyv1 = append(yyv1, nil) 8159 yyh1.ElemContainerState(yyj1) 8160 if r.TryDecodeAsNil() { 8161 if yyv1[yyj1] != nil { 8162 *yyv1[yyj1] = NetworkResource{} 8163 } 8164 } else { 8165 if yyv1[yyj1] == nil { 8166 yyv1[yyj1] = new(NetworkResource) 8167 } 8168 yyw4 := yyv1[yyj1] 8169 yym5 := z.DecBinary() 8170 _ = yym5 8171 if false { 8172 } else if z.HasExtensions() && z.DecExt(yyw4) { 8173 } else { 8174 z.DecFallback(yyw4, false) 8175 } 8176 } 8177 8178 } 8179 } 8180 8181 } else { 8182 yyj1 := 0 8183 for ; !r.CheckBreak(); yyj1++ { 8184 8185 if yyj1 >= len(yyv1) { 8186 yyv1 = append(yyv1, nil) // var yyz1 *NetworkResource 8187 yyc1 = true 8188 } 8189 yyh1.ElemContainerState(yyj1) 8190 if yyj1 < len(yyv1) { 8191 if r.TryDecodeAsNil() { 8192 if yyv1[yyj1] != nil { 8193 *yyv1[yyj1] = NetworkResource{} 8194 } 8195 } else { 8196 if yyv1[yyj1] == nil { 8197 yyv1[yyj1] = new(NetworkResource) 8198 } 8199 yyw6 := yyv1[yyj1] 8200 yym7 := z.DecBinary() 8201 _ = yym7 8202 if false { 8203 } else if z.HasExtensions() && z.DecExt(yyw6) { 8204 } else { 8205 z.DecFallback(yyw6, false) 8206 } 8207 } 8208 8209 } else { 8210 z.DecSwallow() 8211 } 8212 8213 } 8214 if yyj1 < len(yyv1) { 8215 yyv1 = yyv1[:yyj1] 8216 yyc1 = true 8217 } else if yyj1 == 0 && yyv1 == nil { 8218 yyv1 = []*NetworkResource{} 8219 yyc1 = true 8220 } 8221 } 8222 yyh1.End() 8223 if yyc1 { 8224 *v = yyv1 8225 } 8226 } 8227 8228 func (x codecSelfer100) encMapstringBitmap(v map[string]Bitmap, e *codec1978.Encoder) { 8229 var h codecSelfer100 8230 z, r := codec1978.GenHelperEncoder(e) 8231 _, _, _ = h, z, r 8232 r.EncodeMapStart(len(v)) 8233 for yyk1, yyv1 := range v { 8234 z.EncSendContainerState(codecSelfer_containerMapKey100) 8235 yym2 := z.EncBinary() 8236 _ = yym2 8237 if false { 8238 } else { 8239 r.EncodeString(codecSelferC_UTF8100, string(yyk1)) 8240 } 8241 z.EncSendContainerState(codecSelfer_containerMapValue100) 8242 if yyv1 == nil { 8243 r.EncodeNil() 8244 } else { 8245 yyv1.CodecEncodeSelf(e) 8246 } 8247 } 8248 z.EncSendContainerState(codecSelfer_containerMapEnd100) 8249 } 8250 8251 func (x codecSelfer100) decMapstringBitmap(v *map[string]Bitmap, d *codec1978.Decoder) { 8252 var h codecSelfer100 8253 z, r := codec1978.GenHelperDecoder(d) 8254 _, _, _ = h, z, r 8255 8256 yyv1 := *v 8257 yyl1 := r.ReadMapStart() 8258 yybh1 := z.DecBasicHandle() 8259 if yyv1 == nil { 8260 yyrl1, _ := z.DecInferLen(yyl1, yybh1.MaxInitLen, 40) 8261 yyv1 = make(map[string]Bitmap, yyrl1) 8262 *v = yyv1 8263 } 8264 var yymk1 string 8265 var yymv1 Bitmap 8266 var yymg1 bool 8267 if yybh1.MapValueReset { 8268 yymg1 = true 8269 } 8270 if yyl1 > 0 { 8271 for yyj1 := 0; yyj1 < yyl1; yyj1++ { 8272 z.DecSendContainerState(codecSelfer_containerMapKey100) 8273 if r.TryDecodeAsNil() { 8274 yymk1 = "" 8275 } else { 8276 yyv2 := &yymk1 8277 yym3 := z.DecBinary() 8278 _ = yym3 8279 if false { 8280 } else { 8281 *((*string)(yyv2)) = r.DecodeString() 8282 } 8283 } 8284 8285 if yymg1 { 8286 yymv1 = yyv1[yymk1] 8287 } else { 8288 yymv1 = nil 8289 } 8290 z.DecSendContainerState(codecSelfer_containerMapValue100) 8291 if r.TryDecodeAsNil() { 8292 yymv1 = nil 8293 } else { 8294 yyv4 := &yymv1 8295 yyv4.CodecDecodeSelf(d) 8296 } 8297 8298 if yyv1 != nil { 8299 yyv1[yymk1] = yymv1 8300 } 8301 } 8302 } else if yyl1 < 0 { 8303 for yyj1 := 0; !r.CheckBreak(); yyj1++ { 8304 z.DecSendContainerState(codecSelfer_containerMapKey100) 8305 if r.TryDecodeAsNil() { 8306 yymk1 = "" 8307 } else { 8308 yyv5 := &yymk1 8309 yym6 := z.DecBinary() 8310 _ = yym6 8311 if false { 8312 } else { 8313 *((*string)(yyv5)) = r.DecodeString() 8314 } 8315 } 8316 8317 if yymg1 { 8318 yymv1 = yyv1[yymk1] 8319 } else { 8320 yymv1 = nil 8321 } 8322 z.DecSendContainerState(codecSelfer_containerMapValue100) 8323 if r.TryDecodeAsNil() { 8324 yymv1 = nil 8325 } else { 8326 yyv7 := &yymv1 8327 yyv7.CodecDecodeSelf(d) 8328 } 8329 8330 if yyv1 != nil { 8331 yyv1[yymk1] = yymv1 8332 } 8333 } 8334 } // else len==0: TODO: Should we clear map entries? 8335 z.DecSendContainerState(codecSelfer_containerMapEnd100) 8336 } 8337 8338 func (x codecSelfer100) encSlicePtrtoRaftServer(v []*RaftServer, e *codec1978.Encoder) { 8339 var h codecSelfer100 8340 z, r := codec1978.GenHelperEncoder(e) 8341 _, _, _ = h, z, r 8342 r.EncodeArrayStart(len(v)) 8343 for _, yyv1 := range v { 8344 z.EncSendContainerState(codecSelfer_containerArrayElem100) 8345 if yyv1 == nil { 8346 r.EncodeNil() 8347 } else { 8348 yyv1.CodecEncodeSelf(e) 8349 } 8350 } 8351 z.EncSendContainerState(codecSelfer_containerArrayEnd100) 8352 } 8353 8354 func (x codecSelfer100) decSlicePtrtoRaftServer(v *[]*RaftServer, d *codec1978.Decoder) { 8355 var h codecSelfer100 8356 z, r := codec1978.GenHelperDecoder(d) 8357 _, _, _ = h, z, r 8358 8359 yyv1 := *v 8360 yyh1, yyl1 := z.DecSliceHelperStart() 8361 var yyc1 bool 8362 _ = yyc1 8363 if yyl1 == 0 { 8364 if yyv1 == nil { 8365 yyv1 = []*RaftServer{} 8366 yyc1 = true 8367 } else if len(yyv1) != 0 { 8368 yyv1 = yyv1[:0] 8369 yyc1 = true 8370 } 8371 } else if yyl1 > 0 { 8372 var yyrr1, yyrl1 int 8373 var yyrt1 bool 8374 _, _ = yyrl1, yyrt1 8375 yyrr1 = yyl1 // len(yyv1) 8376 if yyl1 > cap(yyv1) { 8377 8378 yyrg1 := len(yyv1) > 0 8379 yyv21 := yyv1 8380 yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) 8381 if yyrt1 { 8382 if yyrl1 <= cap(yyv1) { 8383 yyv1 = yyv1[:yyrl1] 8384 } else { 8385 yyv1 = make([]*RaftServer, yyrl1) 8386 } 8387 } else { 8388 yyv1 = make([]*RaftServer, yyrl1) 8389 } 8390 yyc1 = true 8391 yyrr1 = len(yyv1) 8392 if yyrg1 { 8393 copy(yyv1, yyv21) 8394 } 8395 } else if yyl1 != len(yyv1) { 8396 yyv1 = yyv1[:yyl1] 8397 yyc1 = true 8398 } 8399 yyj1 := 0 8400 for ; yyj1 < yyrr1; yyj1++ { 8401 yyh1.ElemContainerState(yyj1) 8402 if r.TryDecodeAsNil() { 8403 if yyv1[yyj1] != nil { 8404 *yyv1[yyj1] = RaftServer{} 8405 } 8406 } else { 8407 if yyv1[yyj1] == nil { 8408 yyv1[yyj1] = new(RaftServer) 8409 } 8410 yyw2 := yyv1[yyj1] 8411 yyw2.CodecDecodeSelf(d) 8412 } 8413 8414 } 8415 if yyrt1 { 8416 for ; yyj1 < yyl1; yyj1++ { 8417 yyv1 = append(yyv1, nil) 8418 yyh1.ElemContainerState(yyj1) 8419 if r.TryDecodeAsNil() { 8420 if yyv1[yyj1] != nil { 8421 *yyv1[yyj1] = RaftServer{} 8422 } 8423 } else { 8424 if yyv1[yyj1] == nil { 8425 yyv1[yyj1] = new(RaftServer) 8426 } 8427 yyw3 := yyv1[yyj1] 8428 yyw3.CodecDecodeSelf(d) 8429 } 8430 8431 } 8432 } 8433 8434 } else { 8435 yyj1 := 0 8436 for ; !r.CheckBreak(); yyj1++ { 8437 8438 if yyj1 >= len(yyv1) { 8439 yyv1 = append(yyv1, nil) // var yyz1 *RaftServer 8440 yyc1 = true 8441 } 8442 yyh1.ElemContainerState(yyj1) 8443 if yyj1 < len(yyv1) { 8444 if r.TryDecodeAsNil() { 8445 if yyv1[yyj1] != nil { 8446 *yyv1[yyj1] = RaftServer{} 8447 } 8448 } else { 8449 if yyv1[yyj1] == nil { 8450 yyv1[yyj1] = new(RaftServer) 8451 } 8452 yyw4 := yyv1[yyj1] 8453 yyw4.CodecDecodeSelf(d) 8454 } 8455 8456 } else { 8457 z.DecSwallow() 8458 } 8459 8460 } 8461 if yyj1 < len(yyv1) { 8462 yyv1 = yyv1[:yyj1] 8463 yyc1 = true 8464 } else if yyj1 == 0 && yyv1 == nil { 8465 yyv1 = []*RaftServer{} 8466 yyc1 = true 8467 } 8468 } 8469 yyh1.End() 8470 if yyc1 { 8471 *v = yyv1 8472 } 8473 }