blob: 237fdbe8ffd179636ca62ca803455405e4cf8a07 [file] [log] [blame]
khenaidooffe076b2019-01-15 16:08:08 -05001// ************************************************************
2// DO NOT EDIT.
3// THIS FILE IS AUTO-GENERATED BY codecgen.
4// ************************************************************
5
6package client
7
8import (
9 "errors"
10 "fmt"
11 "reflect"
12 "runtime"
13 time "time"
14
15 codec1978 "github.com/ugorji/go/codec"
16)
17
18const (
19 // ----- content types ----
20 codecSelferC_UTF87612 = 1
21 codecSelferC_RAW7612 = 0
22 // ----- value types used ----
23 codecSelferValueTypeArray7612 = 10
24 codecSelferValueTypeMap7612 = 9
25 // ----- containerStateValues ----
26 codecSelfer_containerMapKey7612 = 2
27 codecSelfer_containerMapValue7612 = 3
28 codecSelfer_containerMapEnd7612 = 4
29 codecSelfer_containerArrayElem7612 = 6
30 codecSelfer_containerArrayEnd7612 = 7
31)
32
33var (
34 codecSelferBitsize7612 = uint8(reflect.TypeOf(uint(0)).Bits())
35 codecSelferOnlyMapOrArrayEncodeToStructErr7612 = errors.New(`only encoded map or array can be decoded into a struct`)
36)
37
38type codecSelfer7612 struct{}
39
40func init() {
41 if codec1978.GenVersion != 8 {
42 _, file, _, _ := runtime.Caller(0)
43 err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
44 8, codec1978.GenVersion, file)
45 panic(err)
46 }
47 if false { // reference the types, but skip this branch at build/run time
48 var v0 time.Duration
49 _ = v0
50 }
51}
52
53func (x *Error) CodecEncodeSelf(e *codec1978.Encoder) {
54 var h codecSelfer7612
55 z, r := codec1978.GenHelperEncoder(e)
56 _, _, _ = h, z, r
57 if x == nil {
58 r.EncodeNil()
59 } else {
60 yym1 := z.EncBinary()
61 _ = yym1
62 if false {
63 } else if z.HasExtensions() && z.EncExt(x) {
64 } else {
65 yysep2 := !z.EncBinary()
66 yy2arr2 := z.EncBasicHandle().StructToArray
67 _, _ = yysep2, yy2arr2
68 const yyr2 bool = false
69 if yyr2 || yy2arr2 {
70 r.WriteArrayStart(4)
71 } else {
72 r.WriteMapStart(4)
73 }
74 if yyr2 || yy2arr2 {
75 r.WriteArrayElem()
76 yym4 := z.EncBinary()
77 _ = yym4
78 if false {
79 } else {
80 r.EncodeInt(int64(x.Code))
81 }
82 } else {
83 r.WriteMapElemKey()
84 r.EncodeString(codecSelferC_UTF87612, string("errorCode"))
85 r.WriteMapElemValue()
86 yym5 := z.EncBinary()
87 _ = yym5
88 if false {
89 } else {
90 r.EncodeInt(int64(x.Code))
91 }
92 }
93 if yyr2 || yy2arr2 {
94 r.WriteArrayElem()
95 yym7 := z.EncBinary()
96 _ = yym7
97 if false {
98 } else {
99 r.EncodeString(codecSelferC_UTF87612, string(x.Message))
100 }
101 } else {
102 r.WriteMapElemKey()
103 r.EncodeString(codecSelferC_UTF87612, string("message"))
104 r.WriteMapElemValue()
105 yym8 := z.EncBinary()
106 _ = yym8
107 if false {
108 } else {
109 r.EncodeString(codecSelferC_UTF87612, string(x.Message))
110 }
111 }
112 if yyr2 || yy2arr2 {
113 r.WriteArrayElem()
114 yym10 := z.EncBinary()
115 _ = yym10
116 if false {
117 } else {
118 r.EncodeString(codecSelferC_UTF87612, string(x.Cause))
119 }
120 } else {
121 r.WriteMapElemKey()
122 r.EncodeString(codecSelferC_UTF87612, string("cause"))
123 r.WriteMapElemValue()
124 yym11 := z.EncBinary()
125 _ = yym11
126 if false {
127 } else {
128 r.EncodeString(codecSelferC_UTF87612, string(x.Cause))
129 }
130 }
131 if yyr2 || yy2arr2 {
132 r.WriteArrayElem()
133 yym13 := z.EncBinary()
134 _ = yym13
135 if false {
136 } else {
137 r.EncodeUint(uint64(x.Index))
138 }
139 } else {
140 r.WriteMapElemKey()
141 r.EncodeString(codecSelferC_UTF87612, string("index"))
142 r.WriteMapElemValue()
143 yym14 := z.EncBinary()
144 _ = yym14
145 if false {
146 } else {
147 r.EncodeUint(uint64(x.Index))
148 }
149 }
150 if yyr2 || yy2arr2 {
151 r.WriteArrayEnd()
152 } else {
153 r.WriteMapEnd()
154 }
155 }
156 }
157}
158
159func (x *Error) CodecDecodeSelf(d *codec1978.Decoder) {
160 var h codecSelfer7612
161 z, r := codec1978.GenHelperDecoder(d)
162 _, _, _ = h, z, r
163 yym1 := z.DecBinary()
164 _ = yym1
165 if false {
166 } else if z.HasExtensions() && z.DecExt(x) {
167 } else {
168 yyct2 := r.ContainerType()
169 if yyct2 == codecSelferValueTypeMap7612 {
170 yyl2 := r.ReadMapStart()
171 if yyl2 == 0 {
172 r.ReadMapEnd()
173 } else {
174 x.codecDecodeSelfFromMap(yyl2, d)
175 }
176 } else if yyct2 == codecSelferValueTypeArray7612 {
177 yyl2 := r.ReadArrayStart()
178 if yyl2 == 0 {
179 r.ReadArrayEnd()
180 } else {
181 x.codecDecodeSelfFromArray(yyl2, d)
182 }
183 } else {
184 panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
185 }
186 }
187}
188
189func (x *Error) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
190 var h codecSelfer7612
191 z, r := codec1978.GenHelperDecoder(d)
192 _, _, _ = h, z, r
193 var yys3Slc = z.DecScratchBuffer() // default slice to decode into
194 _ = yys3Slc
195 var yyhl3 bool = l >= 0
196 for yyj3 := 0; ; yyj3++ {
197 if yyhl3 {
198 if yyj3 >= l {
199 break
200 }
201 } else {
202 if r.CheckBreak() {
203 break
204 }
205 }
206 r.ReadMapElemKey()
207 yys3Slc = r.DecodeStringAsBytes()
208 yys3 := string(yys3Slc)
209 r.ReadMapElemValue()
210 switch yys3 {
211 case "errorCode":
212 if r.TryDecodeAsNil() {
213 x.Code = 0
214 } else {
215 yyv4 := &x.Code
216 yym5 := z.DecBinary()
217 _ = yym5
218 if false {
219 } else {
220 *((*int)(yyv4)) = int(r.DecodeInt(codecSelferBitsize7612))
221 }
222 }
223 case "message":
224 if r.TryDecodeAsNil() {
225 x.Message = ""
226 } else {
227 yyv6 := &x.Message
228 yym7 := z.DecBinary()
229 _ = yym7
230 if false {
231 } else {
232 *((*string)(yyv6)) = r.DecodeString()
233 }
234 }
235 case "cause":
236 if r.TryDecodeAsNil() {
237 x.Cause = ""
238 } else {
239 yyv8 := &x.Cause
240 yym9 := z.DecBinary()
241 _ = yym9
242 if false {
243 } else {
244 *((*string)(yyv8)) = r.DecodeString()
245 }
246 }
247 case "index":
248 if r.TryDecodeAsNil() {
249 x.Index = 0
250 } else {
251 yyv10 := &x.Index
252 yym11 := z.DecBinary()
253 _ = yym11
254 if false {
255 } else {
256 *((*uint64)(yyv10)) = uint64(r.DecodeUint(64))
257 }
258 }
259 default:
260 z.DecStructFieldNotFound(-1, yys3)
261 } // end switch yys3
262 } // end for yyj3
263 r.ReadMapEnd()
264}
265
266func (x *Error) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
267 var h codecSelfer7612
268 z, r := codec1978.GenHelperDecoder(d)
269 _, _, _ = h, z, r
270 var yyj12 int
271 var yyb12 bool
272 var yyhl12 bool = l >= 0
273 yyj12++
274 if yyhl12 {
275 yyb12 = yyj12 > l
276 } else {
277 yyb12 = r.CheckBreak()
278 }
279 if yyb12 {
280 r.ReadArrayEnd()
281 return
282 }
283 r.ReadArrayElem()
284 if r.TryDecodeAsNil() {
285 x.Code = 0
286 } else {
287 yyv13 := &x.Code
288 yym14 := z.DecBinary()
289 _ = yym14
290 if false {
291 } else {
292 *((*int)(yyv13)) = int(r.DecodeInt(codecSelferBitsize7612))
293 }
294 }
295 yyj12++
296 if yyhl12 {
297 yyb12 = yyj12 > l
298 } else {
299 yyb12 = r.CheckBreak()
300 }
301 if yyb12 {
302 r.ReadArrayEnd()
303 return
304 }
305 r.ReadArrayElem()
306 if r.TryDecodeAsNil() {
307 x.Message = ""
308 } else {
309 yyv15 := &x.Message
310 yym16 := z.DecBinary()
311 _ = yym16
312 if false {
313 } else {
314 *((*string)(yyv15)) = r.DecodeString()
315 }
316 }
317 yyj12++
318 if yyhl12 {
319 yyb12 = yyj12 > l
320 } else {
321 yyb12 = r.CheckBreak()
322 }
323 if yyb12 {
324 r.ReadArrayEnd()
325 return
326 }
327 r.ReadArrayElem()
328 if r.TryDecodeAsNil() {
329 x.Cause = ""
330 } else {
331 yyv17 := &x.Cause
332 yym18 := z.DecBinary()
333 _ = yym18
334 if false {
335 } else {
336 *((*string)(yyv17)) = r.DecodeString()
337 }
338 }
339 yyj12++
340 if yyhl12 {
341 yyb12 = yyj12 > l
342 } else {
343 yyb12 = r.CheckBreak()
344 }
345 if yyb12 {
346 r.ReadArrayEnd()
347 return
348 }
349 r.ReadArrayElem()
350 if r.TryDecodeAsNil() {
351 x.Index = 0
352 } else {
353 yyv19 := &x.Index
354 yym20 := z.DecBinary()
355 _ = yym20
356 if false {
357 } else {
358 *((*uint64)(yyv19)) = uint64(r.DecodeUint(64))
359 }
360 }
361 for {
362 yyj12++
363 if yyhl12 {
364 yyb12 = yyj12 > l
365 } else {
366 yyb12 = r.CheckBreak()
367 }
368 if yyb12 {
369 break
370 }
371 r.ReadArrayElem()
372 z.DecStructFieldNotFound(yyj12-1, "")
373 }
374 r.ReadArrayEnd()
375}
376
377func (x PrevExistType) CodecEncodeSelf(e *codec1978.Encoder) {
378 var h codecSelfer7612
379 z, r := codec1978.GenHelperEncoder(e)
380 _, _, _ = h, z, r
381 yym1 := z.EncBinary()
382 _ = yym1
383 if false {
384 } else if z.HasExtensions() && z.EncExt(x) {
385 } else {
386 r.EncodeString(codecSelferC_UTF87612, string(x))
387 }
388}
389
390func (x *PrevExistType) CodecDecodeSelf(d *codec1978.Decoder) {
391 var h codecSelfer7612
392 z, r := codec1978.GenHelperDecoder(d)
393 _, _, _ = h, z, r
394 yym1 := z.DecBinary()
395 _ = yym1
396 if false {
397 } else if z.HasExtensions() && z.DecExt(x) {
398 } else {
399 *((*string)(x)) = r.DecodeString()
400 }
401}
402
403func (x *WatcherOptions) CodecEncodeSelf(e *codec1978.Encoder) {
404 var h codecSelfer7612
405 z, r := codec1978.GenHelperEncoder(e)
406 _, _, _ = h, z, r
407 if x == nil {
408 r.EncodeNil()
409 } else {
410 yym1 := z.EncBinary()
411 _ = yym1
412 if false {
413 } else if z.HasExtensions() && z.EncExt(x) {
414 } else {
415 yysep2 := !z.EncBinary()
416 yy2arr2 := z.EncBasicHandle().StructToArray
417 _, _ = yysep2, yy2arr2
418 const yyr2 bool = false
419 if yyr2 || yy2arr2 {
420 r.WriteArrayStart(2)
421 } else {
422 r.WriteMapStart(2)
423 }
424 if yyr2 || yy2arr2 {
425 r.WriteArrayElem()
426 yym4 := z.EncBinary()
427 _ = yym4
428 if false {
429 } else {
430 r.EncodeUint(uint64(x.AfterIndex))
431 }
432 } else {
433 r.WriteMapElemKey()
434 r.EncodeString(codecSelferC_UTF87612, string("AfterIndex"))
435 r.WriteMapElemValue()
436 yym5 := z.EncBinary()
437 _ = yym5
438 if false {
439 } else {
440 r.EncodeUint(uint64(x.AfterIndex))
441 }
442 }
443 if yyr2 || yy2arr2 {
444 r.WriteArrayElem()
445 yym7 := z.EncBinary()
446 _ = yym7
447 if false {
448 } else {
449 r.EncodeBool(bool(x.Recursive))
450 }
451 } else {
452 r.WriteMapElemKey()
453 r.EncodeString(codecSelferC_UTF87612, string("Recursive"))
454 r.WriteMapElemValue()
455 yym8 := z.EncBinary()
456 _ = yym8
457 if false {
458 } else {
459 r.EncodeBool(bool(x.Recursive))
460 }
461 }
462 if yyr2 || yy2arr2 {
463 r.WriteArrayEnd()
464 } else {
465 r.WriteMapEnd()
466 }
467 }
468 }
469}
470
471func (x *WatcherOptions) CodecDecodeSelf(d *codec1978.Decoder) {
472 var h codecSelfer7612
473 z, r := codec1978.GenHelperDecoder(d)
474 _, _, _ = h, z, r
475 yym1 := z.DecBinary()
476 _ = yym1
477 if false {
478 } else if z.HasExtensions() && z.DecExt(x) {
479 } else {
480 yyct2 := r.ContainerType()
481 if yyct2 == codecSelferValueTypeMap7612 {
482 yyl2 := r.ReadMapStart()
483 if yyl2 == 0 {
484 r.ReadMapEnd()
485 } else {
486 x.codecDecodeSelfFromMap(yyl2, d)
487 }
488 } else if yyct2 == codecSelferValueTypeArray7612 {
489 yyl2 := r.ReadArrayStart()
490 if yyl2 == 0 {
491 r.ReadArrayEnd()
492 } else {
493 x.codecDecodeSelfFromArray(yyl2, d)
494 }
495 } else {
496 panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
497 }
498 }
499}
500
501func (x *WatcherOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
502 var h codecSelfer7612
503 z, r := codec1978.GenHelperDecoder(d)
504 _, _, _ = h, z, r
505 var yys3Slc = z.DecScratchBuffer() // default slice to decode into
506 _ = yys3Slc
507 var yyhl3 bool = l >= 0
508 for yyj3 := 0; ; yyj3++ {
509 if yyhl3 {
510 if yyj3 >= l {
511 break
512 }
513 } else {
514 if r.CheckBreak() {
515 break
516 }
517 }
518 r.ReadMapElemKey()
519 yys3Slc = r.DecodeStringAsBytes()
520 yys3 := string(yys3Slc)
521 r.ReadMapElemValue()
522 switch yys3 {
523 case "AfterIndex":
524 if r.TryDecodeAsNil() {
525 x.AfterIndex = 0
526 } else {
527 yyv4 := &x.AfterIndex
528 yym5 := z.DecBinary()
529 _ = yym5
530 if false {
531 } else {
532 *((*uint64)(yyv4)) = uint64(r.DecodeUint(64))
533 }
534 }
535 case "Recursive":
536 if r.TryDecodeAsNil() {
537 x.Recursive = false
538 } else {
539 yyv6 := &x.Recursive
540 yym7 := z.DecBinary()
541 _ = yym7
542 if false {
543 } else {
544 *((*bool)(yyv6)) = r.DecodeBool()
545 }
546 }
547 default:
548 z.DecStructFieldNotFound(-1, yys3)
549 } // end switch yys3
550 } // end for yyj3
551 r.ReadMapEnd()
552}
553
554func (x *WatcherOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
555 var h codecSelfer7612
556 z, r := codec1978.GenHelperDecoder(d)
557 _, _, _ = h, z, r
558 var yyj8 int
559 var yyb8 bool
560 var yyhl8 bool = l >= 0
561 yyj8++
562 if yyhl8 {
563 yyb8 = yyj8 > l
564 } else {
565 yyb8 = r.CheckBreak()
566 }
567 if yyb8 {
568 r.ReadArrayEnd()
569 return
570 }
571 r.ReadArrayElem()
572 if r.TryDecodeAsNil() {
573 x.AfterIndex = 0
574 } else {
575 yyv9 := &x.AfterIndex
576 yym10 := z.DecBinary()
577 _ = yym10
578 if false {
579 } else {
580 *((*uint64)(yyv9)) = uint64(r.DecodeUint(64))
581 }
582 }
583 yyj8++
584 if yyhl8 {
585 yyb8 = yyj8 > l
586 } else {
587 yyb8 = r.CheckBreak()
588 }
589 if yyb8 {
590 r.ReadArrayEnd()
591 return
592 }
593 r.ReadArrayElem()
594 if r.TryDecodeAsNil() {
595 x.Recursive = false
596 } else {
597 yyv11 := &x.Recursive
598 yym12 := z.DecBinary()
599 _ = yym12
600 if false {
601 } else {
602 *((*bool)(yyv11)) = r.DecodeBool()
603 }
604 }
605 for {
606 yyj8++
607 if yyhl8 {
608 yyb8 = yyj8 > l
609 } else {
610 yyb8 = r.CheckBreak()
611 }
612 if yyb8 {
613 break
614 }
615 r.ReadArrayElem()
616 z.DecStructFieldNotFound(yyj8-1, "")
617 }
618 r.ReadArrayEnd()
619}
620
621func (x *CreateInOrderOptions) CodecEncodeSelf(e *codec1978.Encoder) {
622 var h codecSelfer7612
623 z, r := codec1978.GenHelperEncoder(e)
624 _, _, _ = h, z, r
625 if x == nil {
626 r.EncodeNil()
627 } else {
628 yym1 := z.EncBinary()
629 _ = yym1
630 if false {
631 } else if z.HasExtensions() && z.EncExt(x) {
632 } else {
633 yysep2 := !z.EncBinary()
634 yy2arr2 := z.EncBasicHandle().StructToArray
635 _, _ = yysep2, yy2arr2
636 const yyr2 bool = false
637 if yyr2 || yy2arr2 {
638 r.WriteArrayStart(1)
639 } else {
640 r.WriteMapStart(1)
641 }
642 if yyr2 || yy2arr2 {
643 r.WriteArrayElem()
644 yym4 := z.EncBinary()
645 _ = yym4
646 if false {
647 } else if z.HasExtensions() && z.EncExt(x.TTL) {
648 } else {
649 r.EncodeInt(int64(x.TTL))
650 }
651 } else {
652 r.WriteMapElemKey()
653 r.EncodeString(codecSelferC_UTF87612, string("TTL"))
654 r.WriteMapElemValue()
655 yym5 := z.EncBinary()
656 _ = yym5
657 if false {
658 } else if z.HasExtensions() && z.EncExt(x.TTL) {
659 } else {
660 r.EncodeInt(int64(x.TTL))
661 }
662 }
663 if yyr2 || yy2arr2 {
664 r.WriteArrayEnd()
665 } else {
666 r.WriteMapEnd()
667 }
668 }
669 }
670}
671
672func (x *CreateInOrderOptions) CodecDecodeSelf(d *codec1978.Decoder) {
673 var h codecSelfer7612
674 z, r := codec1978.GenHelperDecoder(d)
675 _, _, _ = h, z, r
676 yym1 := z.DecBinary()
677 _ = yym1
678 if false {
679 } else if z.HasExtensions() && z.DecExt(x) {
680 } else {
681 yyct2 := r.ContainerType()
682 if yyct2 == codecSelferValueTypeMap7612 {
683 yyl2 := r.ReadMapStart()
684 if yyl2 == 0 {
685 r.ReadMapEnd()
686 } else {
687 x.codecDecodeSelfFromMap(yyl2, d)
688 }
689 } else if yyct2 == codecSelferValueTypeArray7612 {
690 yyl2 := r.ReadArrayStart()
691 if yyl2 == 0 {
692 r.ReadArrayEnd()
693 } else {
694 x.codecDecodeSelfFromArray(yyl2, d)
695 }
696 } else {
697 panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
698 }
699 }
700}
701
702func (x *CreateInOrderOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
703 var h codecSelfer7612
704 z, r := codec1978.GenHelperDecoder(d)
705 _, _, _ = h, z, r
706 var yys3Slc = z.DecScratchBuffer() // default slice to decode into
707 _ = yys3Slc
708 var yyhl3 bool = l >= 0
709 for yyj3 := 0; ; yyj3++ {
710 if yyhl3 {
711 if yyj3 >= l {
712 break
713 }
714 } else {
715 if r.CheckBreak() {
716 break
717 }
718 }
719 r.ReadMapElemKey()
720 yys3Slc = r.DecodeStringAsBytes()
721 yys3 := string(yys3Slc)
722 r.ReadMapElemValue()
723 switch yys3 {
724 case "TTL":
725 if r.TryDecodeAsNil() {
726 x.TTL = 0
727 } else {
728 yyv4 := &x.TTL
729 yym5 := z.DecBinary()
730 _ = yym5
731 if false {
732 } else if z.HasExtensions() && z.DecExt(yyv4) {
733 } else {
734 *((*int64)(yyv4)) = int64(r.DecodeInt(64))
735 }
736 }
737 default:
738 z.DecStructFieldNotFound(-1, yys3)
739 } // end switch yys3
740 } // end for yyj3
741 r.ReadMapEnd()
742}
743
744func (x *CreateInOrderOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
745 var h codecSelfer7612
746 z, r := codec1978.GenHelperDecoder(d)
747 _, _, _ = h, z, r
748 var yyj6 int
749 var yyb6 bool
750 var yyhl6 bool = l >= 0
751 yyj6++
752 if yyhl6 {
753 yyb6 = yyj6 > l
754 } else {
755 yyb6 = r.CheckBreak()
756 }
757 if yyb6 {
758 r.ReadArrayEnd()
759 return
760 }
761 r.ReadArrayElem()
762 if r.TryDecodeAsNil() {
763 x.TTL = 0
764 } else {
765 yyv7 := &x.TTL
766 yym8 := z.DecBinary()
767 _ = yym8
768 if false {
769 } else if z.HasExtensions() && z.DecExt(yyv7) {
770 } else {
771 *((*int64)(yyv7)) = int64(r.DecodeInt(64))
772 }
773 }
774 for {
775 yyj6++
776 if yyhl6 {
777 yyb6 = yyj6 > l
778 } else {
779 yyb6 = r.CheckBreak()
780 }
781 if yyb6 {
782 break
783 }
784 r.ReadArrayElem()
785 z.DecStructFieldNotFound(yyj6-1, "")
786 }
787 r.ReadArrayEnd()
788}
789
790func (x *SetOptions) CodecEncodeSelf(e *codec1978.Encoder) {
791 var h codecSelfer7612
792 z, r := codec1978.GenHelperEncoder(e)
793 _, _, _ = h, z, r
794 if x == nil {
795 r.EncodeNil()
796 } else {
797 yym1 := z.EncBinary()
798 _ = yym1
799 if false {
800 } else if z.HasExtensions() && z.EncExt(x) {
801 } else {
802 yysep2 := !z.EncBinary()
803 yy2arr2 := z.EncBasicHandle().StructToArray
804 _, _ = yysep2, yy2arr2
805 const yyr2 bool = false
806 if yyr2 || yy2arr2 {
807 r.WriteArrayStart(7)
808 } else {
809 r.WriteMapStart(7)
810 }
811 if yyr2 || yy2arr2 {
812 r.WriteArrayElem()
813 yym4 := z.EncBinary()
814 _ = yym4
815 if false {
816 } else {
817 r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue))
818 }
819 } else {
820 r.WriteMapElemKey()
821 r.EncodeString(codecSelferC_UTF87612, string("PrevValue"))
822 r.WriteMapElemValue()
823 yym5 := z.EncBinary()
824 _ = yym5
825 if false {
826 } else {
827 r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue))
828 }
829 }
830 if yyr2 || yy2arr2 {
831 r.WriteArrayElem()
832 yym7 := z.EncBinary()
833 _ = yym7
834 if false {
835 } else {
836 r.EncodeUint(uint64(x.PrevIndex))
837 }
838 } else {
839 r.WriteMapElemKey()
840 r.EncodeString(codecSelferC_UTF87612, string("PrevIndex"))
841 r.WriteMapElemValue()
842 yym8 := z.EncBinary()
843 _ = yym8
844 if false {
845 } else {
846 r.EncodeUint(uint64(x.PrevIndex))
847 }
848 }
849 if yyr2 || yy2arr2 {
850 r.WriteArrayElem()
851 x.PrevExist.CodecEncodeSelf(e)
852 } else {
853 r.WriteMapElemKey()
854 r.EncodeString(codecSelferC_UTF87612, string("PrevExist"))
855 r.WriteMapElemValue()
856 x.PrevExist.CodecEncodeSelf(e)
857 }
858 if yyr2 || yy2arr2 {
859 r.WriteArrayElem()
860 yym13 := z.EncBinary()
861 _ = yym13
862 if false {
863 } else if z.HasExtensions() && z.EncExt(x.TTL) {
864 } else {
865 r.EncodeInt(int64(x.TTL))
866 }
867 } else {
868 r.WriteMapElemKey()
869 r.EncodeString(codecSelferC_UTF87612, string("TTL"))
870 r.WriteMapElemValue()
871 yym14 := z.EncBinary()
872 _ = yym14
873 if false {
874 } else if z.HasExtensions() && z.EncExt(x.TTL) {
875 } else {
876 r.EncodeInt(int64(x.TTL))
877 }
878 }
879 if yyr2 || yy2arr2 {
880 r.WriteArrayElem()
881 yym16 := z.EncBinary()
882 _ = yym16
883 if false {
884 } else {
885 r.EncodeBool(bool(x.Refresh))
886 }
887 } else {
888 r.WriteMapElemKey()
889 r.EncodeString(codecSelferC_UTF87612, string("Refresh"))
890 r.WriteMapElemValue()
891 yym17 := z.EncBinary()
892 _ = yym17
893 if false {
894 } else {
895 r.EncodeBool(bool(x.Refresh))
896 }
897 }
898 if yyr2 || yy2arr2 {
899 r.WriteArrayElem()
900 yym19 := z.EncBinary()
901 _ = yym19
902 if false {
903 } else {
904 r.EncodeBool(bool(x.Dir))
905 }
906 } else {
907 r.WriteMapElemKey()
908 r.EncodeString(codecSelferC_UTF87612, string("Dir"))
909 r.WriteMapElemValue()
910 yym20 := z.EncBinary()
911 _ = yym20
912 if false {
913 } else {
914 r.EncodeBool(bool(x.Dir))
915 }
916 }
917 if yyr2 || yy2arr2 {
918 r.WriteArrayElem()
919 yym22 := z.EncBinary()
920 _ = yym22
921 if false {
922 } else {
923 r.EncodeBool(bool(x.NoValueOnSuccess))
924 }
925 } else {
926 r.WriteMapElemKey()
927 r.EncodeString(codecSelferC_UTF87612, string("NoValueOnSuccess"))
928 r.WriteMapElemValue()
929 yym23 := z.EncBinary()
930 _ = yym23
931 if false {
932 } else {
933 r.EncodeBool(bool(x.NoValueOnSuccess))
934 }
935 }
936 if yyr2 || yy2arr2 {
937 r.WriteArrayEnd()
938 } else {
939 r.WriteMapEnd()
940 }
941 }
942 }
943}
944
945func (x *SetOptions) CodecDecodeSelf(d *codec1978.Decoder) {
946 var h codecSelfer7612
947 z, r := codec1978.GenHelperDecoder(d)
948 _, _, _ = h, z, r
949 yym1 := z.DecBinary()
950 _ = yym1
951 if false {
952 } else if z.HasExtensions() && z.DecExt(x) {
953 } else {
954 yyct2 := r.ContainerType()
955 if yyct2 == codecSelferValueTypeMap7612 {
956 yyl2 := r.ReadMapStart()
957 if yyl2 == 0 {
958 r.ReadMapEnd()
959 } else {
960 x.codecDecodeSelfFromMap(yyl2, d)
961 }
962 } else if yyct2 == codecSelferValueTypeArray7612 {
963 yyl2 := r.ReadArrayStart()
964 if yyl2 == 0 {
965 r.ReadArrayEnd()
966 } else {
967 x.codecDecodeSelfFromArray(yyl2, d)
968 }
969 } else {
970 panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
971 }
972 }
973}
974
975func (x *SetOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
976 var h codecSelfer7612
977 z, r := codec1978.GenHelperDecoder(d)
978 _, _, _ = h, z, r
979 var yys3Slc = z.DecScratchBuffer() // default slice to decode into
980 _ = yys3Slc
981 var yyhl3 bool = l >= 0
982 for yyj3 := 0; ; yyj3++ {
983 if yyhl3 {
984 if yyj3 >= l {
985 break
986 }
987 } else {
988 if r.CheckBreak() {
989 break
990 }
991 }
992 r.ReadMapElemKey()
993 yys3Slc = r.DecodeStringAsBytes()
994 yys3 := string(yys3Slc)
995 r.ReadMapElemValue()
996 switch yys3 {
997 case "PrevValue":
998 if r.TryDecodeAsNil() {
999 x.PrevValue = ""
1000 } else {
1001 yyv4 := &x.PrevValue
1002 yym5 := z.DecBinary()
1003 _ = yym5
1004 if false {
1005 } else {
1006 *((*string)(yyv4)) = r.DecodeString()
1007 }
1008 }
1009 case "PrevIndex":
1010 if r.TryDecodeAsNil() {
1011 x.PrevIndex = 0
1012 } else {
1013 yyv6 := &x.PrevIndex
1014 yym7 := z.DecBinary()
1015 _ = yym7
1016 if false {
1017 } else {
1018 *((*uint64)(yyv6)) = uint64(r.DecodeUint(64))
1019 }
1020 }
1021 case "PrevExist":
1022 if r.TryDecodeAsNil() {
1023 x.PrevExist = ""
1024 } else {
1025 yyv8 := &x.PrevExist
1026 yyv8.CodecDecodeSelf(d)
1027 }
1028 case "TTL":
1029 if r.TryDecodeAsNil() {
1030 x.TTL = 0
1031 } else {
1032 yyv9 := &x.TTL
1033 yym10 := z.DecBinary()
1034 _ = yym10
1035 if false {
1036 } else if z.HasExtensions() && z.DecExt(yyv9) {
1037 } else {
1038 *((*int64)(yyv9)) = int64(r.DecodeInt(64))
1039 }
1040 }
1041 case "Refresh":
1042 if r.TryDecodeAsNil() {
1043 x.Refresh = false
1044 } else {
1045 yyv11 := &x.Refresh
1046 yym12 := z.DecBinary()
1047 _ = yym12
1048 if false {
1049 } else {
1050 *((*bool)(yyv11)) = r.DecodeBool()
1051 }
1052 }
1053 case "Dir":
1054 if r.TryDecodeAsNil() {
1055 x.Dir = false
1056 } else {
1057 yyv13 := &x.Dir
1058 yym14 := z.DecBinary()
1059 _ = yym14
1060 if false {
1061 } else {
1062 *((*bool)(yyv13)) = r.DecodeBool()
1063 }
1064 }
1065 case "NoValueOnSuccess":
1066 if r.TryDecodeAsNil() {
1067 x.NoValueOnSuccess = false
1068 } else {
1069 yyv15 := &x.NoValueOnSuccess
1070 yym16 := z.DecBinary()
1071 _ = yym16
1072 if false {
1073 } else {
1074 *((*bool)(yyv15)) = r.DecodeBool()
1075 }
1076 }
1077 default:
1078 z.DecStructFieldNotFound(-1, yys3)
1079 } // end switch yys3
1080 } // end for yyj3
1081 r.ReadMapEnd()
1082}
1083
1084func (x *SetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
1085 var h codecSelfer7612
1086 z, r := codec1978.GenHelperDecoder(d)
1087 _, _, _ = h, z, r
1088 var yyj17 int
1089 var yyb17 bool
1090 var yyhl17 bool = l >= 0
1091 yyj17++
1092 if yyhl17 {
1093 yyb17 = yyj17 > l
1094 } else {
1095 yyb17 = r.CheckBreak()
1096 }
1097 if yyb17 {
1098 r.ReadArrayEnd()
1099 return
1100 }
1101 r.ReadArrayElem()
1102 if r.TryDecodeAsNil() {
1103 x.PrevValue = ""
1104 } else {
1105 yyv18 := &x.PrevValue
1106 yym19 := z.DecBinary()
1107 _ = yym19
1108 if false {
1109 } else {
1110 *((*string)(yyv18)) = r.DecodeString()
1111 }
1112 }
1113 yyj17++
1114 if yyhl17 {
1115 yyb17 = yyj17 > l
1116 } else {
1117 yyb17 = r.CheckBreak()
1118 }
1119 if yyb17 {
1120 r.ReadArrayEnd()
1121 return
1122 }
1123 r.ReadArrayElem()
1124 if r.TryDecodeAsNil() {
1125 x.PrevIndex = 0
1126 } else {
1127 yyv20 := &x.PrevIndex
1128 yym21 := z.DecBinary()
1129 _ = yym21
1130 if false {
1131 } else {
1132 *((*uint64)(yyv20)) = uint64(r.DecodeUint(64))
1133 }
1134 }
1135 yyj17++
1136 if yyhl17 {
1137 yyb17 = yyj17 > l
1138 } else {
1139 yyb17 = r.CheckBreak()
1140 }
1141 if yyb17 {
1142 r.ReadArrayEnd()
1143 return
1144 }
1145 r.ReadArrayElem()
1146 if r.TryDecodeAsNil() {
1147 x.PrevExist = ""
1148 } else {
1149 yyv22 := &x.PrevExist
1150 yyv22.CodecDecodeSelf(d)
1151 }
1152 yyj17++
1153 if yyhl17 {
1154 yyb17 = yyj17 > l
1155 } else {
1156 yyb17 = r.CheckBreak()
1157 }
1158 if yyb17 {
1159 r.ReadArrayEnd()
1160 return
1161 }
1162 r.ReadArrayElem()
1163 if r.TryDecodeAsNil() {
1164 x.TTL = 0
1165 } else {
1166 yyv23 := &x.TTL
1167 yym24 := z.DecBinary()
1168 _ = yym24
1169 if false {
1170 } else if z.HasExtensions() && z.DecExt(yyv23) {
1171 } else {
1172 *((*int64)(yyv23)) = int64(r.DecodeInt(64))
1173 }
1174 }
1175 yyj17++
1176 if yyhl17 {
1177 yyb17 = yyj17 > l
1178 } else {
1179 yyb17 = r.CheckBreak()
1180 }
1181 if yyb17 {
1182 r.ReadArrayEnd()
1183 return
1184 }
1185 r.ReadArrayElem()
1186 if r.TryDecodeAsNil() {
1187 x.Refresh = false
1188 } else {
1189 yyv25 := &x.Refresh
1190 yym26 := z.DecBinary()
1191 _ = yym26
1192 if false {
1193 } else {
1194 *((*bool)(yyv25)) = r.DecodeBool()
1195 }
1196 }
1197 yyj17++
1198 if yyhl17 {
1199 yyb17 = yyj17 > l
1200 } else {
1201 yyb17 = r.CheckBreak()
1202 }
1203 if yyb17 {
1204 r.ReadArrayEnd()
1205 return
1206 }
1207 r.ReadArrayElem()
1208 if r.TryDecodeAsNil() {
1209 x.Dir = false
1210 } else {
1211 yyv27 := &x.Dir
1212 yym28 := z.DecBinary()
1213 _ = yym28
1214 if false {
1215 } else {
1216 *((*bool)(yyv27)) = r.DecodeBool()
1217 }
1218 }
1219 yyj17++
1220 if yyhl17 {
1221 yyb17 = yyj17 > l
1222 } else {
1223 yyb17 = r.CheckBreak()
1224 }
1225 if yyb17 {
1226 r.ReadArrayEnd()
1227 return
1228 }
1229 r.ReadArrayElem()
1230 if r.TryDecodeAsNil() {
1231 x.NoValueOnSuccess = false
1232 } else {
1233 yyv29 := &x.NoValueOnSuccess
1234 yym30 := z.DecBinary()
1235 _ = yym30
1236 if false {
1237 } else {
1238 *((*bool)(yyv29)) = r.DecodeBool()
1239 }
1240 }
1241 for {
1242 yyj17++
1243 if yyhl17 {
1244 yyb17 = yyj17 > l
1245 } else {
1246 yyb17 = r.CheckBreak()
1247 }
1248 if yyb17 {
1249 break
1250 }
1251 r.ReadArrayElem()
1252 z.DecStructFieldNotFound(yyj17-1, "")
1253 }
1254 r.ReadArrayEnd()
1255}
1256
1257func (x *GetOptions) CodecEncodeSelf(e *codec1978.Encoder) {
1258 var h codecSelfer7612
1259 z, r := codec1978.GenHelperEncoder(e)
1260 _, _, _ = h, z, r
1261 if x == nil {
1262 r.EncodeNil()
1263 } else {
1264 yym1 := z.EncBinary()
1265 _ = yym1
1266 if false {
1267 } else if z.HasExtensions() && z.EncExt(x) {
1268 } else {
1269 yysep2 := !z.EncBinary()
1270 yy2arr2 := z.EncBasicHandle().StructToArray
1271 _, _ = yysep2, yy2arr2
1272 const yyr2 bool = false
1273 if yyr2 || yy2arr2 {
1274 r.WriteArrayStart(3)
1275 } else {
1276 r.WriteMapStart(3)
1277 }
1278 if yyr2 || yy2arr2 {
1279 r.WriteArrayElem()
1280 yym4 := z.EncBinary()
1281 _ = yym4
1282 if false {
1283 } else {
1284 r.EncodeBool(bool(x.Recursive))
1285 }
1286 } else {
1287 r.WriteMapElemKey()
1288 r.EncodeString(codecSelferC_UTF87612, string("Recursive"))
1289 r.WriteMapElemValue()
1290 yym5 := z.EncBinary()
1291 _ = yym5
1292 if false {
1293 } else {
1294 r.EncodeBool(bool(x.Recursive))
1295 }
1296 }
1297 if yyr2 || yy2arr2 {
1298 r.WriteArrayElem()
1299 yym7 := z.EncBinary()
1300 _ = yym7
1301 if false {
1302 } else {
1303 r.EncodeBool(bool(x.Sort))
1304 }
1305 } else {
1306 r.WriteMapElemKey()
1307 r.EncodeString(codecSelferC_UTF87612, string("Sort"))
1308 r.WriteMapElemValue()
1309 yym8 := z.EncBinary()
1310 _ = yym8
1311 if false {
1312 } else {
1313 r.EncodeBool(bool(x.Sort))
1314 }
1315 }
1316 if yyr2 || yy2arr2 {
1317 r.WriteArrayElem()
1318 yym10 := z.EncBinary()
1319 _ = yym10
1320 if false {
1321 } else {
1322 r.EncodeBool(bool(x.Quorum))
1323 }
1324 } else {
1325 r.WriteMapElemKey()
1326 r.EncodeString(codecSelferC_UTF87612, string("Quorum"))
1327 r.WriteMapElemValue()
1328 yym11 := z.EncBinary()
1329 _ = yym11
1330 if false {
1331 } else {
1332 r.EncodeBool(bool(x.Quorum))
1333 }
1334 }
1335 if yyr2 || yy2arr2 {
1336 r.WriteArrayEnd()
1337 } else {
1338 r.WriteMapEnd()
1339 }
1340 }
1341 }
1342}
1343
1344func (x *GetOptions) CodecDecodeSelf(d *codec1978.Decoder) {
1345 var h codecSelfer7612
1346 z, r := codec1978.GenHelperDecoder(d)
1347 _, _, _ = h, z, r
1348 yym1 := z.DecBinary()
1349 _ = yym1
1350 if false {
1351 } else if z.HasExtensions() && z.DecExt(x) {
1352 } else {
1353 yyct2 := r.ContainerType()
1354 if yyct2 == codecSelferValueTypeMap7612 {
1355 yyl2 := r.ReadMapStart()
1356 if yyl2 == 0 {
1357 r.ReadMapEnd()
1358 } else {
1359 x.codecDecodeSelfFromMap(yyl2, d)
1360 }
1361 } else if yyct2 == codecSelferValueTypeArray7612 {
1362 yyl2 := r.ReadArrayStart()
1363 if yyl2 == 0 {
1364 r.ReadArrayEnd()
1365 } else {
1366 x.codecDecodeSelfFromArray(yyl2, d)
1367 }
1368 } else {
1369 panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
1370 }
1371 }
1372}
1373
1374func (x *GetOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
1375 var h codecSelfer7612
1376 z, r := codec1978.GenHelperDecoder(d)
1377 _, _, _ = h, z, r
1378 var yys3Slc = z.DecScratchBuffer() // default slice to decode into
1379 _ = yys3Slc
1380 var yyhl3 bool = l >= 0
1381 for yyj3 := 0; ; yyj3++ {
1382 if yyhl3 {
1383 if yyj3 >= l {
1384 break
1385 }
1386 } else {
1387 if r.CheckBreak() {
1388 break
1389 }
1390 }
1391 r.ReadMapElemKey()
1392 yys3Slc = r.DecodeStringAsBytes()
1393 yys3 := string(yys3Slc)
1394 r.ReadMapElemValue()
1395 switch yys3 {
1396 case "Recursive":
1397 if r.TryDecodeAsNil() {
1398 x.Recursive = false
1399 } else {
1400 yyv4 := &x.Recursive
1401 yym5 := z.DecBinary()
1402 _ = yym5
1403 if false {
1404 } else {
1405 *((*bool)(yyv4)) = r.DecodeBool()
1406 }
1407 }
1408 case "Sort":
1409 if r.TryDecodeAsNil() {
1410 x.Sort = false
1411 } else {
1412 yyv6 := &x.Sort
1413 yym7 := z.DecBinary()
1414 _ = yym7
1415 if false {
1416 } else {
1417 *((*bool)(yyv6)) = r.DecodeBool()
1418 }
1419 }
1420 case "Quorum":
1421 if r.TryDecodeAsNil() {
1422 x.Quorum = false
1423 } else {
1424 yyv8 := &x.Quorum
1425 yym9 := z.DecBinary()
1426 _ = yym9
1427 if false {
1428 } else {
1429 *((*bool)(yyv8)) = r.DecodeBool()
1430 }
1431 }
1432 default:
1433 z.DecStructFieldNotFound(-1, yys3)
1434 } // end switch yys3
1435 } // end for yyj3
1436 r.ReadMapEnd()
1437}
1438
1439func (x *GetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
1440 var h codecSelfer7612
1441 z, r := codec1978.GenHelperDecoder(d)
1442 _, _, _ = h, z, r
1443 var yyj10 int
1444 var yyb10 bool
1445 var yyhl10 bool = l >= 0
1446 yyj10++
1447 if yyhl10 {
1448 yyb10 = yyj10 > l
1449 } else {
1450 yyb10 = r.CheckBreak()
1451 }
1452 if yyb10 {
1453 r.ReadArrayEnd()
1454 return
1455 }
1456 r.ReadArrayElem()
1457 if r.TryDecodeAsNil() {
1458 x.Recursive = false
1459 } else {
1460 yyv11 := &x.Recursive
1461 yym12 := z.DecBinary()
1462 _ = yym12
1463 if false {
1464 } else {
1465 *((*bool)(yyv11)) = r.DecodeBool()
1466 }
1467 }
1468 yyj10++
1469 if yyhl10 {
1470 yyb10 = yyj10 > l
1471 } else {
1472 yyb10 = r.CheckBreak()
1473 }
1474 if yyb10 {
1475 r.ReadArrayEnd()
1476 return
1477 }
1478 r.ReadArrayElem()
1479 if r.TryDecodeAsNil() {
1480 x.Sort = false
1481 } else {
1482 yyv13 := &x.Sort
1483 yym14 := z.DecBinary()
1484 _ = yym14
1485 if false {
1486 } else {
1487 *((*bool)(yyv13)) = r.DecodeBool()
1488 }
1489 }
1490 yyj10++
1491 if yyhl10 {
1492 yyb10 = yyj10 > l
1493 } else {
1494 yyb10 = r.CheckBreak()
1495 }
1496 if yyb10 {
1497 r.ReadArrayEnd()
1498 return
1499 }
1500 r.ReadArrayElem()
1501 if r.TryDecodeAsNil() {
1502 x.Quorum = false
1503 } else {
1504 yyv15 := &x.Quorum
1505 yym16 := z.DecBinary()
1506 _ = yym16
1507 if false {
1508 } else {
1509 *((*bool)(yyv15)) = r.DecodeBool()
1510 }
1511 }
1512 for {
1513 yyj10++
1514 if yyhl10 {
1515 yyb10 = yyj10 > l
1516 } else {
1517 yyb10 = r.CheckBreak()
1518 }
1519 if yyb10 {
1520 break
1521 }
1522 r.ReadArrayElem()
1523 z.DecStructFieldNotFound(yyj10-1, "")
1524 }
1525 r.ReadArrayEnd()
1526}
1527
1528func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) {
1529 var h codecSelfer7612
1530 z, r := codec1978.GenHelperEncoder(e)
1531 _, _, _ = h, z, r
1532 if x == nil {
1533 r.EncodeNil()
1534 } else {
1535 yym1 := z.EncBinary()
1536 _ = yym1
1537 if false {
1538 } else if z.HasExtensions() && z.EncExt(x) {
1539 } else {
1540 yysep2 := !z.EncBinary()
1541 yy2arr2 := z.EncBasicHandle().StructToArray
1542 _, _ = yysep2, yy2arr2
1543 const yyr2 bool = false
1544 if yyr2 || yy2arr2 {
1545 r.WriteArrayStart(4)
1546 } else {
1547 r.WriteMapStart(4)
1548 }
1549 if yyr2 || yy2arr2 {
1550 r.WriteArrayElem()
1551 yym4 := z.EncBinary()
1552 _ = yym4
1553 if false {
1554 } else {
1555 r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue))
1556 }
1557 } else {
1558 r.WriteMapElemKey()
1559 r.EncodeString(codecSelferC_UTF87612, string("PrevValue"))
1560 r.WriteMapElemValue()
1561 yym5 := z.EncBinary()
1562 _ = yym5
1563 if false {
1564 } else {
1565 r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue))
1566 }
1567 }
1568 if yyr2 || yy2arr2 {
1569 r.WriteArrayElem()
1570 yym7 := z.EncBinary()
1571 _ = yym7
1572 if false {
1573 } else {
1574 r.EncodeUint(uint64(x.PrevIndex))
1575 }
1576 } else {
1577 r.WriteMapElemKey()
1578 r.EncodeString(codecSelferC_UTF87612, string("PrevIndex"))
1579 r.WriteMapElemValue()
1580 yym8 := z.EncBinary()
1581 _ = yym8
1582 if false {
1583 } else {
1584 r.EncodeUint(uint64(x.PrevIndex))
1585 }
1586 }
1587 if yyr2 || yy2arr2 {
1588 r.WriteArrayElem()
1589 yym10 := z.EncBinary()
1590 _ = yym10
1591 if false {
1592 } else {
1593 r.EncodeBool(bool(x.Recursive))
1594 }
1595 } else {
1596 r.WriteMapElemKey()
1597 r.EncodeString(codecSelferC_UTF87612, string("Recursive"))
1598 r.WriteMapElemValue()
1599 yym11 := z.EncBinary()
1600 _ = yym11
1601 if false {
1602 } else {
1603 r.EncodeBool(bool(x.Recursive))
1604 }
1605 }
1606 if yyr2 || yy2arr2 {
1607 r.WriteArrayElem()
1608 yym13 := z.EncBinary()
1609 _ = yym13
1610 if false {
1611 } else {
1612 r.EncodeBool(bool(x.Dir))
1613 }
1614 } else {
1615 r.WriteMapElemKey()
1616 r.EncodeString(codecSelferC_UTF87612, string("Dir"))
1617 r.WriteMapElemValue()
1618 yym14 := z.EncBinary()
1619 _ = yym14
1620 if false {
1621 } else {
1622 r.EncodeBool(bool(x.Dir))
1623 }
1624 }
1625 if yyr2 || yy2arr2 {
1626 r.WriteArrayEnd()
1627 } else {
1628 r.WriteMapEnd()
1629 }
1630 }
1631 }
1632}
1633
1634func (x *DeleteOptions) CodecDecodeSelf(d *codec1978.Decoder) {
1635 var h codecSelfer7612
1636 z, r := codec1978.GenHelperDecoder(d)
1637 _, _, _ = h, z, r
1638 yym1 := z.DecBinary()
1639 _ = yym1
1640 if false {
1641 } else if z.HasExtensions() && z.DecExt(x) {
1642 } else {
1643 yyct2 := r.ContainerType()
1644 if yyct2 == codecSelferValueTypeMap7612 {
1645 yyl2 := r.ReadMapStart()
1646 if yyl2 == 0 {
1647 r.ReadMapEnd()
1648 } else {
1649 x.codecDecodeSelfFromMap(yyl2, d)
1650 }
1651 } else if yyct2 == codecSelferValueTypeArray7612 {
1652 yyl2 := r.ReadArrayStart()
1653 if yyl2 == 0 {
1654 r.ReadArrayEnd()
1655 } else {
1656 x.codecDecodeSelfFromArray(yyl2, d)
1657 }
1658 } else {
1659 panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
1660 }
1661 }
1662}
1663
1664func (x *DeleteOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
1665 var h codecSelfer7612
1666 z, r := codec1978.GenHelperDecoder(d)
1667 _, _, _ = h, z, r
1668 var yys3Slc = z.DecScratchBuffer() // default slice to decode into
1669 _ = yys3Slc
1670 var yyhl3 bool = l >= 0
1671 for yyj3 := 0; ; yyj3++ {
1672 if yyhl3 {
1673 if yyj3 >= l {
1674 break
1675 }
1676 } else {
1677 if r.CheckBreak() {
1678 break
1679 }
1680 }
1681 r.ReadMapElemKey()
1682 yys3Slc = r.DecodeStringAsBytes()
1683 yys3 := string(yys3Slc)
1684 r.ReadMapElemValue()
1685 switch yys3 {
1686 case "PrevValue":
1687 if r.TryDecodeAsNil() {
1688 x.PrevValue = ""
1689 } else {
1690 yyv4 := &x.PrevValue
1691 yym5 := z.DecBinary()
1692 _ = yym5
1693 if false {
1694 } else {
1695 *((*string)(yyv4)) = r.DecodeString()
1696 }
1697 }
1698 case "PrevIndex":
1699 if r.TryDecodeAsNil() {
1700 x.PrevIndex = 0
1701 } else {
1702 yyv6 := &x.PrevIndex
1703 yym7 := z.DecBinary()
1704 _ = yym7
1705 if false {
1706 } else {
1707 *((*uint64)(yyv6)) = uint64(r.DecodeUint(64))
1708 }
1709 }
1710 case "Recursive":
1711 if r.TryDecodeAsNil() {
1712 x.Recursive = false
1713 } else {
1714 yyv8 := &x.Recursive
1715 yym9 := z.DecBinary()
1716 _ = yym9
1717 if false {
1718 } else {
1719 *((*bool)(yyv8)) = r.DecodeBool()
1720 }
1721 }
1722 case "Dir":
1723 if r.TryDecodeAsNil() {
1724 x.Dir = false
1725 } else {
1726 yyv10 := &x.Dir
1727 yym11 := z.DecBinary()
1728 _ = yym11
1729 if false {
1730 } else {
1731 *((*bool)(yyv10)) = r.DecodeBool()
1732 }
1733 }
1734 default:
1735 z.DecStructFieldNotFound(-1, yys3)
1736 } // end switch yys3
1737 } // end for yyj3
1738 r.ReadMapEnd()
1739}
1740
1741func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
1742 var h codecSelfer7612
1743 z, r := codec1978.GenHelperDecoder(d)
1744 _, _, _ = h, z, r
1745 var yyj12 int
1746 var yyb12 bool
1747 var yyhl12 bool = l >= 0
1748 yyj12++
1749 if yyhl12 {
1750 yyb12 = yyj12 > l
1751 } else {
1752 yyb12 = r.CheckBreak()
1753 }
1754 if yyb12 {
1755 r.ReadArrayEnd()
1756 return
1757 }
1758 r.ReadArrayElem()
1759 if r.TryDecodeAsNil() {
1760 x.PrevValue = ""
1761 } else {
1762 yyv13 := &x.PrevValue
1763 yym14 := z.DecBinary()
1764 _ = yym14
1765 if false {
1766 } else {
1767 *((*string)(yyv13)) = r.DecodeString()
1768 }
1769 }
1770 yyj12++
1771 if yyhl12 {
1772 yyb12 = yyj12 > l
1773 } else {
1774 yyb12 = r.CheckBreak()
1775 }
1776 if yyb12 {
1777 r.ReadArrayEnd()
1778 return
1779 }
1780 r.ReadArrayElem()
1781 if r.TryDecodeAsNil() {
1782 x.PrevIndex = 0
1783 } else {
1784 yyv15 := &x.PrevIndex
1785 yym16 := z.DecBinary()
1786 _ = yym16
1787 if false {
1788 } else {
1789 *((*uint64)(yyv15)) = uint64(r.DecodeUint(64))
1790 }
1791 }
1792 yyj12++
1793 if yyhl12 {
1794 yyb12 = yyj12 > l
1795 } else {
1796 yyb12 = r.CheckBreak()
1797 }
1798 if yyb12 {
1799 r.ReadArrayEnd()
1800 return
1801 }
1802 r.ReadArrayElem()
1803 if r.TryDecodeAsNil() {
1804 x.Recursive = false
1805 } else {
1806 yyv17 := &x.Recursive
1807 yym18 := z.DecBinary()
1808 _ = yym18
1809 if false {
1810 } else {
1811 *((*bool)(yyv17)) = r.DecodeBool()
1812 }
1813 }
1814 yyj12++
1815 if yyhl12 {
1816 yyb12 = yyj12 > l
1817 } else {
1818 yyb12 = r.CheckBreak()
1819 }
1820 if yyb12 {
1821 r.ReadArrayEnd()
1822 return
1823 }
1824 r.ReadArrayElem()
1825 if r.TryDecodeAsNil() {
1826 x.Dir = false
1827 } else {
1828 yyv19 := &x.Dir
1829 yym20 := z.DecBinary()
1830 _ = yym20
1831 if false {
1832 } else {
1833 *((*bool)(yyv19)) = r.DecodeBool()
1834 }
1835 }
1836 for {
1837 yyj12++
1838 if yyhl12 {
1839 yyb12 = yyj12 > l
1840 } else {
1841 yyb12 = r.CheckBreak()
1842 }
1843 if yyb12 {
1844 break
1845 }
1846 r.ReadArrayElem()
1847 z.DecStructFieldNotFound(yyj12-1, "")
1848 }
1849 r.ReadArrayEnd()
1850}
1851
1852func (x *Response) CodecEncodeSelf(e *codec1978.Encoder) {
1853 var h codecSelfer7612
1854 z, r := codec1978.GenHelperEncoder(e)
1855 _, _, _ = h, z, r
1856 if x == nil {
1857 r.EncodeNil()
1858 } else {
1859 yym1 := z.EncBinary()
1860 _ = yym1
1861 if false {
1862 } else if z.HasExtensions() && z.EncExt(x) {
1863 } else {
1864 yysep2 := !z.EncBinary()
1865 yy2arr2 := z.EncBasicHandle().StructToArray
1866 _, _ = yysep2, yy2arr2
1867 const yyr2 bool = false
1868 if yyr2 || yy2arr2 {
1869 r.WriteArrayStart(3)
1870 } else {
1871 r.WriteMapStart(3)
1872 }
1873 if yyr2 || yy2arr2 {
1874 r.WriteArrayElem()
1875 yym4 := z.EncBinary()
1876 _ = yym4
1877 if false {
1878 } else {
1879 r.EncodeString(codecSelferC_UTF87612, string(x.Action))
1880 }
1881 } else {
1882 r.WriteMapElemKey()
1883 r.EncodeString(codecSelferC_UTF87612, string("action"))
1884 r.WriteMapElemValue()
1885 yym5 := z.EncBinary()
1886 _ = yym5
1887 if false {
1888 } else {
1889 r.EncodeString(codecSelferC_UTF87612, string(x.Action))
1890 }
1891 }
1892 var yyn6 bool
1893 if x.Node == nil {
1894 yyn6 = true
1895 goto LABEL6
1896 }
1897 LABEL6:
1898 if yyr2 || yy2arr2 {
1899 if yyn6 {
1900 r.WriteArrayElem()
1901 r.EncodeNil()
1902 } else {
1903 r.WriteArrayElem()
1904 if x.Node == nil {
1905 r.EncodeNil()
1906 } else {
1907 x.Node.CodecEncodeSelf(e)
1908 }
1909 }
1910 } else {
1911 r.WriteMapElemKey()
1912 r.EncodeString(codecSelferC_UTF87612, string("node"))
1913 r.WriteMapElemValue()
1914 if yyn6 {
1915 r.EncodeNil()
1916 } else {
1917 if x.Node == nil {
1918 r.EncodeNil()
1919 } else {
1920 x.Node.CodecEncodeSelf(e)
1921 }
1922 }
1923 }
1924 var yyn9 bool
1925 if x.PrevNode == nil {
1926 yyn9 = true
1927 goto LABEL9
1928 }
1929 LABEL9:
1930 if yyr2 || yy2arr2 {
1931 if yyn9 {
1932 r.WriteArrayElem()
1933 r.EncodeNil()
1934 } else {
1935 r.WriteArrayElem()
1936 if x.PrevNode == nil {
1937 r.EncodeNil()
1938 } else {
1939 x.PrevNode.CodecEncodeSelf(e)
1940 }
1941 }
1942 } else {
1943 r.WriteMapElemKey()
1944 r.EncodeString(codecSelferC_UTF87612, string("prevNode"))
1945 r.WriteMapElemValue()
1946 if yyn9 {
1947 r.EncodeNil()
1948 } else {
1949 if x.PrevNode == nil {
1950 r.EncodeNil()
1951 } else {
1952 x.PrevNode.CodecEncodeSelf(e)
1953 }
1954 }
1955 }
1956 if yyr2 || yy2arr2 {
1957 r.WriteArrayEnd()
1958 } else {
1959 r.WriteMapEnd()
1960 }
1961 }
1962 }
1963}
1964
1965func (x *Response) CodecDecodeSelf(d *codec1978.Decoder) {
1966 var h codecSelfer7612
1967 z, r := codec1978.GenHelperDecoder(d)
1968 _, _, _ = h, z, r
1969 yym1 := z.DecBinary()
1970 _ = yym1
1971 if false {
1972 } else if z.HasExtensions() && z.DecExt(x) {
1973 } else {
1974 yyct2 := r.ContainerType()
1975 if yyct2 == codecSelferValueTypeMap7612 {
1976 yyl2 := r.ReadMapStart()
1977 if yyl2 == 0 {
1978 r.ReadMapEnd()
1979 } else {
1980 x.codecDecodeSelfFromMap(yyl2, d)
1981 }
1982 } else if yyct2 == codecSelferValueTypeArray7612 {
1983 yyl2 := r.ReadArrayStart()
1984 if yyl2 == 0 {
1985 r.ReadArrayEnd()
1986 } else {
1987 x.codecDecodeSelfFromArray(yyl2, d)
1988 }
1989 } else {
1990 panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
1991 }
1992 }
1993}
1994
1995func (x *Response) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
1996 var h codecSelfer7612
1997 z, r := codec1978.GenHelperDecoder(d)
1998 _, _, _ = h, z, r
1999 var yys3Slc = z.DecScratchBuffer() // default slice to decode into
2000 _ = yys3Slc
2001 var yyhl3 bool = l >= 0
2002 for yyj3 := 0; ; yyj3++ {
2003 if yyhl3 {
2004 if yyj3 >= l {
2005 break
2006 }
2007 } else {
2008 if r.CheckBreak() {
2009 break
2010 }
2011 }
2012 r.ReadMapElemKey()
2013 yys3Slc = r.DecodeStringAsBytes()
2014 yys3 := string(yys3Slc)
2015 r.ReadMapElemValue()
2016 switch yys3 {
2017 case "action":
2018 if r.TryDecodeAsNil() {
2019 x.Action = ""
2020 } else {
2021 yyv4 := &x.Action
2022 yym5 := z.DecBinary()
2023 _ = yym5
2024 if false {
2025 } else {
2026 *((*string)(yyv4)) = r.DecodeString()
2027 }
2028 }
2029 case "node":
2030 if x.Node == nil {
2031 x.Node = new(Node)
2032 }
2033 if r.TryDecodeAsNil() {
2034 if x.Node != nil {
2035 x.Node = nil
2036 }
2037 } else {
2038 if x.Node == nil {
2039 x.Node = new(Node)
2040 }
2041 x.Node.CodecDecodeSelf(d)
2042 }
2043 case "prevNode":
2044 if x.PrevNode == nil {
2045 x.PrevNode = new(Node)
2046 }
2047 if r.TryDecodeAsNil() {
2048 if x.PrevNode != nil {
2049 x.PrevNode = nil
2050 }
2051 } else {
2052 if x.PrevNode == nil {
2053 x.PrevNode = new(Node)
2054 }
2055 x.PrevNode.CodecDecodeSelf(d)
2056 }
2057 default:
2058 z.DecStructFieldNotFound(-1, yys3)
2059 } // end switch yys3
2060 } // end for yyj3
2061 r.ReadMapEnd()
2062}
2063
2064func (x *Response) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
2065 var h codecSelfer7612
2066 z, r := codec1978.GenHelperDecoder(d)
2067 _, _, _ = h, z, r
2068 var yyj8 int
2069 var yyb8 bool
2070 var yyhl8 bool = l >= 0
2071 yyj8++
2072 if yyhl8 {
2073 yyb8 = yyj8 > l
2074 } else {
2075 yyb8 = r.CheckBreak()
2076 }
2077 if yyb8 {
2078 r.ReadArrayEnd()
2079 return
2080 }
2081 r.ReadArrayElem()
2082 if r.TryDecodeAsNil() {
2083 x.Action = ""
2084 } else {
2085 yyv9 := &x.Action
2086 yym10 := z.DecBinary()
2087 _ = yym10
2088 if false {
2089 } else {
2090 *((*string)(yyv9)) = r.DecodeString()
2091 }
2092 }
2093 if x.Node == nil {
2094 x.Node = new(Node)
2095 }
2096 yyj8++
2097 if yyhl8 {
2098 yyb8 = yyj8 > l
2099 } else {
2100 yyb8 = r.CheckBreak()
2101 }
2102 if yyb8 {
2103 r.ReadArrayEnd()
2104 return
2105 }
2106 r.ReadArrayElem()
2107 if r.TryDecodeAsNil() {
2108 if x.Node != nil {
2109 x.Node = nil
2110 }
2111 } else {
2112 if x.Node == nil {
2113 x.Node = new(Node)
2114 }
2115 x.Node.CodecDecodeSelf(d)
2116 }
2117 if x.PrevNode == nil {
2118 x.PrevNode = new(Node)
2119 }
2120 yyj8++
2121 if yyhl8 {
2122 yyb8 = yyj8 > l
2123 } else {
2124 yyb8 = r.CheckBreak()
2125 }
2126 if yyb8 {
2127 r.ReadArrayEnd()
2128 return
2129 }
2130 r.ReadArrayElem()
2131 if r.TryDecodeAsNil() {
2132 if x.PrevNode != nil {
2133 x.PrevNode = nil
2134 }
2135 } else {
2136 if x.PrevNode == nil {
2137 x.PrevNode = new(Node)
2138 }
2139 x.PrevNode.CodecDecodeSelf(d)
2140 }
2141 for {
2142 yyj8++
2143 if yyhl8 {
2144 yyb8 = yyj8 > l
2145 } else {
2146 yyb8 = r.CheckBreak()
2147 }
2148 if yyb8 {
2149 break
2150 }
2151 r.ReadArrayElem()
2152 z.DecStructFieldNotFound(yyj8-1, "")
2153 }
2154 r.ReadArrayEnd()
2155}
2156
2157func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) {
2158 var h codecSelfer7612
2159 z, r := codec1978.GenHelperEncoder(e)
2160 _, _, _ = h, z, r
2161 if x == nil {
2162 r.EncodeNil()
2163 } else {
2164 yym1 := z.EncBinary()
2165 _ = yym1
2166 if false {
2167 } else if z.HasExtensions() && z.EncExt(x) {
2168 } else {
2169 yysep2 := !z.EncBinary()
2170 yy2arr2 := z.EncBasicHandle().StructToArray
2171 var yyq2 [8]bool
2172 _ = yyq2
2173 _, _ = yysep2, yy2arr2
2174 const yyr2 bool = false
2175 yyq2[1] = x.Dir != false
2176 yyq2[6] = x.Expiration != nil
2177 yyq2[7] = x.TTL != 0
2178 if yyr2 || yy2arr2 {
2179 r.WriteArrayStart(8)
2180 } else {
2181 var yynn2 = 5
2182 for _, b := range yyq2 {
2183 if b {
2184 yynn2++
2185 }
2186 }
2187 r.WriteMapStart(yynn2)
2188 }
2189 if yyr2 || yy2arr2 {
2190 r.WriteArrayElem()
2191 yym4 := z.EncBinary()
2192 _ = yym4
2193 if false {
2194 } else {
2195 r.EncodeString(codecSelferC_UTF87612, string(x.Key))
2196 }
2197 } else {
2198 r.WriteMapElemKey()
2199 r.EncodeString(codecSelferC_UTF87612, string("key"))
2200 r.WriteMapElemValue()
2201 yym5 := z.EncBinary()
2202 _ = yym5
2203 if false {
2204 } else {
2205 r.EncodeString(codecSelferC_UTF87612, string(x.Key))
2206 }
2207 }
2208 if yyr2 || yy2arr2 {
2209 r.WriteArrayElem()
2210 if yyq2[1] {
2211 yym7 := z.EncBinary()
2212 _ = yym7
2213 if false {
2214 } else {
2215 r.EncodeBool(bool(x.Dir))
2216 }
2217 } else {
2218 r.EncodeBool(false)
2219 }
2220 } else {
2221 if yyq2[1] {
2222 r.WriteMapElemKey()
2223 r.EncodeString(codecSelferC_UTF87612, string("dir"))
2224 r.WriteMapElemValue()
2225 yym8 := z.EncBinary()
2226 _ = yym8
2227 if false {
2228 } else {
2229 r.EncodeBool(bool(x.Dir))
2230 }
2231 }
2232 }
2233 if yyr2 || yy2arr2 {
2234 r.WriteArrayElem()
2235 yym10 := z.EncBinary()
2236 _ = yym10
2237 if false {
2238 } else {
2239 r.EncodeString(codecSelferC_UTF87612, string(x.Value))
2240 }
2241 } else {
2242 r.WriteMapElemKey()
2243 r.EncodeString(codecSelferC_UTF87612, string("value"))
2244 r.WriteMapElemValue()
2245 yym11 := z.EncBinary()
2246 _ = yym11
2247 if false {
2248 } else {
2249 r.EncodeString(codecSelferC_UTF87612, string(x.Value))
2250 }
2251 }
2252 if yyr2 || yy2arr2 {
2253 r.WriteArrayElem()
2254 if x.Nodes == nil {
2255 r.EncodeNil()
2256 } else {
2257 x.Nodes.CodecEncodeSelf(e)
2258 }
2259 } else {
2260 r.WriteMapElemKey()
2261 r.EncodeString(codecSelferC_UTF87612, string("nodes"))
2262 r.WriteMapElemValue()
2263 if x.Nodes == nil {
2264 r.EncodeNil()
2265 } else {
2266 x.Nodes.CodecEncodeSelf(e)
2267 }
2268 }
2269 if yyr2 || yy2arr2 {
2270 r.WriteArrayElem()
2271 yym16 := z.EncBinary()
2272 _ = yym16
2273 if false {
2274 } else {
2275 r.EncodeUint(uint64(x.CreatedIndex))
2276 }
2277 } else {
2278 r.WriteMapElemKey()
2279 r.EncodeString(codecSelferC_UTF87612, string("createdIndex"))
2280 r.WriteMapElemValue()
2281 yym17 := z.EncBinary()
2282 _ = yym17
2283 if false {
2284 } else {
2285 r.EncodeUint(uint64(x.CreatedIndex))
2286 }
2287 }
2288 if yyr2 || yy2arr2 {
2289 r.WriteArrayElem()
2290 yym19 := z.EncBinary()
2291 _ = yym19
2292 if false {
2293 } else {
2294 r.EncodeUint(uint64(x.ModifiedIndex))
2295 }
2296 } else {
2297 r.WriteMapElemKey()
2298 r.EncodeString(codecSelferC_UTF87612, string("modifiedIndex"))
2299 r.WriteMapElemValue()
2300 yym20 := z.EncBinary()
2301 _ = yym20
2302 if false {
2303 } else {
2304 r.EncodeUint(uint64(x.ModifiedIndex))
2305 }
2306 }
2307 var yyn21 bool
2308 if x.Expiration == nil {
2309 yyn21 = true
2310 goto LABEL21
2311 }
2312 LABEL21:
2313 if yyr2 || yy2arr2 {
2314 if yyn21 {
2315 r.WriteArrayElem()
2316 r.EncodeNil()
2317 } else {
2318 r.WriteArrayElem()
2319 if yyq2[6] {
2320 if x.Expiration == nil {
2321 r.EncodeNil()
2322 } else {
2323 yym22 := z.EncBinary()
2324 _ = yym22
2325 if false {
2326 } else if yym23 := z.TimeRtidIfBinc(); yym23 != 0 {
2327 r.EncodeBuiltin(yym23, x.Expiration)
2328 } else if z.HasExtensions() && z.EncExt(x.Expiration) {
2329 } else if yym22 {
2330 z.EncBinaryMarshal(x.Expiration)
2331 } else if !yym22 && z.IsJSONHandle() {
2332 z.EncJSONMarshal(x.Expiration)
2333 } else {
2334 z.EncFallback(x.Expiration)
2335 }
2336 }
2337 } else {
2338 r.EncodeNil()
2339 }
2340 }
2341 } else {
2342 if yyq2[6] {
2343 r.WriteMapElemKey()
2344 r.EncodeString(codecSelferC_UTF87612, string("expiration"))
2345 r.WriteMapElemValue()
2346 if yyn21 {
2347 r.EncodeNil()
2348 } else {
2349 if x.Expiration == nil {
2350 r.EncodeNil()
2351 } else {
2352 yym24 := z.EncBinary()
2353 _ = yym24
2354 if false {
2355 } else if yym25 := z.TimeRtidIfBinc(); yym25 != 0 {
2356 r.EncodeBuiltin(yym25, x.Expiration)
2357 } else if z.HasExtensions() && z.EncExt(x.Expiration) {
2358 } else if yym24 {
2359 z.EncBinaryMarshal(x.Expiration)
2360 } else if !yym24 && z.IsJSONHandle() {
2361 z.EncJSONMarshal(x.Expiration)
2362 } else {
2363 z.EncFallback(x.Expiration)
2364 }
2365 }
2366 }
2367 }
2368 }
2369 if yyr2 || yy2arr2 {
2370 r.WriteArrayElem()
2371 if yyq2[7] {
2372 yym27 := z.EncBinary()
2373 _ = yym27
2374 if false {
2375 } else {
2376 r.EncodeInt(int64(x.TTL))
2377 }
2378 } else {
2379 r.EncodeInt(0)
2380 }
2381 } else {
2382 if yyq2[7] {
2383 r.WriteMapElemKey()
2384 r.EncodeString(codecSelferC_UTF87612, string("ttl"))
2385 r.WriteMapElemValue()
2386 yym28 := z.EncBinary()
2387 _ = yym28
2388 if false {
2389 } else {
2390 r.EncodeInt(int64(x.TTL))
2391 }
2392 }
2393 }
2394 if yyr2 || yy2arr2 {
2395 r.WriteArrayEnd()
2396 } else {
2397 r.WriteMapEnd()
2398 }
2399 }
2400 }
2401}
2402
2403func (x *Node) CodecDecodeSelf(d *codec1978.Decoder) {
2404 var h codecSelfer7612
2405 z, r := codec1978.GenHelperDecoder(d)
2406 _, _, _ = h, z, r
2407 yym1 := z.DecBinary()
2408 _ = yym1
2409 if false {
2410 } else if z.HasExtensions() && z.DecExt(x) {
2411 } else {
2412 yyct2 := r.ContainerType()
2413 if yyct2 == codecSelferValueTypeMap7612 {
2414 yyl2 := r.ReadMapStart()
2415 if yyl2 == 0 {
2416 r.ReadMapEnd()
2417 } else {
2418 x.codecDecodeSelfFromMap(yyl2, d)
2419 }
2420 } else if yyct2 == codecSelferValueTypeArray7612 {
2421 yyl2 := r.ReadArrayStart()
2422 if yyl2 == 0 {
2423 r.ReadArrayEnd()
2424 } else {
2425 x.codecDecodeSelfFromArray(yyl2, d)
2426 }
2427 } else {
2428 panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
2429 }
2430 }
2431}
2432
2433func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
2434 var h codecSelfer7612
2435 z, r := codec1978.GenHelperDecoder(d)
2436 _, _, _ = h, z, r
2437 var yys3Slc = z.DecScratchBuffer() // default slice to decode into
2438 _ = yys3Slc
2439 var yyhl3 bool = l >= 0
2440 for yyj3 := 0; ; yyj3++ {
2441 if yyhl3 {
2442 if yyj3 >= l {
2443 break
2444 }
2445 } else {
2446 if r.CheckBreak() {
2447 break
2448 }
2449 }
2450 r.ReadMapElemKey()
2451 yys3Slc = r.DecodeStringAsBytes()
2452 yys3 := string(yys3Slc)
2453 r.ReadMapElemValue()
2454 switch yys3 {
2455 case "key":
2456 if r.TryDecodeAsNil() {
2457 x.Key = ""
2458 } else {
2459 yyv4 := &x.Key
2460 yym5 := z.DecBinary()
2461 _ = yym5
2462 if false {
2463 } else {
2464 *((*string)(yyv4)) = r.DecodeString()
2465 }
2466 }
2467 case "dir":
2468 if r.TryDecodeAsNil() {
2469 x.Dir = false
2470 } else {
2471 yyv6 := &x.Dir
2472 yym7 := z.DecBinary()
2473 _ = yym7
2474 if false {
2475 } else {
2476 *((*bool)(yyv6)) = r.DecodeBool()
2477 }
2478 }
2479 case "value":
2480 if r.TryDecodeAsNil() {
2481 x.Value = ""
2482 } else {
2483 yyv8 := &x.Value
2484 yym9 := z.DecBinary()
2485 _ = yym9
2486 if false {
2487 } else {
2488 *((*string)(yyv8)) = r.DecodeString()
2489 }
2490 }
2491 case "nodes":
2492 if r.TryDecodeAsNil() {
2493 x.Nodes = nil
2494 } else {
2495 yyv10 := &x.Nodes
2496 yyv10.CodecDecodeSelf(d)
2497 }
2498 case "createdIndex":
2499 if r.TryDecodeAsNil() {
2500 x.CreatedIndex = 0
2501 } else {
2502 yyv11 := &x.CreatedIndex
2503 yym12 := z.DecBinary()
2504 _ = yym12
2505 if false {
2506 } else {
2507 *((*uint64)(yyv11)) = uint64(r.DecodeUint(64))
2508 }
2509 }
2510 case "modifiedIndex":
2511 if r.TryDecodeAsNil() {
2512 x.ModifiedIndex = 0
2513 } else {
2514 yyv13 := &x.ModifiedIndex
2515 yym14 := z.DecBinary()
2516 _ = yym14
2517 if false {
2518 } else {
2519 *((*uint64)(yyv13)) = uint64(r.DecodeUint(64))
2520 }
2521 }
2522 case "expiration":
2523 if x.Expiration == nil {
2524 x.Expiration = new(time.Time)
2525 }
2526 if r.TryDecodeAsNil() {
2527 if x.Expiration != nil {
2528 x.Expiration = nil
2529 }
2530 } else {
2531 if x.Expiration == nil {
2532 x.Expiration = new(time.Time)
2533 }
2534 yym16 := z.DecBinary()
2535 _ = yym16
2536 if false {
2537 } else if yym17 := z.TimeRtidIfBinc(); yym17 != 0 {
2538 r.DecodeBuiltin(yym17, x.Expiration)
2539 } else if z.HasExtensions() && z.DecExt(x.Expiration) {
2540 } else if yym16 {
2541 z.DecBinaryUnmarshal(x.Expiration)
2542 } else if !yym16 && z.IsJSONHandle() {
2543 z.DecJSONUnmarshal(x.Expiration)
2544 } else {
2545 z.DecFallback(x.Expiration, false)
2546 }
2547 }
2548 case "ttl":
2549 if r.TryDecodeAsNil() {
2550 x.TTL = 0
2551 } else {
2552 yyv18 := &x.TTL
2553 yym19 := z.DecBinary()
2554 _ = yym19
2555 if false {
2556 } else {
2557 *((*int64)(yyv18)) = int64(r.DecodeInt(64))
2558 }
2559 }
2560 default:
2561 z.DecStructFieldNotFound(-1, yys3)
2562 } // end switch yys3
2563 } // end for yyj3
2564 r.ReadMapEnd()
2565}
2566
2567func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
2568 var h codecSelfer7612
2569 z, r := codec1978.GenHelperDecoder(d)
2570 _, _, _ = h, z, r
2571 var yyj20 int
2572 var yyb20 bool
2573 var yyhl20 bool = l >= 0
2574 yyj20++
2575 if yyhl20 {
2576 yyb20 = yyj20 > l
2577 } else {
2578 yyb20 = r.CheckBreak()
2579 }
2580 if yyb20 {
2581 r.ReadArrayEnd()
2582 return
2583 }
2584 r.ReadArrayElem()
2585 if r.TryDecodeAsNil() {
2586 x.Key = ""
2587 } else {
2588 yyv21 := &x.Key
2589 yym22 := z.DecBinary()
2590 _ = yym22
2591 if false {
2592 } else {
2593 *((*string)(yyv21)) = r.DecodeString()
2594 }
2595 }
2596 yyj20++
2597 if yyhl20 {
2598 yyb20 = yyj20 > l
2599 } else {
2600 yyb20 = r.CheckBreak()
2601 }
2602 if yyb20 {
2603 r.ReadArrayEnd()
2604 return
2605 }
2606 r.ReadArrayElem()
2607 if r.TryDecodeAsNil() {
2608 x.Dir = false
2609 } else {
2610 yyv23 := &x.Dir
2611 yym24 := z.DecBinary()
2612 _ = yym24
2613 if false {
2614 } else {
2615 *((*bool)(yyv23)) = r.DecodeBool()
2616 }
2617 }
2618 yyj20++
2619 if yyhl20 {
2620 yyb20 = yyj20 > l
2621 } else {
2622 yyb20 = r.CheckBreak()
2623 }
2624 if yyb20 {
2625 r.ReadArrayEnd()
2626 return
2627 }
2628 r.ReadArrayElem()
2629 if r.TryDecodeAsNil() {
2630 x.Value = ""
2631 } else {
2632 yyv25 := &x.Value
2633 yym26 := z.DecBinary()
2634 _ = yym26
2635 if false {
2636 } else {
2637 *((*string)(yyv25)) = r.DecodeString()
2638 }
2639 }
2640 yyj20++
2641 if yyhl20 {
2642 yyb20 = yyj20 > l
2643 } else {
2644 yyb20 = r.CheckBreak()
2645 }
2646 if yyb20 {
2647 r.ReadArrayEnd()
2648 return
2649 }
2650 r.ReadArrayElem()
2651 if r.TryDecodeAsNil() {
2652 x.Nodes = nil
2653 } else {
2654 yyv27 := &x.Nodes
2655 yyv27.CodecDecodeSelf(d)
2656 }
2657 yyj20++
2658 if yyhl20 {
2659 yyb20 = yyj20 > l
2660 } else {
2661 yyb20 = r.CheckBreak()
2662 }
2663 if yyb20 {
2664 r.ReadArrayEnd()
2665 return
2666 }
2667 r.ReadArrayElem()
2668 if r.TryDecodeAsNil() {
2669 x.CreatedIndex = 0
2670 } else {
2671 yyv28 := &x.CreatedIndex
2672 yym29 := z.DecBinary()
2673 _ = yym29
2674 if false {
2675 } else {
2676 *((*uint64)(yyv28)) = uint64(r.DecodeUint(64))
2677 }
2678 }
2679 yyj20++
2680 if yyhl20 {
2681 yyb20 = yyj20 > l
2682 } else {
2683 yyb20 = r.CheckBreak()
2684 }
2685 if yyb20 {
2686 r.ReadArrayEnd()
2687 return
2688 }
2689 r.ReadArrayElem()
2690 if r.TryDecodeAsNil() {
2691 x.ModifiedIndex = 0
2692 } else {
2693 yyv30 := &x.ModifiedIndex
2694 yym31 := z.DecBinary()
2695 _ = yym31
2696 if false {
2697 } else {
2698 *((*uint64)(yyv30)) = uint64(r.DecodeUint(64))
2699 }
2700 }
2701 if x.Expiration == nil {
2702 x.Expiration = new(time.Time)
2703 }
2704 yyj20++
2705 if yyhl20 {
2706 yyb20 = yyj20 > l
2707 } else {
2708 yyb20 = r.CheckBreak()
2709 }
2710 if yyb20 {
2711 r.ReadArrayEnd()
2712 return
2713 }
2714 r.ReadArrayElem()
2715 if r.TryDecodeAsNil() {
2716 if x.Expiration != nil {
2717 x.Expiration = nil
2718 }
2719 } else {
2720 if x.Expiration == nil {
2721 x.Expiration = new(time.Time)
2722 }
2723 yym33 := z.DecBinary()
2724 _ = yym33
2725 if false {
2726 } else if yym34 := z.TimeRtidIfBinc(); yym34 != 0 {
2727 r.DecodeBuiltin(yym34, x.Expiration)
2728 } else if z.HasExtensions() && z.DecExt(x.Expiration) {
2729 } else if yym33 {
2730 z.DecBinaryUnmarshal(x.Expiration)
2731 } else if !yym33 && z.IsJSONHandle() {
2732 z.DecJSONUnmarshal(x.Expiration)
2733 } else {
2734 z.DecFallback(x.Expiration, false)
2735 }
2736 }
2737 yyj20++
2738 if yyhl20 {
2739 yyb20 = yyj20 > l
2740 } else {
2741 yyb20 = r.CheckBreak()
2742 }
2743 if yyb20 {
2744 r.ReadArrayEnd()
2745 return
2746 }
2747 r.ReadArrayElem()
2748 if r.TryDecodeAsNil() {
2749 x.TTL = 0
2750 } else {
2751 yyv35 := &x.TTL
2752 yym36 := z.DecBinary()
2753 _ = yym36
2754 if false {
2755 } else {
2756 *((*int64)(yyv35)) = int64(r.DecodeInt(64))
2757 }
2758 }
2759 for {
2760 yyj20++
2761 if yyhl20 {
2762 yyb20 = yyj20 > l
2763 } else {
2764 yyb20 = r.CheckBreak()
2765 }
2766 if yyb20 {
2767 break
2768 }
2769 r.ReadArrayElem()
2770 z.DecStructFieldNotFound(yyj20-1, "")
2771 }
2772 r.ReadArrayEnd()
2773}
2774
2775func (x Nodes) CodecEncodeSelf(e *codec1978.Encoder) {
2776 var h codecSelfer7612
2777 z, r := codec1978.GenHelperEncoder(e)
2778 _, _, _ = h, z, r
2779 if x == nil {
2780 r.EncodeNil()
2781 } else {
2782 yym1 := z.EncBinary()
2783 _ = yym1
2784 if false {
2785 } else if z.HasExtensions() && z.EncExt(x) {
2786 } else {
2787 h.encNodes((Nodes)(x), e)
2788 }
2789 }
2790}
2791
2792func (x *Nodes) CodecDecodeSelf(d *codec1978.Decoder) {
2793 var h codecSelfer7612
2794 z, r := codec1978.GenHelperDecoder(d)
2795 _, _, _ = h, z, r
2796 yym1 := z.DecBinary()
2797 _ = yym1
2798 if false {
2799 } else if z.HasExtensions() && z.DecExt(x) {
2800 } else {
2801 h.decNodes((*Nodes)(x), d)
2802 }
2803}
2804
2805func (x *httpKeysAPI) CodecEncodeSelf(e *codec1978.Encoder) {
2806 var h codecSelfer7612
2807 z, r := codec1978.GenHelperEncoder(e)
2808 _, _, _ = h, z, r
2809 if x == nil {
2810 r.EncodeNil()
2811 } else {
2812 yym1 := z.EncBinary()
2813 _ = yym1
2814 if false {
2815 } else if z.HasExtensions() && z.EncExt(x) {
2816 } else {
2817 yysep2 := !z.EncBinary()
2818 yy2arr2 := z.EncBasicHandle().StructToArray
2819 _, _ = yysep2, yy2arr2
2820 const yyr2 bool = false
2821 if yyr2 || yy2arr2 {
2822 r.WriteArrayStart(0)
2823 } else {
2824 r.WriteMapStart(0)
2825 }
2826 if yyr2 || yy2arr2 {
2827 r.WriteArrayEnd()
2828 } else {
2829 r.WriteMapEnd()
2830 }
2831 }
2832 }
2833}
2834
2835func (x *httpKeysAPI) CodecDecodeSelf(d *codec1978.Decoder) {
2836 var h codecSelfer7612
2837 z, r := codec1978.GenHelperDecoder(d)
2838 _, _, _ = h, z, r
2839 yym1 := z.DecBinary()
2840 _ = yym1
2841 if false {
2842 } else if z.HasExtensions() && z.DecExt(x) {
2843 } else {
2844 yyct2 := r.ContainerType()
2845 if yyct2 == codecSelferValueTypeMap7612 {
2846 yyl2 := r.ReadMapStart()
2847 if yyl2 == 0 {
2848 r.ReadMapEnd()
2849 } else {
2850 x.codecDecodeSelfFromMap(yyl2, d)
2851 }
2852 } else if yyct2 == codecSelferValueTypeArray7612 {
2853 yyl2 := r.ReadArrayStart()
2854 if yyl2 == 0 {
2855 r.ReadArrayEnd()
2856 } else {
2857 x.codecDecodeSelfFromArray(yyl2, d)
2858 }
2859 } else {
2860 panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
2861 }
2862 }
2863}
2864
2865func (x *httpKeysAPI) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
2866 var h codecSelfer7612
2867 z, r := codec1978.GenHelperDecoder(d)
2868 _, _, _ = h, z, r
2869 var yys3Slc = z.DecScratchBuffer() // default slice to decode into
2870 _ = yys3Slc
2871 var yyhl3 bool = l >= 0
2872 for yyj3 := 0; ; yyj3++ {
2873 if yyhl3 {
2874 if yyj3 >= l {
2875 break
2876 }
2877 } else {
2878 if r.CheckBreak() {
2879 break
2880 }
2881 }
2882 r.ReadMapElemKey()
2883 yys3Slc = r.DecodeStringAsBytes()
2884 yys3 := string(yys3Slc)
2885 r.ReadMapElemValue()
2886 switch yys3 {
2887 default:
2888 z.DecStructFieldNotFound(-1, yys3)
2889 } // end switch yys3
2890 } // end for yyj3
2891 r.ReadMapEnd()
2892}
2893
2894func (x *httpKeysAPI) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
2895 var h codecSelfer7612
2896 z, r := codec1978.GenHelperDecoder(d)
2897 _, _, _ = h, z, r
2898 var yyj4 int
2899 var yyb4 bool
2900 var yyhl4 bool = l >= 0
2901 for {
2902 yyj4++
2903 if yyhl4 {
2904 yyb4 = yyj4 > l
2905 } else {
2906 yyb4 = r.CheckBreak()
2907 }
2908 if yyb4 {
2909 break
2910 }
2911 r.ReadArrayElem()
2912 z.DecStructFieldNotFound(yyj4-1, "")
2913 }
2914 r.ReadArrayEnd()
2915}
2916
2917func (x *httpWatcher) CodecEncodeSelf(e *codec1978.Encoder) {
2918 var h codecSelfer7612
2919 z, r := codec1978.GenHelperEncoder(e)
2920 _, _, _ = h, z, r
2921 if x == nil {
2922 r.EncodeNil()
2923 } else {
2924 yym1 := z.EncBinary()
2925 _ = yym1
2926 if false {
2927 } else if z.HasExtensions() && z.EncExt(x) {
2928 } else {
2929 yysep2 := !z.EncBinary()
2930 yy2arr2 := z.EncBasicHandle().StructToArray
2931 _, _ = yysep2, yy2arr2
2932 const yyr2 bool = false
2933 if yyr2 || yy2arr2 {
2934 r.WriteArrayStart(0)
2935 } else {
2936 r.WriteMapStart(0)
2937 }
2938 if yyr2 || yy2arr2 {
2939 r.WriteArrayEnd()
2940 } else {
2941 r.WriteMapEnd()
2942 }
2943 }
2944 }
2945}
2946
2947func (x *httpWatcher) CodecDecodeSelf(d *codec1978.Decoder) {
2948 var h codecSelfer7612
2949 z, r := codec1978.GenHelperDecoder(d)
2950 _, _, _ = h, z, r
2951 yym1 := z.DecBinary()
2952 _ = yym1
2953 if false {
2954 } else if z.HasExtensions() && z.DecExt(x) {
2955 } else {
2956 yyct2 := r.ContainerType()
2957 if yyct2 == codecSelferValueTypeMap7612 {
2958 yyl2 := r.ReadMapStart()
2959 if yyl2 == 0 {
2960 r.ReadMapEnd()
2961 } else {
2962 x.codecDecodeSelfFromMap(yyl2, d)
2963 }
2964 } else if yyct2 == codecSelferValueTypeArray7612 {
2965 yyl2 := r.ReadArrayStart()
2966 if yyl2 == 0 {
2967 r.ReadArrayEnd()
2968 } else {
2969 x.codecDecodeSelfFromArray(yyl2, d)
2970 }
2971 } else {
2972 panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
2973 }
2974 }
2975}
2976
2977func (x *httpWatcher) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
2978 var h codecSelfer7612
2979 z, r := codec1978.GenHelperDecoder(d)
2980 _, _, _ = h, z, r
2981 var yys3Slc = z.DecScratchBuffer() // default slice to decode into
2982 _ = yys3Slc
2983 var yyhl3 bool = l >= 0
2984 for yyj3 := 0; ; yyj3++ {
2985 if yyhl3 {
2986 if yyj3 >= l {
2987 break
2988 }
2989 } else {
2990 if r.CheckBreak() {
2991 break
2992 }
2993 }
2994 r.ReadMapElemKey()
2995 yys3Slc = r.DecodeStringAsBytes()
2996 yys3 := string(yys3Slc)
2997 r.ReadMapElemValue()
2998 switch yys3 {
2999 default:
3000 z.DecStructFieldNotFound(-1, yys3)
3001 } // end switch yys3
3002 } // end for yyj3
3003 r.ReadMapEnd()
3004}
3005
3006func (x *httpWatcher) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
3007 var h codecSelfer7612
3008 z, r := codec1978.GenHelperDecoder(d)
3009 _, _, _ = h, z, r
3010 var yyj4 int
3011 var yyb4 bool
3012 var yyhl4 bool = l >= 0
3013 for {
3014 yyj4++
3015 if yyhl4 {
3016 yyb4 = yyj4 > l
3017 } else {
3018 yyb4 = r.CheckBreak()
3019 }
3020 if yyb4 {
3021 break
3022 }
3023 r.ReadArrayElem()
3024 z.DecStructFieldNotFound(yyj4-1, "")
3025 }
3026 r.ReadArrayEnd()
3027}
3028
3029func (x *getAction) CodecEncodeSelf(e *codec1978.Encoder) {
3030 var h codecSelfer7612
3031 z, r := codec1978.GenHelperEncoder(e)
3032 _, _, _ = h, z, r
3033 if x == nil {
3034 r.EncodeNil()
3035 } else {
3036 yym1 := z.EncBinary()
3037 _ = yym1
3038 if false {
3039 } else if z.HasExtensions() && z.EncExt(x) {
3040 } else {
3041 yysep2 := !z.EncBinary()
3042 yy2arr2 := z.EncBasicHandle().StructToArray
3043 _, _ = yysep2, yy2arr2
3044 const yyr2 bool = false
3045 if yyr2 || yy2arr2 {
3046 r.WriteArrayStart(5)
3047 } else {
3048 r.WriteMapStart(5)
3049 }
3050 if yyr2 || yy2arr2 {
3051 r.WriteArrayElem()
3052 yym4 := z.EncBinary()
3053 _ = yym4
3054 if false {
3055 } else {
3056 r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
3057 }
3058 } else {
3059 r.WriteMapElemKey()
3060 r.EncodeString(codecSelferC_UTF87612, string("Prefix"))
3061 r.WriteMapElemValue()
3062 yym5 := z.EncBinary()
3063 _ = yym5
3064 if false {
3065 } else {
3066 r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
3067 }
3068 }
3069 if yyr2 || yy2arr2 {
3070 r.WriteArrayElem()
3071 yym7 := z.EncBinary()
3072 _ = yym7
3073 if false {
3074 } else {
3075 r.EncodeString(codecSelferC_UTF87612, string(x.Key))
3076 }
3077 } else {
3078 r.WriteMapElemKey()
3079 r.EncodeString(codecSelferC_UTF87612, string("Key"))
3080 r.WriteMapElemValue()
3081 yym8 := z.EncBinary()
3082 _ = yym8
3083 if false {
3084 } else {
3085 r.EncodeString(codecSelferC_UTF87612, string(x.Key))
3086 }
3087 }
3088 if yyr2 || yy2arr2 {
3089 r.WriteArrayElem()
3090 yym10 := z.EncBinary()
3091 _ = yym10
3092 if false {
3093 } else {
3094 r.EncodeBool(bool(x.Recursive))
3095 }
3096 } else {
3097 r.WriteMapElemKey()
3098 r.EncodeString(codecSelferC_UTF87612, string("Recursive"))
3099 r.WriteMapElemValue()
3100 yym11 := z.EncBinary()
3101 _ = yym11
3102 if false {
3103 } else {
3104 r.EncodeBool(bool(x.Recursive))
3105 }
3106 }
3107 if yyr2 || yy2arr2 {
3108 r.WriteArrayElem()
3109 yym13 := z.EncBinary()
3110 _ = yym13
3111 if false {
3112 } else {
3113 r.EncodeBool(bool(x.Sorted))
3114 }
3115 } else {
3116 r.WriteMapElemKey()
3117 r.EncodeString(codecSelferC_UTF87612, string("Sorted"))
3118 r.WriteMapElemValue()
3119 yym14 := z.EncBinary()
3120 _ = yym14
3121 if false {
3122 } else {
3123 r.EncodeBool(bool(x.Sorted))
3124 }
3125 }
3126 if yyr2 || yy2arr2 {
3127 r.WriteArrayElem()
3128 yym16 := z.EncBinary()
3129 _ = yym16
3130 if false {
3131 } else {
3132 r.EncodeBool(bool(x.Quorum))
3133 }
3134 } else {
3135 r.WriteMapElemKey()
3136 r.EncodeString(codecSelferC_UTF87612, string("Quorum"))
3137 r.WriteMapElemValue()
3138 yym17 := z.EncBinary()
3139 _ = yym17
3140 if false {
3141 } else {
3142 r.EncodeBool(bool(x.Quorum))
3143 }
3144 }
3145 if yyr2 || yy2arr2 {
3146 r.WriteArrayEnd()
3147 } else {
3148 r.WriteMapEnd()
3149 }
3150 }
3151 }
3152}
3153
3154func (x *getAction) CodecDecodeSelf(d *codec1978.Decoder) {
3155 var h codecSelfer7612
3156 z, r := codec1978.GenHelperDecoder(d)
3157 _, _, _ = h, z, r
3158 yym1 := z.DecBinary()
3159 _ = yym1
3160 if false {
3161 } else if z.HasExtensions() && z.DecExt(x) {
3162 } else {
3163 yyct2 := r.ContainerType()
3164 if yyct2 == codecSelferValueTypeMap7612 {
3165 yyl2 := r.ReadMapStart()
3166 if yyl2 == 0 {
3167 r.ReadMapEnd()
3168 } else {
3169 x.codecDecodeSelfFromMap(yyl2, d)
3170 }
3171 } else if yyct2 == codecSelferValueTypeArray7612 {
3172 yyl2 := r.ReadArrayStart()
3173 if yyl2 == 0 {
3174 r.ReadArrayEnd()
3175 } else {
3176 x.codecDecodeSelfFromArray(yyl2, d)
3177 }
3178 } else {
3179 panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
3180 }
3181 }
3182}
3183
3184func (x *getAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
3185 var h codecSelfer7612
3186 z, r := codec1978.GenHelperDecoder(d)
3187 _, _, _ = h, z, r
3188 var yys3Slc = z.DecScratchBuffer() // default slice to decode into
3189 _ = yys3Slc
3190 var yyhl3 bool = l >= 0
3191 for yyj3 := 0; ; yyj3++ {
3192 if yyhl3 {
3193 if yyj3 >= l {
3194 break
3195 }
3196 } else {
3197 if r.CheckBreak() {
3198 break
3199 }
3200 }
3201 r.ReadMapElemKey()
3202 yys3Slc = r.DecodeStringAsBytes()
3203 yys3 := string(yys3Slc)
3204 r.ReadMapElemValue()
3205 switch yys3 {
3206 case "Prefix":
3207 if r.TryDecodeAsNil() {
3208 x.Prefix = ""
3209 } else {
3210 yyv4 := &x.Prefix
3211 yym5 := z.DecBinary()
3212 _ = yym5
3213 if false {
3214 } else {
3215 *((*string)(yyv4)) = r.DecodeString()
3216 }
3217 }
3218 case "Key":
3219 if r.TryDecodeAsNil() {
3220 x.Key = ""
3221 } else {
3222 yyv6 := &x.Key
3223 yym7 := z.DecBinary()
3224 _ = yym7
3225 if false {
3226 } else {
3227 *((*string)(yyv6)) = r.DecodeString()
3228 }
3229 }
3230 case "Recursive":
3231 if r.TryDecodeAsNil() {
3232 x.Recursive = false
3233 } else {
3234 yyv8 := &x.Recursive
3235 yym9 := z.DecBinary()
3236 _ = yym9
3237 if false {
3238 } else {
3239 *((*bool)(yyv8)) = r.DecodeBool()
3240 }
3241 }
3242 case "Sorted":
3243 if r.TryDecodeAsNil() {
3244 x.Sorted = false
3245 } else {
3246 yyv10 := &x.Sorted
3247 yym11 := z.DecBinary()
3248 _ = yym11
3249 if false {
3250 } else {
3251 *((*bool)(yyv10)) = r.DecodeBool()
3252 }
3253 }
3254 case "Quorum":
3255 if r.TryDecodeAsNil() {
3256 x.Quorum = false
3257 } else {
3258 yyv12 := &x.Quorum
3259 yym13 := z.DecBinary()
3260 _ = yym13
3261 if false {
3262 } else {
3263 *((*bool)(yyv12)) = r.DecodeBool()
3264 }
3265 }
3266 default:
3267 z.DecStructFieldNotFound(-1, yys3)
3268 } // end switch yys3
3269 } // end for yyj3
3270 r.ReadMapEnd()
3271}
3272
3273func (x *getAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
3274 var h codecSelfer7612
3275 z, r := codec1978.GenHelperDecoder(d)
3276 _, _, _ = h, z, r
3277 var yyj14 int
3278 var yyb14 bool
3279 var yyhl14 bool = l >= 0
3280 yyj14++
3281 if yyhl14 {
3282 yyb14 = yyj14 > l
3283 } else {
3284 yyb14 = r.CheckBreak()
3285 }
3286 if yyb14 {
3287 r.ReadArrayEnd()
3288 return
3289 }
3290 r.ReadArrayElem()
3291 if r.TryDecodeAsNil() {
3292 x.Prefix = ""
3293 } else {
3294 yyv15 := &x.Prefix
3295 yym16 := z.DecBinary()
3296 _ = yym16
3297 if false {
3298 } else {
3299 *((*string)(yyv15)) = r.DecodeString()
3300 }
3301 }
3302 yyj14++
3303 if yyhl14 {
3304 yyb14 = yyj14 > l
3305 } else {
3306 yyb14 = r.CheckBreak()
3307 }
3308 if yyb14 {
3309 r.ReadArrayEnd()
3310 return
3311 }
3312 r.ReadArrayElem()
3313 if r.TryDecodeAsNil() {
3314 x.Key = ""
3315 } else {
3316 yyv17 := &x.Key
3317 yym18 := z.DecBinary()
3318 _ = yym18
3319 if false {
3320 } else {
3321 *((*string)(yyv17)) = r.DecodeString()
3322 }
3323 }
3324 yyj14++
3325 if yyhl14 {
3326 yyb14 = yyj14 > l
3327 } else {
3328 yyb14 = r.CheckBreak()
3329 }
3330 if yyb14 {
3331 r.ReadArrayEnd()
3332 return
3333 }
3334 r.ReadArrayElem()
3335 if r.TryDecodeAsNil() {
3336 x.Recursive = false
3337 } else {
3338 yyv19 := &x.Recursive
3339 yym20 := z.DecBinary()
3340 _ = yym20
3341 if false {
3342 } else {
3343 *((*bool)(yyv19)) = r.DecodeBool()
3344 }
3345 }
3346 yyj14++
3347 if yyhl14 {
3348 yyb14 = yyj14 > l
3349 } else {
3350 yyb14 = r.CheckBreak()
3351 }
3352 if yyb14 {
3353 r.ReadArrayEnd()
3354 return
3355 }
3356 r.ReadArrayElem()
3357 if r.TryDecodeAsNil() {
3358 x.Sorted = false
3359 } else {
3360 yyv21 := &x.Sorted
3361 yym22 := z.DecBinary()
3362 _ = yym22
3363 if false {
3364 } else {
3365 *((*bool)(yyv21)) = r.DecodeBool()
3366 }
3367 }
3368 yyj14++
3369 if yyhl14 {
3370 yyb14 = yyj14 > l
3371 } else {
3372 yyb14 = r.CheckBreak()
3373 }
3374 if yyb14 {
3375 r.ReadArrayEnd()
3376 return
3377 }
3378 r.ReadArrayElem()
3379 if r.TryDecodeAsNil() {
3380 x.Quorum = false
3381 } else {
3382 yyv23 := &x.Quorum
3383 yym24 := z.DecBinary()
3384 _ = yym24
3385 if false {
3386 } else {
3387 *((*bool)(yyv23)) = r.DecodeBool()
3388 }
3389 }
3390 for {
3391 yyj14++
3392 if yyhl14 {
3393 yyb14 = yyj14 > l
3394 } else {
3395 yyb14 = r.CheckBreak()
3396 }
3397 if yyb14 {
3398 break
3399 }
3400 r.ReadArrayElem()
3401 z.DecStructFieldNotFound(yyj14-1, "")
3402 }
3403 r.ReadArrayEnd()
3404}
3405
3406func (x *waitAction) CodecEncodeSelf(e *codec1978.Encoder) {
3407 var h codecSelfer7612
3408 z, r := codec1978.GenHelperEncoder(e)
3409 _, _, _ = h, z, r
3410 if x == nil {
3411 r.EncodeNil()
3412 } else {
3413 yym1 := z.EncBinary()
3414 _ = yym1
3415 if false {
3416 } else if z.HasExtensions() && z.EncExt(x) {
3417 } else {
3418 yysep2 := !z.EncBinary()
3419 yy2arr2 := z.EncBasicHandle().StructToArray
3420 _, _ = yysep2, yy2arr2
3421 const yyr2 bool = false
3422 if yyr2 || yy2arr2 {
3423 r.WriteArrayStart(4)
3424 } else {
3425 r.WriteMapStart(4)
3426 }
3427 if yyr2 || yy2arr2 {
3428 r.WriteArrayElem()
3429 yym4 := z.EncBinary()
3430 _ = yym4
3431 if false {
3432 } else {
3433 r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
3434 }
3435 } else {
3436 r.WriteMapElemKey()
3437 r.EncodeString(codecSelferC_UTF87612, string("Prefix"))
3438 r.WriteMapElemValue()
3439 yym5 := z.EncBinary()
3440 _ = yym5
3441 if false {
3442 } else {
3443 r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
3444 }
3445 }
3446 if yyr2 || yy2arr2 {
3447 r.WriteArrayElem()
3448 yym7 := z.EncBinary()
3449 _ = yym7
3450 if false {
3451 } else {
3452 r.EncodeString(codecSelferC_UTF87612, string(x.Key))
3453 }
3454 } else {
3455 r.WriteMapElemKey()
3456 r.EncodeString(codecSelferC_UTF87612, string("Key"))
3457 r.WriteMapElemValue()
3458 yym8 := z.EncBinary()
3459 _ = yym8
3460 if false {
3461 } else {
3462 r.EncodeString(codecSelferC_UTF87612, string(x.Key))
3463 }
3464 }
3465 if yyr2 || yy2arr2 {
3466 r.WriteArrayElem()
3467 yym10 := z.EncBinary()
3468 _ = yym10
3469 if false {
3470 } else {
3471 r.EncodeUint(uint64(x.WaitIndex))
3472 }
3473 } else {
3474 r.WriteMapElemKey()
3475 r.EncodeString(codecSelferC_UTF87612, string("WaitIndex"))
3476 r.WriteMapElemValue()
3477 yym11 := z.EncBinary()
3478 _ = yym11
3479 if false {
3480 } else {
3481 r.EncodeUint(uint64(x.WaitIndex))
3482 }
3483 }
3484 if yyr2 || yy2arr2 {
3485 r.WriteArrayElem()
3486 yym13 := z.EncBinary()
3487 _ = yym13
3488 if false {
3489 } else {
3490 r.EncodeBool(bool(x.Recursive))
3491 }
3492 } else {
3493 r.WriteMapElemKey()
3494 r.EncodeString(codecSelferC_UTF87612, string("Recursive"))
3495 r.WriteMapElemValue()
3496 yym14 := z.EncBinary()
3497 _ = yym14
3498 if false {
3499 } else {
3500 r.EncodeBool(bool(x.Recursive))
3501 }
3502 }
3503 if yyr2 || yy2arr2 {
3504 r.WriteArrayEnd()
3505 } else {
3506 r.WriteMapEnd()
3507 }
3508 }
3509 }
3510}
3511
3512func (x *waitAction) CodecDecodeSelf(d *codec1978.Decoder) {
3513 var h codecSelfer7612
3514 z, r := codec1978.GenHelperDecoder(d)
3515 _, _, _ = h, z, r
3516 yym1 := z.DecBinary()
3517 _ = yym1
3518 if false {
3519 } else if z.HasExtensions() && z.DecExt(x) {
3520 } else {
3521 yyct2 := r.ContainerType()
3522 if yyct2 == codecSelferValueTypeMap7612 {
3523 yyl2 := r.ReadMapStart()
3524 if yyl2 == 0 {
3525 r.ReadMapEnd()
3526 } else {
3527 x.codecDecodeSelfFromMap(yyl2, d)
3528 }
3529 } else if yyct2 == codecSelferValueTypeArray7612 {
3530 yyl2 := r.ReadArrayStart()
3531 if yyl2 == 0 {
3532 r.ReadArrayEnd()
3533 } else {
3534 x.codecDecodeSelfFromArray(yyl2, d)
3535 }
3536 } else {
3537 panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
3538 }
3539 }
3540}
3541
3542func (x *waitAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
3543 var h codecSelfer7612
3544 z, r := codec1978.GenHelperDecoder(d)
3545 _, _, _ = h, z, r
3546 var yys3Slc = z.DecScratchBuffer() // default slice to decode into
3547 _ = yys3Slc
3548 var yyhl3 bool = l >= 0
3549 for yyj3 := 0; ; yyj3++ {
3550 if yyhl3 {
3551 if yyj3 >= l {
3552 break
3553 }
3554 } else {
3555 if r.CheckBreak() {
3556 break
3557 }
3558 }
3559 r.ReadMapElemKey()
3560 yys3Slc = r.DecodeStringAsBytes()
3561 yys3 := string(yys3Slc)
3562 r.ReadMapElemValue()
3563 switch yys3 {
3564 case "Prefix":
3565 if r.TryDecodeAsNil() {
3566 x.Prefix = ""
3567 } else {
3568 yyv4 := &x.Prefix
3569 yym5 := z.DecBinary()
3570 _ = yym5
3571 if false {
3572 } else {
3573 *((*string)(yyv4)) = r.DecodeString()
3574 }
3575 }
3576 case "Key":
3577 if r.TryDecodeAsNil() {
3578 x.Key = ""
3579 } else {
3580 yyv6 := &x.Key
3581 yym7 := z.DecBinary()
3582 _ = yym7
3583 if false {
3584 } else {
3585 *((*string)(yyv6)) = r.DecodeString()
3586 }
3587 }
3588 case "WaitIndex":
3589 if r.TryDecodeAsNil() {
3590 x.WaitIndex = 0
3591 } else {
3592 yyv8 := &x.WaitIndex
3593 yym9 := z.DecBinary()
3594 _ = yym9
3595 if false {
3596 } else {
3597 *((*uint64)(yyv8)) = uint64(r.DecodeUint(64))
3598 }
3599 }
3600 case "Recursive":
3601 if r.TryDecodeAsNil() {
3602 x.Recursive = false
3603 } else {
3604 yyv10 := &x.Recursive
3605 yym11 := z.DecBinary()
3606 _ = yym11
3607 if false {
3608 } else {
3609 *((*bool)(yyv10)) = r.DecodeBool()
3610 }
3611 }
3612 default:
3613 z.DecStructFieldNotFound(-1, yys3)
3614 } // end switch yys3
3615 } // end for yyj3
3616 r.ReadMapEnd()
3617}
3618
3619func (x *waitAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
3620 var h codecSelfer7612
3621 z, r := codec1978.GenHelperDecoder(d)
3622 _, _, _ = h, z, r
3623 var yyj12 int
3624 var yyb12 bool
3625 var yyhl12 bool = l >= 0
3626 yyj12++
3627 if yyhl12 {
3628 yyb12 = yyj12 > l
3629 } else {
3630 yyb12 = r.CheckBreak()
3631 }
3632 if yyb12 {
3633 r.ReadArrayEnd()
3634 return
3635 }
3636 r.ReadArrayElem()
3637 if r.TryDecodeAsNil() {
3638 x.Prefix = ""
3639 } else {
3640 yyv13 := &x.Prefix
3641 yym14 := z.DecBinary()
3642 _ = yym14
3643 if false {
3644 } else {
3645 *((*string)(yyv13)) = r.DecodeString()
3646 }
3647 }
3648 yyj12++
3649 if yyhl12 {
3650 yyb12 = yyj12 > l
3651 } else {
3652 yyb12 = r.CheckBreak()
3653 }
3654 if yyb12 {
3655 r.ReadArrayEnd()
3656 return
3657 }
3658 r.ReadArrayElem()
3659 if r.TryDecodeAsNil() {
3660 x.Key = ""
3661 } else {
3662 yyv15 := &x.Key
3663 yym16 := z.DecBinary()
3664 _ = yym16
3665 if false {
3666 } else {
3667 *((*string)(yyv15)) = r.DecodeString()
3668 }
3669 }
3670 yyj12++
3671 if yyhl12 {
3672 yyb12 = yyj12 > l
3673 } else {
3674 yyb12 = r.CheckBreak()
3675 }
3676 if yyb12 {
3677 r.ReadArrayEnd()
3678 return
3679 }
3680 r.ReadArrayElem()
3681 if r.TryDecodeAsNil() {
3682 x.WaitIndex = 0
3683 } else {
3684 yyv17 := &x.WaitIndex
3685 yym18 := z.DecBinary()
3686 _ = yym18
3687 if false {
3688 } else {
3689 *((*uint64)(yyv17)) = uint64(r.DecodeUint(64))
3690 }
3691 }
3692 yyj12++
3693 if yyhl12 {
3694 yyb12 = yyj12 > l
3695 } else {
3696 yyb12 = r.CheckBreak()
3697 }
3698 if yyb12 {
3699 r.ReadArrayEnd()
3700 return
3701 }
3702 r.ReadArrayElem()
3703 if r.TryDecodeAsNil() {
3704 x.Recursive = false
3705 } else {
3706 yyv19 := &x.Recursive
3707 yym20 := z.DecBinary()
3708 _ = yym20
3709 if false {
3710 } else {
3711 *((*bool)(yyv19)) = r.DecodeBool()
3712 }
3713 }
3714 for {
3715 yyj12++
3716 if yyhl12 {
3717 yyb12 = yyj12 > l
3718 } else {
3719 yyb12 = r.CheckBreak()
3720 }
3721 if yyb12 {
3722 break
3723 }
3724 r.ReadArrayElem()
3725 z.DecStructFieldNotFound(yyj12-1, "")
3726 }
3727 r.ReadArrayEnd()
3728}
3729
3730func (x *setAction) CodecEncodeSelf(e *codec1978.Encoder) {
3731 var h codecSelfer7612
3732 z, r := codec1978.GenHelperEncoder(e)
3733 _, _, _ = h, z, r
3734 if x == nil {
3735 r.EncodeNil()
3736 } else {
3737 yym1 := z.EncBinary()
3738 _ = yym1
3739 if false {
3740 } else if z.HasExtensions() && z.EncExt(x) {
3741 } else {
3742 yysep2 := !z.EncBinary()
3743 yy2arr2 := z.EncBasicHandle().StructToArray
3744 _, _ = yysep2, yy2arr2
3745 const yyr2 bool = false
3746 if yyr2 || yy2arr2 {
3747 r.WriteArrayStart(10)
3748 } else {
3749 r.WriteMapStart(10)
3750 }
3751 if yyr2 || yy2arr2 {
3752 r.WriteArrayElem()
3753 yym4 := z.EncBinary()
3754 _ = yym4
3755 if false {
3756 } else {
3757 r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
3758 }
3759 } else {
3760 r.WriteMapElemKey()
3761 r.EncodeString(codecSelferC_UTF87612, string("Prefix"))
3762 r.WriteMapElemValue()
3763 yym5 := z.EncBinary()
3764 _ = yym5
3765 if false {
3766 } else {
3767 r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
3768 }
3769 }
3770 if yyr2 || yy2arr2 {
3771 r.WriteArrayElem()
3772 yym7 := z.EncBinary()
3773 _ = yym7
3774 if false {
3775 } else {
3776 r.EncodeString(codecSelferC_UTF87612, string(x.Key))
3777 }
3778 } else {
3779 r.WriteMapElemKey()
3780 r.EncodeString(codecSelferC_UTF87612, string("Key"))
3781 r.WriteMapElemValue()
3782 yym8 := z.EncBinary()
3783 _ = yym8
3784 if false {
3785 } else {
3786 r.EncodeString(codecSelferC_UTF87612, string(x.Key))
3787 }
3788 }
3789 if yyr2 || yy2arr2 {
3790 r.WriteArrayElem()
3791 yym10 := z.EncBinary()
3792 _ = yym10
3793 if false {
3794 } else {
3795 r.EncodeString(codecSelferC_UTF87612, string(x.Value))
3796 }
3797 } else {
3798 r.WriteMapElemKey()
3799 r.EncodeString(codecSelferC_UTF87612, string("Value"))
3800 r.WriteMapElemValue()
3801 yym11 := z.EncBinary()
3802 _ = yym11
3803 if false {
3804 } else {
3805 r.EncodeString(codecSelferC_UTF87612, string(x.Value))
3806 }
3807 }
3808 if yyr2 || yy2arr2 {
3809 r.WriteArrayElem()
3810 yym13 := z.EncBinary()
3811 _ = yym13
3812 if false {
3813 } else {
3814 r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue))
3815 }
3816 } else {
3817 r.WriteMapElemKey()
3818 r.EncodeString(codecSelferC_UTF87612, string("PrevValue"))
3819 r.WriteMapElemValue()
3820 yym14 := z.EncBinary()
3821 _ = yym14
3822 if false {
3823 } else {
3824 r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue))
3825 }
3826 }
3827 if yyr2 || yy2arr2 {
3828 r.WriteArrayElem()
3829 yym16 := z.EncBinary()
3830 _ = yym16
3831 if false {
3832 } else {
3833 r.EncodeUint(uint64(x.PrevIndex))
3834 }
3835 } else {
3836 r.WriteMapElemKey()
3837 r.EncodeString(codecSelferC_UTF87612, string("PrevIndex"))
3838 r.WriteMapElemValue()
3839 yym17 := z.EncBinary()
3840 _ = yym17
3841 if false {
3842 } else {
3843 r.EncodeUint(uint64(x.PrevIndex))
3844 }
3845 }
3846 if yyr2 || yy2arr2 {
3847 r.WriteArrayElem()
3848 x.PrevExist.CodecEncodeSelf(e)
3849 } else {
3850 r.WriteMapElemKey()
3851 r.EncodeString(codecSelferC_UTF87612, string("PrevExist"))
3852 r.WriteMapElemValue()
3853 x.PrevExist.CodecEncodeSelf(e)
3854 }
3855 if yyr2 || yy2arr2 {
3856 r.WriteArrayElem()
3857 yym22 := z.EncBinary()
3858 _ = yym22
3859 if false {
3860 } else if z.HasExtensions() && z.EncExt(x.TTL) {
3861 } else {
3862 r.EncodeInt(int64(x.TTL))
3863 }
3864 } else {
3865 r.WriteMapElemKey()
3866 r.EncodeString(codecSelferC_UTF87612, string("TTL"))
3867 r.WriteMapElemValue()
3868 yym23 := z.EncBinary()
3869 _ = yym23
3870 if false {
3871 } else if z.HasExtensions() && z.EncExt(x.TTL) {
3872 } else {
3873 r.EncodeInt(int64(x.TTL))
3874 }
3875 }
3876 if yyr2 || yy2arr2 {
3877 r.WriteArrayElem()
3878 yym25 := z.EncBinary()
3879 _ = yym25
3880 if false {
3881 } else {
3882 r.EncodeBool(bool(x.Refresh))
3883 }
3884 } else {
3885 r.WriteMapElemKey()
3886 r.EncodeString(codecSelferC_UTF87612, string("Refresh"))
3887 r.WriteMapElemValue()
3888 yym26 := z.EncBinary()
3889 _ = yym26
3890 if false {
3891 } else {
3892 r.EncodeBool(bool(x.Refresh))
3893 }
3894 }
3895 if yyr2 || yy2arr2 {
3896 r.WriteArrayElem()
3897 yym28 := z.EncBinary()
3898 _ = yym28
3899 if false {
3900 } else {
3901 r.EncodeBool(bool(x.Dir))
3902 }
3903 } else {
3904 r.WriteMapElemKey()
3905 r.EncodeString(codecSelferC_UTF87612, string("Dir"))
3906 r.WriteMapElemValue()
3907 yym29 := z.EncBinary()
3908 _ = yym29
3909 if false {
3910 } else {
3911 r.EncodeBool(bool(x.Dir))
3912 }
3913 }
3914 if yyr2 || yy2arr2 {
3915 r.WriteArrayElem()
3916 yym31 := z.EncBinary()
3917 _ = yym31
3918 if false {
3919 } else {
3920 r.EncodeBool(bool(x.NoValueOnSuccess))
3921 }
3922 } else {
3923 r.WriteMapElemKey()
3924 r.EncodeString(codecSelferC_UTF87612, string("NoValueOnSuccess"))
3925 r.WriteMapElemValue()
3926 yym32 := z.EncBinary()
3927 _ = yym32
3928 if false {
3929 } else {
3930 r.EncodeBool(bool(x.NoValueOnSuccess))
3931 }
3932 }
3933 if yyr2 || yy2arr2 {
3934 r.WriteArrayEnd()
3935 } else {
3936 r.WriteMapEnd()
3937 }
3938 }
3939 }
3940}
3941
3942func (x *setAction) CodecDecodeSelf(d *codec1978.Decoder) {
3943 var h codecSelfer7612
3944 z, r := codec1978.GenHelperDecoder(d)
3945 _, _, _ = h, z, r
3946 yym1 := z.DecBinary()
3947 _ = yym1
3948 if false {
3949 } else if z.HasExtensions() && z.DecExt(x) {
3950 } else {
3951 yyct2 := r.ContainerType()
3952 if yyct2 == codecSelferValueTypeMap7612 {
3953 yyl2 := r.ReadMapStart()
3954 if yyl2 == 0 {
3955 r.ReadMapEnd()
3956 } else {
3957 x.codecDecodeSelfFromMap(yyl2, d)
3958 }
3959 } else if yyct2 == codecSelferValueTypeArray7612 {
3960 yyl2 := r.ReadArrayStart()
3961 if yyl2 == 0 {
3962 r.ReadArrayEnd()
3963 } else {
3964 x.codecDecodeSelfFromArray(yyl2, d)
3965 }
3966 } else {
3967 panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
3968 }
3969 }
3970}
3971
3972func (x *setAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
3973 var h codecSelfer7612
3974 z, r := codec1978.GenHelperDecoder(d)
3975 _, _, _ = h, z, r
3976 var yys3Slc = z.DecScratchBuffer() // default slice to decode into
3977 _ = yys3Slc
3978 var yyhl3 bool = l >= 0
3979 for yyj3 := 0; ; yyj3++ {
3980 if yyhl3 {
3981 if yyj3 >= l {
3982 break
3983 }
3984 } else {
3985 if r.CheckBreak() {
3986 break
3987 }
3988 }
3989 r.ReadMapElemKey()
3990 yys3Slc = r.DecodeStringAsBytes()
3991 yys3 := string(yys3Slc)
3992 r.ReadMapElemValue()
3993 switch yys3 {
3994 case "Prefix":
3995 if r.TryDecodeAsNil() {
3996 x.Prefix = ""
3997 } else {
3998 yyv4 := &x.Prefix
3999 yym5 := z.DecBinary()
4000 _ = yym5
4001 if false {
4002 } else {
4003 *((*string)(yyv4)) = r.DecodeString()
4004 }
4005 }
4006 case "Key":
4007 if r.TryDecodeAsNil() {
4008 x.Key = ""
4009 } else {
4010 yyv6 := &x.Key
4011 yym7 := z.DecBinary()
4012 _ = yym7
4013 if false {
4014 } else {
4015 *((*string)(yyv6)) = r.DecodeString()
4016 }
4017 }
4018 case "Value":
4019 if r.TryDecodeAsNil() {
4020 x.Value = ""
4021 } else {
4022 yyv8 := &x.Value
4023 yym9 := z.DecBinary()
4024 _ = yym9
4025 if false {
4026 } else {
4027 *((*string)(yyv8)) = r.DecodeString()
4028 }
4029 }
4030 case "PrevValue":
4031 if r.TryDecodeAsNil() {
4032 x.PrevValue = ""
4033 } else {
4034 yyv10 := &x.PrevValue
4035 yym11 := z.DecBinary()
4036 _ = yym11
4037 if false {
4038 } else {
4039 *((*string)(yyv10)) = r.DecodeString()
4040 }
4041 }
4042 case "PrevIndex":
4043 if r.TryDecodeAsNil() {
4044 x.PrevIndex = 0
4045 } else {
4046 yyv12 := &x.PrevIndex
4047 yym13 := z.DecBinary()
4048 _ = yym13
4049 if false {
4050 } else {
4051 *((*uint64)(yyv12)) = uint64(r.DecodeUint(64))
4052 }
4053 }
4054 case "PrevExist":
4055 if r.TryDecodeAsNil() {
4056 x.PrevExist = ""
4057 } else {
4058 yyv14 := &x.PrevExist
4059 yyv14.CodecDecodeSelf(d)
4060 }
4061 case "TTL":
4062 if r.TryDecodeAsNil() {
4063 x.TTL = 0
4064 } else {
4065 yyv15 := &x.TTL
4066 yym16 := z.DecBinary()
4067 _ = yym16
4068 if false {
4069 } else if z.HasExtensions() && z.DecExt(yyv15) {
4070 } else {
4071 *((*int64)(yyv15)) = int64(r.DecodeInt(64))
4072 }
4073 }
4074 case "Refresh":
4075 if r.TryDecodeAsNil() {
4076 x.Refresh = false
4077 } else {
4078 yyv17 := &x.Refresh
4079 yym18 := z.DecBinary()
4080 _ = yym18
4081 if false {
4082 } else {
4083 *((*bool)(yyv17)) = r.DecodeBool()
4084 }
4085 }
4086 case "Dir":
4087 if r.TryDecodeAsNil() {
4088 x.Dir = false
4089 } else {
4090 yyv19 := &x.Dir
4091 yym20 := z.DecBinary()
4092 _ = yym20
4093 if false {
4094 } else {
4095 *((*bool)(yyv19)) = r.DecodeBool()
4096 }
4097 }
4098 case "NoValueOnSuccess":
4099 if r.TryDecodeAsNil() {
4100 x.NoValueOnSuccess = false
4101 } else {
4102 yyv21 := &x.NoValueOnSuccess
4103 yym22 := z.DecBinary()
4104 _ = yym22
4105 if false {
4106 } else {
4107 *((*bool)(yyv21)) = r.DecodeBool()
4108 }
4109 }
4110 default:
4111 z.DecStructFieldNotFound(-1, yys3)
4112 } // end switch yys3
4113 } // end for yyj3
4114 r.ReadMapEnd()
4115}
4116
4117func (x *setAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
4118 var h codecSelfer7612
4119 z, r := codec1978.GenHelperDecoder(d)
4120 _, _, _ = h, z, r
4121 var yyj23 int
4122 var yyb23 bool
4123 var yyhl23 bool = l >= 0
4124 yyj23++
4125 if yyhl23 {
4126 yyb23 = yyj23 > l
4127 } else {
4128 yyb23 = r.CheckBreak()
4129 }
4130 if yyb23 {
4131 r.ReadArrayEnd()
4132 return
4133 }
4134 r.ReadArrayElem()
4135 if r.TryDecodeAsNil() {
4136 x.Prefix = ""
4137 } else {
4138 yyv24 := &x.Prefix
4139 yym25 := z.DecBinary()
4140 _ = yym25
4141 if false {
4142 } else {
4143 *((*string)(yyv24)) = r.DecodeString()
4144 }
4145 }
4146 yyj23++
4147 if yyhl23 {
4148 yyb23 = yyj23 > l
4149 } else {
4150 yyb23 = r.CheckBreak()
4151 }
4152 if yyb23 {
4153 r.ReadArrayEnd()
4154 return
4155 }
4156 r.ReadArrayElem()
4157 if r.TryDecodeAsNil() {
4158 x.Key = ""
4159 } else {
4160 yyv26 := &x.Key
4161 yym27 := z.DecBinary()
4162 _ = yym27
4163 if false {
4164 } else {
4165 *((*string)(yyv26)) = r.DecodeString()
4166 }
4167 }
4168 yyj23++
4169 if yyhl23 {
4170 yyb23 = yyj23 > l
4171 } else {
4172 yyb23 = r.CheckBreak()
4173 }
4174 if yyb23 {
4175 r.ReadArrayEnd()
4176 return
4177 }
4178 r.ReadArrayElem()
4179 if r.TryDecodeAsNil() {
4180 x.Value = ""
4181 } else {
4182 yyv28 := &x.Value
4183 yym29 := z.DecBinary()
4184 _ = yym29
4185 if false {
4186 } else {
4187 *((*string)(yyv28)) = r.DecodeString()
4188 }
4189 }
4190 yyj23++
4191 if yyhl23 {
4192 yyb23 = yyj23 > l
4193 } else {
4194 yyb23 = r.CheckBreak()
4195 }
4196 if yyb23 {
4197 r.ReadArrayEnd()
4198 return
4199 }
4200 r.ReadArrayElem()
4201 if r.TryDecodeAsNil() {
4202 x.PrevValue = ""
4203 } else {
4204 yyv30 := &x.PrevValue
4205 yym31 := z.DecBinary()
4206 _ = yym31
4207 if false {
4208 } else {
4209 *((*string)(yyv30)) = r.DecodeString()
4210 }
4211 }
4212 yyj23++
4213 if yyhl23 {
4214 yyb23 = yyj23 > l
4215 } else {
4216 yyb23 = r.CheckBreak()
4217 }
4218 if yyb23 {
4219 r.ReadArrayEnd()
4220 return
4221 }
4222 r.ReadArrayElem()
4223 if r.TryDecodeAsNil() {
4224 x.PrevIndex = 0
4225 } else {
4226 yyv32 := &x.PrevIndex
4227 yym33 := z.DecBinary()
4228 _ = yym33
4229 if false {
4230 } else {
4231 *((*uint64)(yyv32)) = uint64(r.DecodeUint(64))
4232 }
4233 }
4234 yyj23++
4235 if yyhl23 {
4236 yyb23 = yyj23 > l
4237 } else {
4238 yyb23 = r.CheckBreak()
4239 }
4240 if yyb23 {
4241 r.ReadArrayEnd()
4242 return
4243 }
4244 r.ReadArrayElem()
4245 if r.TryDecodeAsNil() {
4246 x.PrevExist = ""
4247 } else {
4248 yyv34 := &x.PrevExist
4249 yyv34.CodecDecodeSelf(d)
4250 }
4251 yyj23++
4252 if yyhl23 {
4253 yyb23 = yyj23 > l
4254 } else {
4255 yyb23 = r.CheckBreak()
4256 }
4257 if yyb23 {
4258 r.ReadArrayEnd()
4259 return
4260 }
4261 r.ReadArrayElem()
4262 if r.TryDecodeAsNil() {
4263 x.TTL = 0
4264 } else {
4265 yyv35 := &x.TTL
4266 yym36 := z.DecBinary()
4267 _ = yym36
4268 if false {
4269 } else if z.HasExtensions() && z.DecExt(yyv35) {
4270 } else {
4271 *((*int64)(yyv35)) = int64(r.DecodeInt(64))
4272 }
4273 }
4274 yyj23++
4275 if yyhl23 {
4276 yyb23 = yyj23 > l
4277 } else {
4278 yyb23 = r.CheckBreak()
4279 }
4280 if yyb23 {
4281 r.ReadArrayEnd()
4282 return
4283 }
4284 r.ReadArrayElem()
4285 if r.TryDecodeAsNil() {
4286 x.Refresh = false
4287 } else {
4288 yyv37 := &x.Refresh
4289 yym38 := z.DecBinary()
4290 _ = yym38
4291 if false {
4292 } else {
4293 *((*bool)(yyv37)) = r.DecodeBool()
4294 }
4295 }
4296 yyj23++
4297 if yyhl23 {
4298 yyb23 = yyj23 > l
4299 } else {
4300 yyb23 = r.CheckBreak()
4301 }
4302 if yyb23 {
4303 r.ReadArrayEnd()
4304 return
4305 }
4306 r.ReadArrayElem()
4307 if r.TryDecodeAsNil() {
4308 x.Dir = false
4309 } else {
4310 yyv39 := &x.Dir
4311 yym40 := z.DecBinary()
4312 _ = yym40
4313 if false {
4314 } else {
4315 *((*bool)(yyv39)) = r.DecodeBool()
4316 }
4317 }
4318 yyj23++
4319 if yyhl23 {
4320 yyb23 = yyj23 > l
4321 } else {
4322 yyb23 = r.CheckBreak()
4323 }
4324 if yyb23 {
4325 r.ReadArrayEnd()
4326 return
4327 }
4328 r.ReadArrayElem()
4329 if r.TryDecodeAsNil() {
4330 x.NoValueOnSuccess = false
4331 } else {
4332 yyv41 := &x.NoValueOnSuccess
4333 yym42 := z.DecBinary()
4334 _ = yym42
4335 if false {
4336 } else {
4337 *((*bool)(yyv41)) = r.DecodeBool()
4338 }
4339 }
4340 for {
4341 yyj23++
4342 if yyhl23 {
4343 yyb23 = yyj23 > l
4344 } else {
4345 yyb23 = r.CheckBreak()
4346 }
4347 if yyb23 {
4348 break
4349 }
4350 r.ReadArrayElem()
4351 z.DecStructFieldNotFound(yyj23-1, "")
4352 }
4353 r.ReadArrayEnd()
4354}
4355
4356func (x *deleteAction) CodecEncodeSelf(e *codec1978.Encoder) {
4357 var h codecSelfer7612
4358 z, r := codec1978.GenHelperEncoder(e)
4359 _, _, _ = h, z, r
4360 if x == nil {
4361 r.EncodeNil()
4362 } else {
4363 yym1 := z.EncBinary()
4364 _ = yym1
4365 if false {
4366 } else if z.HasExtensions() && z.EncExt(x) {
4367 } else {
4368 yysep2 := !z.EncBinary()
4369 yy2arr2 := z.EncBasicHandle().StructToArray
4370 _, _ = yysep2, yy2arr2
4371 const yyr2 bool = false
4372 if yyr2 || yy2arr2 {
4373 r.WriteArrayStart(6)
4374 } else {
4375 r.WriteMapStart(6)
4376 }
4377 if yyr2 || yy2arr2 {
4378 r.WriteArrayElem()
4379 yym4 := z.EncBinary()
4380 _ = yym4
4381 if false {
4382 } else {
4383 r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
4384 }
4385 } else {
4386 r.WriteMapElemKey()
4387 r.EncodeString(codecSelferC_UTF87612, string("Prefix"))
4388 r.WriteMapElemValue()
4389 yym5 := z.EncBinary()
4390 _ = yym5
4391 if false {
4392 } else {
4393 r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
4394 }
4395 }
4396 if yyr2 || yy2arr2 {
4397 r.WriteArrayElem()
4398 yym7 := z.EncBinary()
4399 _ = yym7
4400 if false {
4401 } else {
4402 r.EncodeString(codecSelferC_UTF87612, string(x.Key))
4403 }
4404 } else {
4405 r.WriteMapElemKey()
4406 r.EncodeString(codecSelferC_UTF87612, string("Key"))
4407 r.WriteMapElemValue()
4408 yym8 := z.EncBinary()
4409 _ = yym8
4410 if false {
4411 } else {
4412 r.EncodeString(codecSelferC_UTF87612, string(x.Key))
4413 }
4414 }
4415 if yyr2 || yy2arr2 {
4416 r.WriteArrayElem()
4417 yym10 := z.EncBinary()
4418 _ = yym10
4419 if false {
4420 } else {
4421 r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue))
4422 }
4423 } else {
4424 r.WriteMapElemKey()
4425 r.EncodeString(codecSelferC_UTF87612, string("PrevValue"))
4426 r.WriteMapElemValue()
4427 yym11 := z.EncBinary()
4428 _ = yym11
4429 if false {
4430 } else {
4431 r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue))
4432 }
4433 }
4434 if yyr2 || yy2arr2 {
4435 r.WriteArrayElem()
4436 yym13 := z.EncBinary()
4437 _ = yym13
4438 if false {
4439 } else {
4440 r.EncodeUint(uint64(x.PrevIndex))
4441 }
4442 } else {
4443 r.WriteMapElemKey()
4444 r.EncodeString(codecSelferC_UTF87612, string("PrevIndex"))
4445 r.WriteMapElemValue()
4446 yym14 := z.EncBinary()
4447 _ = yym14
4448 if false {
4449 } else {
4450 r.EncodeUint(uint64(x.PrevIndex))
4451 }
4452 }
4453 if yyr2 || yy2arr2 {
4454 r.WriteArrayElem()
4455 yym16 := z.EncBinary()
4456 _ = yym16
4457 if false {
4458 } else {
4459 r.EncodeBool(bool(x.Dir))
4460 }
4461 } else {
4462 r.WriteMapElemKey()
4463 r.EncodeString(codecSelferC_UTF87612, string("Dir"))
4464 r.WriteMapElemValue()
4465 yym17 := z.EncBinary()
4466 _ = yym17
4467 if false {
4468 } else {
4469 r.EncodeBool(bool(x.Dir))
4470 }
4471 }
4472 if yyr2 || yy2arr2 {
4473 r.WriteArrayElem()
4474 yym19 := z.EncBinary()
4475 _ = yym19
4476 if false {
4477 } else {
4478 r.EncodeBool(bool(x.Recursive))
4479 }
4480 } else {
4481 r.WriteMapElemKey()
4482 r.EncodeString(codecSelferC_UTF87612, string("Recursive"))
4483 r.WriteMapElemValue()
4484 yym20 := z.EncBinary()
4485 _ = yym20
4486 if false {
4487 } else {
4488 r.EncodeBool(bool(x.Recursive))
4489 }
4490 }
4491 if yyr2 || yy2arr2 {
4492 r.WriteArrayEnd()
4493 } else {
4494 r.WriteMapEnd()
4495 }
4496 }
4497 }
4498}
4499
4500func (x *deleteAction) CodecDecodeSelf(d *codec1978.Decoder) {
4501 var h codecSelfer7612
4502 z, r := codec1978.GenHelperDecoder(d)
4503 _, _, _ = h, z, r
4504 yym1 := z.DecBinary()
4505 _ = yym1
4506 if false {
4507 } else if z.HasExtensions() && z.DecExt(x) {
4508 } else {
4509 yyct2 := r.ContainerType()
4510 if yyct2 == codecSelferValueTypeMap7612 {
4511 yyl2 := r.ReadMapStart()
4512 if yyl2 == 0 {
4513 r.ReadMapEnd()
4514 } else {
4515 x.codecDecodeSelfFromMap(yyl2, d)
4516 }
4517 } else if yyct2 == codecSelferValueTypeArray7612 {
4518 yyl2 := r.ReadArrayStart()
4519 if yyl2 == 0 {
4520 r.ReadArrayEnd()
4521 } else {
4522 x.codecDecodeSelfFromArray(yyl2, d)
4523 }
4524 } else {
4525 panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
4526 }
4527 }
4528}
4529
4530func (x *deleteAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
4531 var h codecSelfer7612
4532 z, r := codec1978.GenHelperDecoder(d)
4533 _, _, _ = h, z, r
4534 var yys3Slc = z.DecScratchBuffer() // default slice to decode into
4535 _ = yys3Slc
4536 var yyhl3 bool = l >= 0
4537 for yyj3 := 0; ; yyj3++ {
4538 if yyhl3 {
4539 if yyj3 >= l {
4540 break
4541 }
4542 } else {
4543 if r.CheckBreak() {
4544 break
4545 }
4546 }
4547 r.ReadMapElemKey()
4548 yys3Slc = r.DecodeStringAsBytes()
4549 yys3 := string(yys3Slc)
4550 r.ReadMapElemValue()
4551 switch yys3 {
4552 case "Prefix":
4553 if r.TryDecodeAsNil() {
4554 x.Prefix = ""
4555 } else {
4556 yyv4 := &x.Prefix
4557 yym5 := z.DecBinary()
4558 _ = yym5
4559 if false {
4560 } else {
4561 *((*string)(yyv4)) = r.DecodeString()
4562 }
4563 }
4564 case "Key":
4565 if r.TryDecodeAsNil() {
4566 x.Key = ""
4567 } else {
4568 yyv6 := &x.Key
4569 yym7 := z.DecBinary()
4570 _ = yym7
4571 if false {
4572 } else {
4573 *((*string)(yyv6)) = r.DecodeString()
4574 }
4575 }
4576 case "PrevValue":
4577 if r.TryDecodeAsNil() {
4578 x.PrevValue = ""
4579 } else {
4580 yyv8 := &x.PrevValue
4581 yym9 := z.DecBinary()
4582 _ = yym9
4583 if false {
4584 } else {
4585 *((*string)(yyv8)) = r.DecodeString()
4586 }
4587 }
4588 case "PrevIndex":
4589 if r.TryDecodeAsNil() {
4590 x.PrevIndex = 0
4591 } else {
4592 yyv10 := &x.PrevIndex
4593 yym11 := z.DecBinary()
4594 _ = yym11
4595 if false {
4596 } else {
4597 *((*uint64)(yyv10)) = uint64(r.DecodeUint(64))
4598 }
4599 }
4600 case "Dir":
4601 if r.TryDecodeAsNil() {
4602 x.Dir = false
4603 } else {
4604 yyv12 := &x.Dir
4605 yym13 := z.DecBinary()
4606 _ = yym13
4607 if false {
4608 } else {
4609 *((*bool)(yyv12)) = r.DecodeBool()
4610 }
4611 }
4612 case "Recursive":
4613 if r.TryDecodeAsNil() {
4614 x.Recursive = false
4615 } else {
4616 yyv14 := &x.Recursive
4617 yym15 := z.DecBinary()
4618 _ = yym15
4619 if false {
4620 } else {
4621 *((*bool)(yyv14)) = r.DecodeBool()
4622 }
4623 }
4624 default:
4625 z.DecStructFieldNotFound(-1, yys3)
4626 } // end switch yys3
4627 } // end for yyj3
4628 r.ReadMapEnd()
4629}
4630
4631func (x *deleteAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
4632 var h codecSelfer7612
4633 z, r := codec1978.GenHelperDecoder(d)
4634 _, _, _ = h, z, r
4635 var yyj16 int
4636 var yyb16 bool
4637 var yyhl16 bool = l >= 0
4638 yyj16++
4639 if yyhl16 {
4640 yyb16 = yyj16 > l
4641 } else {
4642 yyb16 = r.CheckBreak()
4643 }
4644 if yyb16 {
4645 r.ReadArrayEnd()
4646 return
4647 }
4648 r.ReadArrayElem()
4649 if r.TryDecodeAsNil() {
4650 x.Prefix = ""
4651 } else {
4652 yyv17 := &x.Prefix
4653 yym18 := z.DecBinary()
4654 _ = yym18
4655 if false {
4656 } else {
4657 *((*string)(yyv17)) = r.DecodeString()
4658 }
4659 }
4660 yyj16++
4661 if yyhl16 {
4662 yyb16 = yyj16 > l
4663 } else {
4664 yyb16 = r.CheckBreak()
4665 }
4666 if yyb16 {
4667 r.ReadArrayEnd()
4668 return
4669 }
4670 r.ReadArrayElem()
4671 if r.TryDecodeAsNil() {
4672 x.Key = ""
4673 } else {
4674 yyv19 := &x.Key
4675 yym20 := z.DecBinary()
4676 _ = yym20
4677 if false {
4678 } else {
4679 *((*string)(yyv19)) = r.DecodeString()
4680 }
4681 }
4682 yyj16++
4683 if yyhl16 {
4684 yyb16 = yyj16 > l
4685 } else {
4686 yyb16 = r.CheckBreak()
4687 }
4688 if yyb16 {
4689 r.ReadArrayEnd()
4690 return
4691 }
4692 r.ReadArrayElem()
4693 if r.TryDecodeAsNil() {
4694 x.PrevValue = ""
4695 } else {
4696 yyv21 := &x.PrevValue
4697 yym22 := z.DecBinary()
4698 _ = yym22
4699 if false {
4700 } else {
4701 *((*string)(yyv21)) = r.DecodeString()
4702 }
4703 }
4704 yyj16++
4705 if yyhl16 {
4706 yyb16 = yyj16 > l
4707 } else {
4708 yyb16 = r.CheckBreak()
4709 }
4710 if yyb16 {
4711 r.ReadArrayEnd()
4712 return
4713 }
4714 r.ReadArrayElem()
4715 if r.TryDecodeAsNil() {
4716 x.PrevIndex = 0
4717 } else {
4718 yyv23 := &x.PrevIndex
4719 yym24 := z.DecBinary()
4720 _ = yym24
4721 if false {
4722 } else {
4723 *((*uint64)(yyv23)) = uint64(r.DecodeUint(64))
4724 }
4725 }
4726 yyj16++
4727 if yyhl16 {
4728 yyb16 = yyj16 > l
4729 } else {
4730 yyb16 = r.CheckBreak()
4731 }
4732 if yyb16 {
4733 r.ReadArrayEnd()
4734 return
4735 }
4736 r.ReadArrayElem()
4737 if r.TryDecodeAsNil() {
4738 x.Dir = false
4739 } else {
4740 yyv25 := &x.Dir
4741 yym26 := z.DecBinary()
4742 _ = yym26
4743 if false {
4744 } else {
4745 *((*bool)(yyv25)) = r.DecodeBool()
4746 }
4747 }
4748 yyj16++
4749 if yyhl16 {
4750 yyb16 = yyj16 > l
4751 } else {
4752 yyb16 = r.CheckBreak()
4753 }
4754 if yyb16 {
4755 r.ReadArrayEnd()
4756 return
4757 }
4758 r.ReadArrayElem()
4759 if r.TryDecodeAsNil() {
4760 x.Recursive = false
4761 } else {
4762 yyv27 := &x.Recursive
4763 yym28 := z.DecBinary()
4764 _ = yym28
4765 if false {
4766 } else {
4767 *((*bool)(yyv27)) = r.DecodeBool()
4768 }
4769 }
4770 for {
4771 yyj16++
4772 if yyhl16 {
4773 yyb16 = yyj16 > l
4774 } else {
4775 yyb16 = r.CheckBreak()
4776 }
4777 if yyb16 {
4778 break
4779 }
4780 r.ReadArrayElem()
4781 z.DecStructFieldNotFound(yyj16-1, "")
4782 }
4783 r.ReadArrayEnd()
4784}
4785
4786func (x *createInOrderAction) CodecEncodeSelf(e *codec1978.Encoder) {
4787 var h codecSelfer7612
4788 z, r := codec1978.GenHelperEncoder(e)
4789 _, _, _ = h, z, r
4790 if x == nil {
4791 r.EncodeNil()
4792 } else {
4793 yym1 := z.EncBinary()
4794 _ = yym1
4795 if false {
4796 } else if z.HasExtensions() && z.EncExt(x) {
4797 } else {
4798 yysep2 := !z.EncBinary()
4799 yy2arr2 := z.EncBasicHandle().StructToArray
4800 _, _ = yysep2, yy2arr2
4801 const yyr2 bool = false
4802 if yyr2 || yy2arr2 {
4803 r.WriteArrayStart(4)
4804 } else {
4805 r.WriteMapStart(4)
4806 }
4807 if yyr2 || yy2arr2 {
4808 r.WriteArrayElem()
4809 yym4 := z.EncBinary()
4810 _ = yym4
4811 if false {
4812 } else {
4813 r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
4814 }
4815 } else {
4816 r.WriteMapElemKey()
4817 r.EncodeString(codecSelferC_UTF87612, string("Prefix"))
4818 r.WriteMapElemValue()
4819 yym5 := z.EncBinary()
4820 _ = yym5
4821 if false {
4822 } else {
4823 r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
4824 }
4825 }
4826 if yyr2 || yy2arr2 {
4827 r.WriteArrayElem()
4828 yym7 := z.EncBinary()
4829 _ = yym7
4830 if false {
4831 } else {
4832 r.EncodeString(codecSelferC_UTF87612, string(x.Dir))
4833 }
4834 } else {
4835 r.WriteMapElemKey()
4836 r.EncodeString(codecSelferC_UTF87612, string("Dir"))
4837 r.WriteMapElemValue()
4838 yym8 := z.EncBinary()
4839 _ = yym8
4840 if false {
4841 } else {
4842 r.EncodeString(codecSelferC_UTF87612, string(x.Dir))
4843 }
4844 }
4845 if yyr2 || yy2arr2 {
4846 r.WriteArrayElem()
4847 yym10 := z.EncBinary()
4848 _ = yym10
4849 if false {
4850 } else {
4851 r.EncodeString(codecSelferC_UTF87612, string(x.Value))
4852 }
4853 } else {
4854 r.WriteMapElemKey()
4855 r.EncodeString(codecSelferC_UTF87612, string("Value"))
4856 r.WriteMapElemValue()
4857 yym11 := z.EncBinary()
4858 _ = yym11
4859 if false {
4860 } else {
4861 r.EncodeString(codecSelferC_UTF87612, string(x.Value))
4862 }
4863 }
4864 if yyr2 || yy2arr2 {
4865 r.WriteArrayElem()
4866 yym13 := z.EncBinary()
4867 _ = yym13
4868 if false {
4869 } else if z.HasExtensions() && z.EncExt(x.TTL) {
4870 } else {
4871 r.EncodeInt(int64(x.TTL))
4872 }
4873 } else {
4874 r.WriteMapElemKey()
4875 r.EncodeString(codecSelferC_UTF87612, string("TTL"))
4876 r.WriteMapElemValue()
4877 yym14 := z.EncBinary()
4878 _ = yym14
4879 if false {
4880 } else if z.HasExtensions() && z.EncExt(x.TTL) {
4881 } else {
4882 r.EncodeInt(int64(x.TTL))
4883 }
4884 }
4885 if yyr2 || yy2arr2 {
4886 r.WriteArrayEnd()
4887 } else {
4888 r.WriteMapEnd()
4889 }
4890 }
4891 }
4892}
4893
4894func (x *createInOrderAction) CodecDecodeSelf(d *codec1978.Decoder) {
4895 var h codecSelfer7612
4896 z, r := codec1978.GenHelperDecoder(d)
4897 _, _, _ = h, z, r
4898 yym1 := z.DecBinary()
4899 _ = yym1
4900 if false {
4901 } else if z.HasExtensions() && z.DecExt(x) {
4902 } else {
4903 yyct2 := r.ContainerType()
4904 if yyct2 == codecSelferValueTypeMap7612 {
4905 yyl2 := r.ReadMapStart()
4906 if yyl2 == 0 {
4907 r.ReadMapEnd()
4908 } else {
4909 x.codecDecodeSelfFromMap(yyl2, d)
4910 }
4911 } else if yyct2 == codecSelferValueTypeArray7612 {
4912 yyl2 := r.ReadArrayStart()
4913 if yyl2 == 0 {
4914 r.ReadArrayEnd()
4915 } else {
4916 x.codecDecodeSelfFromArray(yyl2, d)
4917 }
4918 } else {
4919 panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
4920 }
4921 }
4922}
4923
4924func (x *createInOrderAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
4925 var h codecSelfer7612
4926 z, r := codec1978.GenHelperDecoder(d)
4927 _, _, _ = h, z, r
4928 var yys3Slc = z.DecScratchBuffer() // default slice to decode into
4929 _ = yys3Slc
4930 var yyhl3 bool = l >= 0
4931 for yyj3 := 0; ; yyj3++ {
4932 if yyhl3 {
4933 if yyj3 >= l {
4934 break
4935 }
4936 } else {
4937 if r.CheckBreak() {
4938 break
4939 }
4940 }
4941 r.ReadMapElemKey()
4942 yys3Slc = r.DecodeStringAsBytes()
4943 yys3 := string(yys3Slc)
4944 r.ReadMapElemValue()
4945 switch yys3 {
4946 case "Prefix":
4947 if r.TryDecodeAsNil() {
4948 x.Prefix = ""
4949 } else {
4950 yyv4 := &x.Prefix
4951 yym5 := z.DecBinary()
4952 _ = yym5
4953 if false {
4954 } else {
4955 *((*string)(yyv4)) = r.DecodeString()
4956 }
4957 }
4958 case "Dir":
4959 if r.TryDecodeAsNil() {
4960 x.Dir = ""
4961 } else {
4962 yyv6 := &x.Dir
4963 yym7 := z.DecBinary()
4964 _ = yym7
4965 if false {
4966 } else {
4967 *((*string)(yyv6)) = r.DecodeString()
4968 }
4969 }
4970 case "Value":
4971 if r.TryDecodeAsNil() {
4972 x.Value = ""
4973 } else {
4974 yyv8 := &x.Value
4975 yym9 := z.DecBinary()
4976 _ = yym9
4977 if false {
4978 } else {
4979 *((*string)(yyv8)) = r.DecodeString()
4980 }
4981 }
4982 case "TTL":
4983 if r.TryDecodeAsNil() {
4984 x.TTL = 0
4985 } else {
4986 yyv10 := &x.TTL
4987 yym11 := z.DecBinary()
4988 _ = yym11
4989 if false {
4990 } else if z.HasExtensions() && z.DecExt(yyv10) {
4991 } else {
4992 *((*int64)(yyv10)) = int64(r.DecodeInt(64))
4993 }
4994 }
4995 default:
4996 z.DecStructFieldNotFound(-1, yys3)
4997 } // end switch yys3
4998 } // end for yyj3
4999 r.ReadMapEnd()
5000}
5001
5002func (x *createInOrderAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
5003 var h codecSelfer7612
5004 z, r := codec1978.GenHelperDecoder(d)
5005 _, _, _ = h, z, r
5006 var yyj12 int
5007 var yyb12 bool
5008 var yyhl12 bool = l >= 0
5009 yyj12++
5010 if yyhl12 {
5011 yyb12 = yyj12 > l
5012 } else {
5013 yyb12 = r.CheckBreak()
5014 }
5015 if yyb12 {
5016 r.ReadArrayEnd()
5017 return
5018 }
5019 r.ReadArrayElem()
5020 if r.TryDecodeAsNil() {
5021 x.Prefix = ""
5022 } else {
5023 yyv13 := &x.Prefix
5024 yym14 := z.DecBinary()
5025 _ = yym14
5026 if false {
5027 } else {
5028 *((*string)(yyv13)) = r.DecodeString()
5029 }
5030 }
5031 yyj12++
5032 if yyhl12 {
5033 yyb12 = yyj12 > l
5034 } else {
5035 yyb12 = r.CheckBreak()
5036 }
5037 if yyb12 {
5038 r.ReadArrayEnd()
5039 return
5040 }
5041 r.ReadArrayElem()
5042 if r.TryDecodeAsNil() {
5043 x.Dir = ""
5044 } else {
5045 yyv15 := &x.Dir
5046 yym16 := z.DecBinary()
5047 _ = yym16
5048 if false {
5049 } else {
5050 *((*string)(yyv15)) = r.DecodeString()
5051 }
5052 }
5053 yyj12++
5054 if yyhl12 {
5055 yyb12 = yyj12 > l
5056 } else {
5057 yyb12 = r.CheckBreak()
5058 }
5059 if yyb12 {
5060 r.ReadArrayEnd()
5061 return
5062 }
5063 r.ReadArrayElem()
5064 if r.TryDecodeAsNil() {
5065 x.Value = ""
5066 } else {
5067 yyv17 := &x.Value
5068 yym18 := z.DecBinary()
5069 _ = yym18
5070 if false {
5071 } else {
5072 *((*string)(yyv17)) = r.DecodeString()
5073 }
5074 }
5075 yyj12++
5076 if yyhl12 {
5077 yyb12 = yyj12 > l
5078 } else {
5079 yyb12 = r.CheckBreak()
5080 }
5081 if yyb12 {
5082 r.ReadArrayEnd()
5083 return
5084 }
5085 r.ReadArrayElem()
5086 if r.TryDecodeAsNil() {
5087 x.TTL = 0
5088 } else {
5089 yyv19 := &x.TTL
5090 yym20 := z.DecBinary()
5091 _ = yym20
5092 if false {
5093 } else if z.HasExtensions() && z.DecExt(yyv19) {
5094 } else {
5095 *((*int64)(yyv19)) = int64(r.DecodeInt(64))
5096 }
5097 }
5098 for {
5099 yyj12++
5100 if yyhl12 {
5101 yyb12 = yyj12 > l
5102 } else {
5103 yyb12 = r.CheckBreak()
5104 }
5105 if yyb12 {
5106 break
5107 }
5108 r.ReadArrayElem()
5109 z.DecStructFieldNotFound(yyj12-1, "")
5110 }
5111 r.ReadArrayEnd()
5112}
5113
5114func (x codecSelfer7612) encNodes(v Nodes, e *codec1978.Encoder) {
5115 var h codecSelfer7612
5116 z, r := codec1978.GenHelperEncoder(e)
5117 _, _, _ = h, z, r
5118 r.WriteArrayStart(len(v))
5119 for _, yyv1 := range v {
5120 r.WriteArrayElem()
5121 if yyv1 == nil {
5122 r.EncodeNil()
5123 } else {
5124 yyv1.CodecEncodeSelf(e)
5125 }
5126 }
5127 r.WriteArrayEnd()
5128}
5129
5130func (x codecSelfer7612) decNodes(v *Nodes, d *codec1978.Decoder) {
5131 var h codecSelfer7612
5132 z, r := codec1978.GenHelperDecoder(d)
5133 _, _, _ = h, z, r
5134
5135 yyv1 := *v
5136 yyh1, yyl1 := z.DecSliceHelperStart()
5137 var yyc1 bool
5138 _ = yyc1
5139 if yyl1 == 0 {
5140 if yyv1 == nil {
5141 yyv1 = []*Node{}
5142 yyc1 = true
5143 } else if len(yyv1) != 0 {
5144 yyv1 = yyv1[:0]
5145 yyc1 = true
5146 }
5147 } else {
5148 yyhl1 := yyl1 > 0
5149 var yyrl1 int
5150 _ = yyrl1
5151 if yyhl1 {
5152 if yyl1 > cap(yyv1) {
5153 yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8)
5154 if yyrl1 <= cap(yyv1) {
5155 yyv1 = yyv1[:yyrl1]
5156 } else {
5157 yyv1 = make([]*Node, yyrl1)
5158 }
5159 yyc1 = true
5160 } else if yyl1 != len(yyv1) {
5161 yyv1 = yyv1[:yyl1]
5162 yyc1 = true
5163 }
5164 }
5165 var yyj1 int
5166 // var yydn1 bool
5167 for ; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ {
5168 if yyj1 == 0 && len(yyv1) == 0 {
5169 if yyhl1 {
5170 yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8)
5171 } else {
5172 yyrl1 = 8
5173 }
5174 yyv1 = make([]*Node, yyrl1)
5175 yyc1 = true
5176 }
5177 yyh1.ElemContainerState(yyj1)
5178 // yydn1 = r.TryDecodeAsNil()
5179
5180 // if indefinite, etc, then expand the slice if necessary
5181 var yydb1 bool
5182 if yyj1 >= len(yyv1) {
5183 yyv1 = append(yyv1, nil)
5184 yyc1 = true
5185
5186 }
5187 if yydb1 {
5188 z.DecSwallow()
5189 } else {
5190 if r.TryDecodeAsNil() {
5191 if yyv1[yyj1] != nil {
5192 *yyv1[yyj1] = Node{}
5193 }
5194 } else {
5195 if yyv1[yyj1] == nil {
5196 yyv1[yyj1] = new(Node)
5197 }
5198 yyw2 := yyv1[yyj1]
5199 yyw2.CodecDecodeSelf(d)
5200 }
5201
5202 }
5203
5204 }
5205 if yyj1 < len(yyv1) {
5206 yyv1 = yyv1[:yyj1]
5207 yyc1 = true
5208 } else if yyj1 == 0 && yyv1 == nil {
5209 yyv1 = make([]*Node, 0)
5210 yyc1 = true
5211 }
5212 }
5213 yyh1.End()
5214 if yyc1 {
5215 *v = yyv1
5216 }
5217
5218}