2015-08-17 03:41:14 +03:00
|
|
|
// ************************************************************
|
|
|
|
// DO NOT EDIT.
|
|
|
|
// THIS FILE IS AUTO-GENERATED BY codecgen.
|
|
|
|
// ************************************************************
|
|
|
|
|
|
|
|
package client
|
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
"fmt"
|
2015-08-17 04:13:44 +03:00
|
|
|
codec1978 "github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec"
|
2015-08-17 03:41:14 +03:00
|
|
|
"reflect"
|
|
|
|
"runtime"
|
2015-10-08 12:27:00 +03:00
|
|
|
time "time"
|
2015-08-17 03:41:14 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
2015-11-02 14:03:40 +03:00
|
|
|
// ----- content types ----
|
|
|
|
codecSelferC_UTF81819 = 1
|
|
|
|
codecSelferC_RAW1819 = 0
|
|
|
|
// ----- value types used ----
|
2015-10-08 12:27:00 +03:00
|
|
|
codecSelferValueTypeArray1819 = 10
|
|
|
|
codecSelferValueTypeMap1819 = 9
|
2015-11-02 14:03:40 +03:00
|
|
|
// ----- containerStateValues ----
|
|
|
|
codecSelfer_containerMapKey1819 = 2
|
|
|
|
codecSelfer_containerMapValue1819 = 3
|
|
|
|
codecSelfer_containerMapEnd1819 = 4
|
|
|
|
codecSelfer_containerArrayElem1819 = 6
|
|
|
|
codecSelfer_containerArrayEnd1819 = 7
|
2015-08-17 03:41:14 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2015-09-10 21:51:59 +03:00
|
|
|
codecSelferBitsize1819 = uint8(reflect.TypeOf(uint(0)).Bits())
|
|
|
|
codecSelferOnlyMapOrArrayEncodeToStructErr1819 = errors.New(`only encoded map or array can be decoded into a struct`)
|
2015-08-17 03:41:14 +03:00
|
|
|
)
|
|
|
|
|
2015-09-10 21:51:59 +03:00
|
|
|
type codecSelfer1819 struct{}
|
2015-08-17 03:41:14 +03:00
|
|
|
|
|
|
|
func init() {
|
2015-11-02 14:03:40 +03:00
|
|
|
if codec1978.GenVersion != 5 {
|
2015-08-17 03:41:14 +03:00
|
|
|
_, file, _, _ := runtime.Caller(0)
|
|
|
|
err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
|
2015-11-02 14:03:40 +03:00
|
|
|
5, codec1978.GenVersion, file)
|
2015-08-17 03:41:14 +03:00
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
if false { // reference the types, but skip this branch at build/run time
|
|
|
|
var v0 time.Time
|
|
|
|
_ = v0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *Response) CodecEncodeSelf(e *codec1978.Encoder) {
|
2015-09-10 21:51:59 +03:00
|
|
|
var h codecSelfer1819
|
2015-08-17 03:41:14 +03:00
|
|
|
z, r := codec1978.GenHelperEncoder(e)
|
|
|
|
_, _, _ = h, z, r
|
|
|
|
if x == nil {
|
|
|
|
r.EncodeNil()
|
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
yym1 := z.EncBinary()
|
|
|
|
_ = yym1
|
|
|
|
if false {
|
|
|
|
} else if z.HasExtensions() && z.EncExt(x) {
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
yysep2 := !z.EncBinary()
|
|
|
|
yy2arr2 := z.EncBasicHandle().StructToArray
|
|
|
|
var yyq2 [3]bool
|
|
|
|
_, _, _ = yysep2, yyq2, yy2arr2
|
|
|
|
const yyr2 bool = false
|
2015-11-02 14:03:40 +03:00
|
|
|
var yynn2 int
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyr2 || yy2arr2 {
|
|
|
|
r.EncodeArrayStart(3)
|
|
|
|
} else {
|
2015-11-02 14:03:40 +03:00
|
|
|
yynn2 = 3
|
2015-10-08 12:27:00 +03:00
|
|
|
for _, b := range yyq2 {
|
|
|
|
if b {
|
|
|
|
yynn2++
|
|
|
|
}
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
r.EncodeMapStart(yynn2)
|
2015-11-02 14:03:40 +03:00
|
|
|
yynn2 = 0
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyr2 || yy2arr2 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
yym4 := z.EncBinary()
|
|
|
|
_ = yym4
|
|
|
|
if false {
|
|
|
|
} else {
|
|
|
|
r.EncodeString(codecSelferC_UTF81819, string(x.Action))
|
|
|
|
}
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerMapKey1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
r.EncodeString(codecSelferC_UTF81819, string("action"))
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerMapValue1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
yym5 := z.EncBinary()
|
|
|
|
_ = yym5
|
|
|
|
if false {
|
|
|
|
} else {
|
|
|
|
r.EncodeString(codecSelferC_UTF81819, string(x.Action))
|
|
|
|
}
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyr2 || yy2arr2 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
if x.Node == nil {
|
|
|
|
r.EncodeNil()
|
|
|
|
} else {
|
|
|
|
x.Node.CodecEncodeSelf(e)
|
|
|
|
}
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerMapKey1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
r.EncodeString(codecSelferC_UTF81819, string("node"))
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerMapValue1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
if x.Node == nil {
|
|
|
|
r.EncodeNil()
|
|
|
|
} else {
|
|
|
|
x.Node.CodecEncodeSelf(e)
|
|
|
|
}
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyr2 || yy2arr2 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
if x.PrevNode == nil {
|
|
|
|
r.EncodeNil()
|
|
|
|
} else {
|
|
|
|
x.PrevNode.CodecEncodeSelf(e)
|
|
|
|
}
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerMapKey1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
r.EncodeString(codecSelferC_UTF81819, string("prevNode"))
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerMapValue1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
if x.PrevNode == nil {
|
|
|
|
r.EncodeNil()
|
|
|
|
} else {
|
|
|
|
x.PrevNode.CodecEncodeSelf(e)
|
|
|
|
}
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
if yyr2 || yy2arr2 {
|
|
|
|
z.EncSendContainerState(codecSelfer_containerArrayEnd1819)
|
|
|
|
} else {
|
|
|
|
z.EncSendContainerState(codecSelfer_containerMapEnd1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *Response) CodecDecodeSelf(d *codec1978.Decoder) {
|
2015-09-10 21:51:59 +03:00
|
|
|
var h codecSelfer1819
|
2015-08-17 03:41:14 +03:00
|
|
|
z, r := codec1978.GenHelperDecoder(d)
|
|
|
|
_, _, _ = h, z, r
|
2015-10-08 12:27:00 +03:00
|
|
|
yym8 := z.DecBinary()
|
|
|
|
_ = yym8
|
|
|
|
if false {
|
|
|
|
} else if z.HasExtensions() && z.DecExt(x) {
|
|
|
|
} else {
|
2015-11-02 14:03:40 +03:00
|
|
|
yyct9 := r.ContainerType()
|
|
|
|
if yyct9 == codecSelferValueTypeMap1819 {
|
2015-10-08 12:27:00 +03:00
|
|
|
yyl9 := r.ReadMapStart()
|
|
|
|
if yyl9 == 0 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerMapEnd1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
} else {
|
|
|
|
x.codecDecodeSelfFromMap(yyl9, d)
|
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
} else if yyct9 == codecSelferValueTypeArray1819 {
|
2015-10-08 12:27:00 +03:00
|
|
|
yyl9 := r.ReadArrayStart()
|
|
|
|
if yyl9 == 0 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
} else {
|
|
|
|
x.codecDecodeSelfFromArray(yyl9, d)
|
|
|
|
}
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *Response) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
2015-09-10 21:51:59 +03:00
|
|
|
var h codecSelfer1819
|
2015-08-17 03:41:14 +03:00
|
|
|
z, r := codec1978.GenHelperDecoder(d)
|
|
|
|
_, _, _ = h, z, r
|
2015-10-08 12:27:00 +03:00
|
|
|
var yys10Slc = z.DecScratchBuffer() // default slice to decode into
|
|
|
|
_ = yys10Slc
|
|
|
|
var yyhl10 bool = l >= 0
|
|
|
|
for yyj10 := 0; ; yyj10++ {
|
|
|
|
if yyhl10 {
|
|
|
|
if yyj10 >= l {
|
2015-08-17 03:41:14 +03:00
|
|
|
break
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if r.CheckBreak() {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerMapKey1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
yys10Slc = r.DecodeBytes(yys10Slc, true, true)
|
|
|
|
yys10 := string(yys10Slc)
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerMapValue1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
switch yys10 {
|
2015-08-17 03:41:14 +03:00
|
|
|
case "action":
|
|
|
|
if r.TryDecodeAsNil() {
|
|
|
|
x.Action = ""
|
|
|
|
} else {
|
|
|
|
x.Action = string(r.DecodeString())
|
|
|
|
}
|
|
|
|
case "node":
|
|
|
|
if r.TryDecodeAsNil() {
|
|
|
|
if x.Node != nil {
|
|
|
|
x.Node = nil
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if x.Node == nil {
|
|
|
|
x.Node = new(Node)
|
|
|
|
}
|
|
|
|
x.Node.CodecDecodeSelf(d)
|
|
|
|
}
|
|
|
|
case "prevNode":
|
|
|
|
if r.TryDecodeAsNil() {
|
|
|
|
if x.PrevNode != nil {
|
|
|
|
x.PrevNode = nil
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if x.PrevNode == nil {
|
|
|
|
x.PrevNode = new(Node)
|
|
|
|
}
|
|
|
|
x.PrevNode.CodecDecodeSelf(d)
|
|
|
|
}
|
|
|
|
default:
|
2015-10-08 12:27:00 +03:00
|
|
|
z.DecStructFieldNotFound(-1, yys10)
|
|
|
|
} // end switch yys10
|
|
|
|
} // end for yyj10
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerMapEnd1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x *Response) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
2015-09-10 21:51:59 +03:00
|
|
|
var h codecSelfer1819
|
2015-08-17 03:41:14 +03:00
|
|
|
z, r := codec1978.GenHelperDecoder(d)
|
|
|
|
_, _, _ = h, z, r
|
2015-10-08 12:27:00 +03:00
|
|
|
var yyj14 int
|
|
|
|
var yyb14 bool
|
|
|
|
var yyhl14 bool = l >= 0
|
|
|
|
yyj14++
|
|
|
|
if yyhl14 {
|
|
|
|
yyb14 = yyj14 > l
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
yyb14 = r.CheckBreak()
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyb14 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
return
|
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
if r.TryDecodeAsNil() {
|
|
|
|
x.Action = ""
|
|
|
|
} else {
|
|
|
|
x.Action = string(r.DecodeString())
|
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
yyj14++
|
|
|
|
if yyhl14 {
|
|
|
|
yyb14 = yyj14 > l
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
yyb14 = r.CheckBreak()
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyb14 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
return
|
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
if r.TryDecodeAsNil() {
|
|
|
|
if x.Node != nil {
|
|
|
|
x.Node = nil
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if x.Node == nil {
|
|
|
|
x.Node = new(Node)
|
|
|
|
}
|
|
|
|
x.Node.CodecDecodeSelf(d)
|
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
yyj14++
|
|
|
|
if yyhl14 {
|
|
|
|
yyb14 = yyj14 > l
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
yyb14 = r.CheckBreak()
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyb14 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
return
|
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
if r.TryDecodeAsNil() {
|
|
|
|
if x.PrevNode != nil {
|
|
|
|
x.PrevNode = nil
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if x.PrevNode == nil {
|
|
|
|
x.PrevNode = new(Node)
|
|
|
|
}
|
|
|
|
x.PrevNode.CodecDecodeSelf(d)
|
|
|
|
}
|
|
|
|
for {
|
2015-10-08 12:27:00 +03:00
|
|
|
yyj14++
|
|
|
|
if yyhl14 {
|
|
|
|
yyb14 = yyj14 > l
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
yyb14 = r.CheckBreak()
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyb14 {
|
2015-08-17 03:41:14 +03:00
|
|
|
break
|
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
z.DecStructFieldNotFound(yyj14-1, "")
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) {
|
2015-09-10 21:51:59 +03:00
|
|
|
var h codecSelfer1819
|
2015-08-17 03:41:14 +03:00
|
|
|
z, r := codec1978.GenHelperEncoder(e)
|
|
|
|
_, _, _ = h, z, r
|
|
|
|
if x == nil {
|
|
|
|
r.EncodeNil()
|
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
yym18 := z.EncBinary()
|
|
|
|
_ = yym18
|
|
|
|
if false {
|
|
|
|
} else if z.HasExtensions() && z.EncExt(x) {
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
yysep19 := !z.EncBinary()
|
|
|
|
yy2arr19 := z.EncBasicHandle().StructToArray
|
|
|
|
var yyq19 [8]bool
|
|
|
|
_, _, _ = yysep19, yyq19, yy2arr19
|
|
|
|
const yyr19 bool = false
|
|
|
|
yyq19[1] = x.Dir != false
|
|
|
|
yyq19[6] = x.Expiration != nil
|
|
|
|
yyq19[7] = x.TTL != 0
|
2015-11-02 14:03:40 +03:00
|
|
|
var yynn19 int
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyr19 || yy2arr19 {
|
|
|
|
r.EncodeArrayStart(8)
|
|
|
|
} else {
|
2015-11-02 14:03:40 +03:00
|
|
|
yynn19 = 5
|
2015-10-08 12:27:00 +03:00
|
|
|
for _, b := range yyq19 {
|
|
|
|
if b {
|
|
|
|
yynn19++
|
|
|
|
}
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
r.EncodeMapStart(yynn19)
|
2015-11-02 14:03:40 +03:00
|
|
|
yynn19 = 0
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyr19 || yy2arr19 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
yym21 := z.EncBinary()
|
|
|
|
_ = yym21
|
|
|
|
if false {
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
r.EncodeString(codecSelferC_UTF81819, string(x.Key))
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
|
|
|
} else {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerMapKey1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
r.EncodeString(codecSelferC_UTF81819, string("key"))
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerMapValue1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
yym22 := z.EncBinary()
|
|
|
|
_ = yym22
|
|
|
|
if false {
|
|
|
|
} else {
|
|
|
|
r.EncodeString(codecSelferC_UTF81819, string(x.Key))
|
|
|
|
}
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyr19 || yy2arr19 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyq19[1] {
|
|
|
|
yym24 := z.EncBinary()
|
|
|
|
_ = yym24
|
|
|
|
if false {
|
|
|
|
} else {
|
|
|
|
r.EncodeBool(bool(x.Dir))
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
r.EncodeBool(false)
|
|
|
|
}
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyq19[1] {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerMapKey1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
r.EncodeString(codecSelferC_UTF81819, string("dir"))
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerMapValue1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
yym25 := z.EncBinary()
|
|
|
|
_ = yym25
|
|
|
|
if false {
|
|
|
|
} else {
|
|
|
|
r.EncodeBool(bool(x.Dir))
|
|
|
|
}
|
|
|
|
}
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyr19 || yy2arr19 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
yym27 := z.EncBinary()
|
|
|
|
_ = yym27
|
|
|
|
if false {
|
|
|
|
} else {
|
|
|
|
r.EncodeString(codecSelferC_UTF81819, string(x.Value))
|
|
|
|
}
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerMapKey1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
r.EncodeString(codecSelferC_UTF81819, string("value"))
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerMapValue1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
yym28 := z.EncBinary()
|
|
|
|
_ = yym28
|
|
|
|
if false {
|
|
|
|
} else {
|
|
|
|
r.EncodeString(codecSelferC_UTF81819, string(x.Value))
|
|
|
|
}
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyr19 || yy2arr19 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
if x.Nodes == nil {
|
2015-08-17 03:41:14 +03:00
|
|
|
r.EncodeNil()
|
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
x.Nodes.CodecEncodeSelf(e)
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
|
|
|
} else {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerMapKey1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
r.EncodeString(codecSelferC_UTF81819, string("nodes"))
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerMapValue1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
if x.Nodes == nil {
|
|
|
|
r.EncodeNil()
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
x.Nodes.CodecEncodeSelf(e)
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
}
|
|
|
|
if yyr19 || yy2arr19 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
yym31 := z.EncBinary()
|
|
|
|
_ = yym31
|
|
|
|
if false {
|
|
|
|
} else {
|
|
|
|
r.EncodeUint(uint64(x.CreatedIndex))
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
} else {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerMapKey1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
r.EncodeString(codecSelferC_UTF81819, string("createdIndex"))
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerMapValue1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
yym32 := z.EncBinary()
|
|
|
|
_ = yym32
|
|
|
|
if false {
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
r.EncodeUint(uint64(x.CreatedIndex))
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyr19 || yy2arr19 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
yym34 := z.EncBinary()
|
|
|
|
_ = yym34
|
|
|
|
if false {
|
|
|
|
} else {
|
|
|
|
r.EncodeUint(uint64(x.ModifiedIndex))
|
|
|
|
}
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerMapKey1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
r.EncodeString(codecSelferC_UTF81819, string("modifiedIndex"))
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerMapValue1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
yym35 := z.EncBinary()
|
|
|
|
_ = yym35
|
|
|
|
if false {
|
|
|
|
} else {
|
|
|
|
r.EncodeUint(uint64(x.ModifiedIndex))
|
|
|
|
}
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyr19 || yy2arr19 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyq19[6] {
|
|
|
|
if x.Expiration == nil {
|
|
|
|
r.EncodeNil()
|
|
|
|
} else {
|
|
|
|
yym37 := z.EncBinary()
|
|
|
|
_ = yym37
|
|
|
|
if false {
|
|
|
|
} else if yym38 := z.TimeRtidIfBinc(); yym38 != 0 {
|
|
|
|
r.EncodeBuiltin(yym38, x.Expiration)
|
|
|
|
} else if z.HasExtensions() && z.EncExt(x.Expiration) {
|
|
|
|
} else if yym37 {
|
|
|
|
z.EncBinaryMarshal(x.Expiration)
|
|
|
|
} else if !yym37 && z.IsJSONHandle() {
|
|
|
|
z.EncJSONMarshal(x.Expiration)
|
|
|
|
} else {
|
|
|
|
z.EncFallback(x.Expiration)
|
|
|
|
}
|
|
|
|
}
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
r.EncodeNil()
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
} else {
|
|
|
|
if yyq19[6] {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerMapKey1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
r.EncodeString(codecSelferC_UTF81819, string("expiration"))
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerMapValue1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
if x.Expiration == nil {
|
|
|
|
r.EncodeNil()
|
|
|
|
} else {
|
|
|
|
yym39 := z.EncBinary()
|
|
|
|
_ = yym39
|
|
|
|
if false {
|
|
|
|
} else if yym40 := z.TimeRtidIfBinc(); yym40 != 0 {
|
|
|
|
r.EncodeBuiltin(yym40, x.Expiration)
|
|
|
|
} else if z.HasExtensions() && z.EncExt(x.Expiration) {
|
|
|
|
} else if yym39 {
|
|
|
|
z.EncBinaryMarshal(x.Expiration)
|
|
|
|
} else if !yym39 && z.IsJSONHandle() {
|
|
|
|
z.EncJSONMarshal(x.Expiration)
|
|
|
|
} else {
|
|
|
|
z.EncFallback(x.Expiration)
|
|
|
|
}
|
|
|
|
}
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyr19 || yy2arr19 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyq19[7] {
|
|
|
|
yym42 := z.EncBinary()
|
|
|
|
_ = yym42
|
|
|
|
if false {
|
|
|
|
} else {
|
|
|
|
r.EncodeInt(int64(x.TTL))
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
r.EncodeInt(0)
|
|
|
|
}
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyq19[7] {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerMapKey1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
r.EncodeString(codecSelferC_UTF81819, string("ttl"))
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerMapValue1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
yym43 := z.EncBinary()
|
|
|
|
_ = yym43
|
|
|
|
if false {
|
|
|
|
} else {
|
|
|
|
r.EncodeInt(int64(x.TTL))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
if yyr19 || yy2arr19 {
|
|
|
|
z.EncSendContainerState(codecSelfer_containerArrayEnd1819)
|
|
|
|
} else {
|
|
|
|
z.EncSendContainerState(codecSelfer_containerMapEnd1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *Node) CodecDecodeSelf(d *codec1978.Decoder) {
|
2015-09-10 21:51:59 +03:00
|
|
|
var h codecSelfer1819
|
2015-08-17 03:41:14 +03:00
|
|
|
z, r := codec1978.GenHelperDecoder(d)
|
|
|
|
_, _, _ = h, z, r
|
2015-10-08 12:27:00 +03:00
|
|
|
yym44 := z.DecBinary()
|
|
|
|
_ = yym44
|
|
|
|
if false {
|
|
|
|
} else if z.HasExtensions() && z.DecExt(x) {
|
|
|
|
} else {
|
2015-11-02 14:03:40 +03:00
|
|
|
yyct45 := r.ContainerType()
|
|
|
|
if yyct45 == codecSelferValueTypeMap1819 {
|
2015-10-08 12:27:00 +03:00
|
|
|
yyl45 := r.ReadMapStart()
|
|
|
|
if yyl45 == 0 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerMapEnd1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
} else {
|
|
|
|
x.codecDecodeSelfFromMap(yyl45, d)
|
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
} else if yyct45 == codecSelferValueTypeArray1819 {
|
2015-10-08 12:27:00 +03:00
|
|
|
yyl45 := r.ReadArrayStart()
|
|
|
|
if yyl45 == 0 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
} else {
|
|
|
|
x.codecDecodeSelfFromArray(yyl45, d)
|
|
|
|
}
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
panic(codecSelferOnlyMapOrArrayEncodeToStructErr1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
|
2015-09-10 21:51:59 +03:00
|
|
|
var h codecSelfer1819
|
2015-08-17 03:41:14 +03:00
|
|
|
z, r := codec1978.GenHelperDecoder(d)
|
|
|
|
_, _, _ = h, z, r
|
2015-10-08 12:27:00 +03:00
|
|
|
var yys46Slc = z.DecScratchBuffer() // default slice to decode into
|
|
|
|
_ = yys46Slc
|
|
|
|
var yyhl46 bool = l >= 0
|
|
|
|
for yyj46 := 0; ; yyj46++ {
|
|
|
|
if yyhl46 {
|
|
|
|
if yyj46 >= l {
|
2015-08-17 03:41:14 +03:00
|
|
|
break
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if r.CheckBreak() {
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerMapKey1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
yys46Slc = r.DecodeBytes(yys46Slc, true, true)
|
|
|
|
yys46 := string(yys46Slc)
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerMapValue1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
switch yys46 {
|
2015-08-17 03:41:14 +03:00
|
|
|
case "key":
|
|
|
|
if r.TryDecodeAsNil() {
|
|
|
|
x.Key = ""
|
|
|
|
} else {
|
|
|
|
x.Key = string(r.DecodeString())
|
|
|
|
}
|
|
|
|
case "dir":
|
|
|
|
if r.TryDecodeAsNil() {
|
|
|
|
x.Dir = false
|
|
|
|
} else {
|
|
|
|
x.Dir = bool(r.DecodeBool())
|
|
|
|
}
|
|
|
|
case "value":
|
|
|
|
if r.TryDecodeAsNil() {
|
|
|
|
x.Value = ""
|
|
|
|
} else {
|
|
|
|
x.Value = string(r.DecodeString())
|
|
|
|
}
|
|
|
|
case "nodes":
|
|
|
|
if r.TryDecodeAsNil() {
|
|
|
|
x.Nodes = nil
|
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
yyv50 := &x.Nodes
|
|
|
|
yyv50.CodecDecodeSelf(d)
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
|
|
|
case "createdIndex":
|
|
|
|
if r.TryDecodeAsNil() {
|
|
|
|
x.CreatedIndex = 0
|
|
|
|
} else {
|
|
|
|
x.CreatedIndex = uint64(r.DecodeUint(64))
|
|
|
|
}
|
|
|
|
case "modifiedIndex":
|
|
|
|
if r.TryDecodeAsNil() {
|
|
|
|
x.ModifiedIndex = 0
|
|
|
|
} else {
|
|
|
|
x.ModifiedIndex = uint64(r.DecodeUint(64))
|
|
|
|
}
|
|
|
|
case "expiration":
|
|
|
|
if r.TryDecodeAsNil() {
|
|
|
|
if x.Expiration != nil {
|
|
|
|
x.Expiration = nil
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if x.Expiration == nil {
|
|
|
|
x.Expiration = new(time.Time)
|
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
yym54 := z.DecBinary()
|
|
|
|
_ = yym54
|
|
|
|
if false {
|
|
|
|
} else if yym55 := z.TimeRtidIfBinc(); yym55 != 0 {
|
|
|
|
r.DecodeBuiltin(yym55, x.Expiration)
|
|
|
|
} else if z.HasExtensions() && z.DecExt(x.Expiration) {
|
|
|
|
} else if yym54 {
|
|
|
|
z.DecBinaryUnmarshal(x.Expiration)
|
|
|
|
} else if !yym54 && z.IsJSONHandle() {
|
|
|
|
z.DecJSONUnmarshal(x.Expiration)
|
|
|
|
} else {
|
|
|
|
z.DecFallback(x.Expiration, false)
|
|
|
|
}
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
|
|
|
case "ttl":
|
|
|
|
if r.TryDecodeAsNil() {
|
|
|
|
x.TTL = 0
|
|
|
|
} else {
|
|
|
|
x.TTL = int64(r.DecodeInt(64))
|
|
|
|
}
|
|
|
|
default:
|
2015-10-08 12:27:00 +03:00
|
|
|
z.DecStructFieldNotFound(-1, yys46)
|
|
|
|
} // end switch yys46
|
|
|
|
} // end for yyj46
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerMapEnd1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
|
2015-09-10 21:51:59 +03:00
|
|
|
var h codecSelfer1819
|
2015-08-17 03:41:14 +03:00
|
|
|
z, r := codec1978.GenHelperDecoder(d)
|
|
|
|
_, _, _ = h, z, r
|
2015-10-08 12:27:00 +03:00
|
|
|
var yyj57 int
|
|
|
|
var yyb57 bool
|
|
|
|
var yyhl57 bool = l >= 0
|
|
|
|
yyj57++
|
|
|
|
if yyhl57 {
|
|
|
|
yyb57 = yyj57 > l
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
yyb57 = r.CheckBreak()
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyb57 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
return
|
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
if r.TryDecodeAsNil() {
|
|
|
|
x.Key = ""
|
|
|
|
} else {
|
|
|
|
x.Key = string(r.DecodeString())
|
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
yyj57++
|
|
|
|
if yyhl57 {
|
|
|
|
yyb57 = yyj57 > l
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
yyb57 = r.CheckBreak()
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyb57 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
return
|
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
if r.TryDecodeAsNil() {
|
|
|
|
x.Dir = false
|
|
|
|
} else {
|
|
|
|
x.Dir = bool(r.DecodeBool())
|
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
yyj57++
|
|
|
|
if yyhl57 {
|
|
|
|
yyb57 = yyj57 > l
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
yyb57 = r.CheckBreak()
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyb57 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
return
|
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
if r.TryDecodeAsNil() {
|
|
|
|
x.Value = ""
|
|
|
|
} else {
|
|
|
|
x.Value = string(r.DecodeString())
|
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
yyj57++
|
|
|
|
if yyhl57 {
|
|
|
|
yyb57 = yyj57 > l
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
yyb57 = r.CheckBreak()
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyb57 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
return
|
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
if r.TryDecodeAsNil() {
|
|
|
|
x.Nodes = nil
|
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
yyv61 := &x.Nodes
|
|
|
|
yyv61.CodecDecodeSelf(d)
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
yyj57++
|
|
|
|
if yyhl57 {
|
|
|
|
yyb57 = yyj57 > l
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
yyb57 = r.CheckBreak()
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyb57 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
return
|
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
if r.TryDecodeAsNil() {
|
|
|
|
x.CreatedIndex = 0
|
|
|
|
} else {
|
|
|
|
x.CreatedIndex = uint64(r.DecodeUint(64))
|
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
yyj57++
|
|
|
|
if yyhl57 {
|
|
|
|
yyb57 = yyj57 > l
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
yyb57 = r.CheckBreak()
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyb57 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
return
|
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
if r.TryDecodeAsNil() {
|
|
|
|
x.ModifiedIndex = 0
|
|
|
|
} else {
|
|
|
|
x.ModifiedIndex = uint64(r.DecodeUint(64))
|
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
yyj57++
|
|
|
|
if yyhl57 {
|
|
|
|
yyb57 = yyj57 > l
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
yyb57 = r.CheckBreak()
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyb57 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
return
|
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
if r.TryDecodeAsNil() {
|
|
|
|
if x.Expiration != nil {
|
|
|
|
x.Expiration = nil
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if x.Expiration == nil {
|
|
|
|
x.Expiration = new(time.Time)
|
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
yym65 := z.DecBinary()
|
|
|
|
_ = yym65
|
|
|
|
if false {
|
|
|
|
} else if yym66 := z.TimeRtidIfBinc(); yym66 != 0 {
|
|
|
|
r.DecodeBuiltin(yym66, x.Expiration)
|
|
|
|
} else if z.HasExtensions() && z.DecExt(x.Expiration) {
|
|
|
|
} else if yym65 {
|
|
|
|
z.DecBinaryUnmarshal(x.Expiration)
|
|
|
|
} else if !yym65 && z.IsJSONHandle() {
|
|
|
|
z.DecJSONUnmarshal(x.Expiration)
|
|
|
|
} else {
|
|
|
|
z.DecFallback(x.Expiration, false)
|
|
|
|
}
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
yyj57++
|
|
|
|
if yyhl57 {
|
|
|
|
yyb57 = yyj57 > l
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
yyb57 = r.CheckBreak()
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyb57 {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
return
|
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
if r.TryDecodeAsNil() {
|
|
|
|
x.TTL = 0
|
|
|
|
} else {
|
|
|
|
x.TTL = int64(r.DecodeInt(64))
|
|
|
|
}
|
|
|
|
for {
|
2015-10-08 12:27:00 +03:00
|
|
|
yyj57++
|
|
|
|
if yyhl57 {
|
|
|
|
yyb57 = yyj57 > l
|
2015-08-17 03:41:14 +03:00
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
yyb57 = r.CheckBreak()
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyb57 {
|
2015-08-17 03:41:14 +03:00
|
|
|
break
|
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
z.DecStructFieldNotFound(yyj57-1, "")
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
z.DecSendContainerState(codecSelfer_containerArrayEnd1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
|
|
|
|
2015-09-10 21:51:59 +03:00
|
|
|
func (x Nodes) CodecEncodeSelf(e *codec1978.Encoder) {
|
|
|
|
var h codecSelfer1819
|
|
|
|
z, r := codec1978.GenHelperEncoder(e)
|
|
|
|
_, _, _ = h, z, r
|
|
|
|
if x == nil {
|
|
|
|
r.EncodeNil()
|
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
yym68 := z.EncBinary()
|
|
|
|
_ = yym68
|
|
|
|
if false {
|
|
|
|
} else if z.HasExtensions() && z.EncExt(x) {
|
|
|
|
} else {
|
|
|
|
h.encNodes((Nodes)(x), e)
|
|
|
|
}
|
2015-09-10 21:51:59 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *Nodes) CodecDecodeSelf(d *codec1978.Decoder) {
|
|
|
|
var h codecSelfer1819
|
|
|
|
z, r := codec1978.GenHelperDecoder(d)
|
|
|
|
_, _, _ = h, z, r
|
2015-10-08 12:27:00 +03:00
|
|
|
yym69 := z.DecBinary()
|
|
|
|
_ = yym69
|
|
|
|
if false {
|
|
|
|
} else if z.HasExtensions() && z.DecExt(x) {
|
|
|
|
} else {
|
|
|
|
h.decNodes((*Nodes)(x), d)
|
|
|
|
}
|
2015-09-10 21:51:59 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x codecSelfer1819) encNodes(v Nodes, e *codec1978.Encoder) {
|
|
|
|
var h codecSelfer1819
|
2015-08-17 03:41:14 +03:00
|
|
|
z, r := codec1978.GenHelperEncoder(e)
|
|
|
|
_, _, _ = h, z, r
|
|
|
|
r.EncodeArrayStart(len(v))
|
2015-10-08 12:27:00 +03:00
|
|
|
for _, yyv70 := range v {
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerArrayElem1819)
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyv70 == nil {
|
|
|
|
r.EncodeNil()
|
|
|
|
} else {
|
|
|
|
yyv70.CodecEncodeSelf(e)
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
z.EncSendContainerState(codecSelfer_containerArrayEnd1819)
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
|
|
|
|
2015-09-10 21:51:59 +03:00
|
|
|
func (x codecSelfer1819) decNodes(v *Nodes, d *codec1978.Decoder) {
|
|
|
|
var h codecSelfer1819
|
2015-08-17 03:41:14 +03:00
|
|
|
z, r := codec1978.GenHelperDecoder(d)
|
|
|
|
_, _, _ = h, z, r
|
|
|
|
|
2015-10-08 12:27:00 +03:00
|
|
|
yyv71 := *v
|
|
|
|
yyh71, yyl71 := z.DecSliceHelperStart()
|
2015-11-02 14:03:40 +03:00
|
|
|
var yyc71 bool
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyl71 == 0 {
|
2015-11-02 14:03:40 +03:00
|
|
|
if yyv71 == nil {
|
|
|
|
yyv71 = []*Node{}
|
|
|
|
yyc71 = true
|
|
|
|
} else if len(yyv71) != 0 {
|
2015-10-08 12:27:00 +03:00
|
|
|
yyv71 = yyv71[:0]
|
|
|
|
yyc71 = true
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
} else if yyl71 > 0 {
|
2015-11-02 14:03:40 +03:00
|
|
|
var yyrr71, yyrl71 int
|
|
|
|
var yyrt71 bool
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyl71 > cap(yyv71) {
|
2015-11-02 14:03:40 +03:00
|
|
|
|
|
|
|
yyrg71 := len(yyv71) > 0
|
|
|
|
yyv271 := yyv71
|
2015-10-08 12:27:00 +03:00
|
|
|
yyrl71, yyrt71 = z.DecInferLen(yyl71, z.DecBasicHandle().MaxInitLen, 8)
|
2015-11-02 14:03:40 +03:00
|
|
|
if yyrt71 {
|
|
|
|
if yyrl71 <= cap(yyv71) {
|
|
|
|
yyv71 = yyv71[:yyrl71]
|
|
|
|
} else {
|
|
|
|
yyv71 = make([]*Node, yyrl71)
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
yyv71 = make([]*Node, yyrl71)
|
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
yyc71 = true
|
|
|
|
yyrr71 = len(yyv71)
|
2015-11-02 14:03:40 +03:00
|
|
|
if yyrg71 {
|
|
|
|
copy(yyv71, yyv271)
|
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
} else if yyl71 != len(yyv71) {
|
|
|
|
yyv71 = yyv71[:yyl71]
|
|
|
|
yyc71 = true
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
yyj71 := 0
|
|
|
|
for ; yyj71 < yyrr71; yyj71++ {
|
2015-11-02 14:03:40 +03:00
|
|
|
yyh71.ElemContainerState(yyj71)
|
2015-08-17 03:41:14 +03:00
|
|
|
if r.TryDecodeAsNil() {
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyv71[yyj71] != nil {
|
|
|
|
*yyv71[yyj71] = Node{}
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyv71[yyj71] == nil {
|
|
|
|
yyv71[yyj71] = new(Node)
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
yyw72 := yyv71[yyj71]
|
|
|
|
yyw72.CodecDecodeSelf(d)
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyrt71 {
|
|
|
|
for ; yyj71 < yyl71; yyj71++ {
|
|
|
|
yyv71 = append(yyv71, nil)
|
2015-11-02 14:03:40 +03:00
|
|
|
yyh71.ElemContainerState(yyj71)
|
2015-10-08 12:27:00 +03:00
|
|
|
if r.TryDecodeAsNil() {
|
|
|
|
if yyv71[yyj71] != nil {
|
|
|
|
*yyv71[yyj71] = Node{}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if yyv71[yyj71] == nil {
|
|
|
|
yyv71[yyj71] = new(Node)
|
|
|
|
}
|
|
|
|
yyw73 := yyv71[yyj71]
|
|
|
|
yyw73.CodecDecodeSelf(d)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
2015-08-17 03:41:14 +03:00
|
|
|
|
|
|
|
} else {
|
2015-11-02 14:03:40 +03:00
|
|
|
yyj71 := 0
|
|
|
|
for ; !r.CheckBreak(); yyj71++ {
|
|
|
|
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyj71 >= len(yyv71) {
|
|
|
|
yyv71 = append(yyv71, nil) // var yyz71 *Node
|
|
|
|
yyc71 = true
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
yyh71.ElemContainerState(yyj71)
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyj71 < len(yyv71) {
|
2015-08-17 03:41:14 +03:00
|
|
|
if r.TryDecodeAsNil() {
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyv71[yyj71] != nil {
|
|
|
|
*yyv71[yyj71] = Node{}
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
|
|
|
} else {
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyv71[yyj71] == nil {
|
|
|
|
yyv71[yyj71] = new(Node)
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-10-08 12:27:00 +03:00
|
|
|
yyw74 := yyv71[yyj71]
|
|
|
|
yyw74.CodecDecodeSelf(d)
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
z.DecSwallow()
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
if yyj71 < len(yyv71) {
|
|
|
|
yyv71 = yyv71[:yyj71]
|
|
|
|
yyc71 = true
|
|
|
|
} else if yyj71 == 0 && yyv71 == nil {
|
|
|
|
yyv71 = []*Node{}
|
|
|
|
yyc71 = true
|
|
|
|
}
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
2015-11-02 14:03:40 +03:00
|
|
|
yyh71.End()
|
2015-10-08 12:27:00 +03:00
|
|
|
if yyc71 {
|
|
|
|
*v = yyv71
|
2015-08-17 03:41:14 +03:00
|
|
|
}
|
|
|
|
}
|