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