From e7587aa45891877c8c3be8ec8095cc338709f923 Mon Sep 17 00:00:00 2001 From: Michael Schurter Date: Fri, 22 Nov 2019 11:51:11 -0800 Subject: [PATCH] Remove generated 0.10.2-rc1 files --- client/structs/structs.generated.go | 9709 --- nomad/structs/structs.generated.go | 106164 ------------------------- 2 files changed, 115873 deletions(-) delete mode 100644 client/structs/structs.generated.go delete mode 100644 nomad/structs/structs.generated.go diff --git a/client/structs/structs.generated.go b/client/structs/structs.generated.go deleted file mode 100644 index 1361cd0ea..000000000 --- a/client/structs/structs.generated.go +++ /dev/null @@ -1,9709 +0,0 @@ -// +build codec_generated - -// Code generated by codecgen - DO NOT EDIT. - -package structs - -import ( - "errors" - pkg1_stats "github.com/hashicorp/nomad/client/stats" - pkg4_structs "github.com/hashicorp/nomad/nomad/structs" - pkg2_device "github.com/hashicorp/nomad/plugins/device" - pkg3_structs "github.com/hashicorp/nomad/plugins/shared/structs" - codec1978 "github.com/ugorji/go/codec" - "runtime" - "strconv" - "time" -) - -const ( - // ----- content types ---- - codecSelferCcUTF8102 = 1 - codecSelferCcRAW102 = 255 - // ----- value types used ---- - codecSelferValueTypeArray102 = 10 - codecSelferValueTypeMap102 = 9 - codecSelferValueTypeString102 = 6 - codecSelferValueTypeInt102 = 2 - codecSelferValueTypeUint102 = 3 - codecSelferValueTypeFloat102 = 4 - codecSelferBitsize102 = uint8(32 << (^uint(0) >> 63)) -) - -var ( - errCodecSelferOnlyMapOrArrayEncodeToStruct102 = errors.New(`only encoded map or array can be decoded into a struct`) -) - -type codecSelfer102 struct{} - -func init() { - if codec1978.GenVersion != 10 { - _, file, _, _ := runtime.Caller(0) - panic("codecgen version mismatch: current: 10, need " + strconv.FormatInt(int64(codec1978.GenVersion), 10) + ". Re-generate file: " + file) - } - if false { - var _ byte = 0 // reference the types, but skip this branch at build/run time - var v0 pkg1_stats.HostStats - var v1 pkg4_structs.QueryMeta - var v2 pkg2_device.DeviceGroupStats - var v3 pkg3_structs.StatValue - var v4 time.Time - _, _, _, _, _ = v0, v1, v2, v3, v4 - } -} - -func (x *RpcError) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(2) - } else { - r.WriteMapStart(2) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Message))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Message)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Message\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Message`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Message))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Message)) - } - } - } - var yyn6 bool - if x.Code == nil { - yyn6 = true - goto LABEL6 - } - LABEL6: - if yyr2 || yy2arr2 { - if yyn6 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Code == nil { - r.EncodeNil() - } else { - yy7 := *x.Code - if false { - } else { - r.EncodeInt(int64(yy7)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Code\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Code`) - } - r.WriteMapElemValue() - if yyn6 { - r.EncodeNil() - } else { - if x.Code == nil { - r.EncodeNil() - } else { - yy9 := *x.Code - if false { - } else { - r.EncodeInt(int64(yy9)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *RpcError) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap102 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray102 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102) - } - } -} - -func (x *RpcError) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Message": - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = (string)(r.DecodeString()) - } - case "Code": - if r.TryDecodeAsNil() { - if true && x.Code != nil { - x.Code = nil - } - } else { - if x.Code == nil { - x.Code = new(int64) - } - - if false { - } else { - *x.Code = (int64)(r.DecodeInt64()) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *RpcError) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj7 int - var yyb7 bool - var yyhl7 bool = l >= 0 - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Code != nil { - x.Code = nil - } - } else { - if x.Code == nil { - x.Code = new(int64) - } - - if false { - } else { - *x.Code = (int64)(r.DecodeInt64()) - } - } - for { - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj7-1, "") - } - r.ReadArrayEnd() -} - -func (x *ClientStatsResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - var yyn3 bool - if x.HostStats == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.HostStats == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt4 := z.Extension(z.I2Rtid(x.HostStats)); yyxt4 != nil { - z.EncExtension(x.HostStats, yyxt4) - } else { - z.EncFallback(x.HostStats) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"HostStats\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `HostStats`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.HostStats == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.HostStats)); yyxt5 != nil { - z.EncExtension(x.HostStats, yyxt5) - } else { - z.EncFallback(x.HostStats) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ClientStatsResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap102 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray102 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102) - } - } -} - -func (x *ClientStatsResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "HostStats": - if r.TryDecodeAsNil() { - if true && x.HostStats != nil { - x.HostStats = nil - } - } else { - if x.HostStats == nil { - x.HostStats = new(pkg1_stats.HostStats) - } - - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.HostStats)); yyxt5 != nil { - z.DecExtension(x.HostStats, yyxt5) - } else { - z.DecFallback(x.HostStats, false) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.LastContact)); yyxt8 != nil { - z.DecExtension(x.LastContact, yyxt8) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ClientStatsResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.HostStats != nil { - x.HostStats = nil - } - } else { - if x.HostStats == nil { - x.HostStats = new(pkg1_stats.HostStats) - } - - if false { - } else if yyxt12 := z.Extension(z.I2Rtid(x.HostStats)); yyxt12 != nil { - z.DecExtension(x.HostStats, yyxt12) - } else { - z.DecFallback(x.HostStats, false) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.LastContact)); yyxt15 != nil { - z.DecExtension(x.LastContact, yyxt15) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *MonitorRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(13) - } else { - r.WriteMapStart(13) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LogLevel))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.LogLevel)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LogLevel\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `LogLevel`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LogLevel))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.LogLevel)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.LogJSON)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LogJSON\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `LogJSON`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.LogJSON)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NodeID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `NodeID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.NodeID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ServerID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.ServerID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ServerID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `ServerID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ServerID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.ServerID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.PlainText)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PlainText\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `PlainText`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.PlainText)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt28 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt28 != nil { - z.EncExtension(x.MaxQueryTime, yyxt28) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt29 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt29 != nil { - z.EncExtension(x.MaxQueryTime, yyxt29) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *MonitorRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap102 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray102 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102) - } - } -} - -func (x *MonitorRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "LogLevel": - if r.TryDecodeAsNil() { - x.LogLevel = "" - } else { - x.LogLevel = (string)(r.DecodeString()) - } - case "LogJSON": - if r.TryDecodeAsNil() { - x.LogJSON = false - } else { - x.LogJSON = (bool)(r.DecodeBool()) - } - case "NodeID": - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - case "ServerID": - if r.TryDecodeAsNil() { - x.ServerID = "" - } else { - x.ServerID = (string)(r.DecodeString()) - } - case "PlainText": - if r.TryDecodeAsNil() { - x.PlainText = false - } else { - x.PlainText = (bool)(r.DecodeBool()) - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt13 != nil { - z.DecExtension(x.MaxQueryTime, yyxt13) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *MonitorRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj18 int - var yyb18 bool - var yyhl18 bool = l >= 0 - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LogLevel = "" - } else { - x.LogLevel = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LogJSON = false - } else { - x.LogJSON = (bool)(r.DecodeBool()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ServerID = "" - } else { - x.ServerID = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PlainText = false - } else { - x.PlainText = (bool)(r.DecodeBool()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt28 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt28 != nil { - z.DecExtension(x.MaxQueryTime, yyxt28) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj18-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocFileInfo) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - var yyq2 = [6]bool{ // should field at this index be written? - true, // Name - true, // IsDir - true, // Size - true, // FileMode - true, // ModTime - x.ContentType != "", // ContentType - } - _ = yyq2 - if yyr2 || yy2arr2 { - r.WriteArrayStart(6) - } else { - var yynn2 int - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.WriteMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.IsDir)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IsDir\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `IsDir`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.IsDir)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Size)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Size\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Size`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Size)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.FileMode))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.FileMode)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"FileMode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `FileMode`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.FileMode))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.FileMode)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.ModTime) - } else if yyxt16 := z.Extension(z.I2Rtid(x.ModTime)); yyxt16 != nil { - z.EncExtension(x.ModTime, yyxt16) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.ModTime) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.ModTime) - } else { - z.EncFallback(x.ModTime) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `ModTime`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.ModTime) - } else if yyxt17 := z.Extension(z.I2Rtid(x.ModTime)); yyxt17 != nil { - z.EncExtension(x.ModTime, yyxt17) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.ModTime) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.ModTime) - } else { - z.EncFallback(x.ModTime) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[5] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ContentType))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.ContentType)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, "") - } - } - } else { - if yyq2[5] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ContentType\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `ContentType`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ContentType))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.ContentType)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocFileInfo) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap102 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray102 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102) - } - } -} - -func (x *AllocFileInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "IsDir": - if r.TryDecodeAsNil() { - x.IsDir = false - } else { - x.IsDir = (bool)(r.DecodeBool()) - } - case "Size": - if r.TryDecodeAsNil() { - x.Size = 0 - } else { - x.Size = (int64)(r.DecodeInt64()) - } - case "FileMode": - if r.TryDecodeAsNil() { - x.FileMode = "" - } else { - x.FileMode = (string)(r.DecodeString()) - } - case "ModTime": - if r.TryDecodeAsNil() { - x.ModTime = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.ModTime = r.DecodeTime() - } else if yyxt9 := z.Extension(z.I2Rtid(x.ModTime)); yyxt9 != nil { - z.DecExtension(x.ModTime, yyxt9) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.ModTime) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.ModTime) - } else { - z.DecFallback(&x.ModTime, false) - } - } - case "ContentType": - if r.TryDecodeAsNil() { - x.ContentType = "" - } else { - x.ContentType = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocFileInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.IsDir = false - } else { - x.IsDir = (bool)(r.DecodeBool()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Size = 0 - } else { - x.Size = (int64)(r.DecodeInt64()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.FileMode = "" - } else { - x.FileMode = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModTime = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.ModTime = r.DecodeTime() - } else if yyxt17 := z.Extension(z.I2Rtid(x.ModTime)); yyxt17 != nil { - z.DecExtension(x.ModTime, yyxt17) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.ModTime) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.ModTime) - } else { - z.DecFallback(&x.ModTime, false) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ContentType = "" - } else { - x.ContentType = (string)(r.DecodeString()) - } - for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj11-1, "") - } - r.ReadArrayEnd() -} - -func (x *FsListRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(10) - } else { - r.WriteMapStart(10) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AllocID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `AllocID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AllocID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Path))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Path)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Path\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Path`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Path))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Path)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt19 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt19 != nil { - z.EncExtension(x.MaxQueryTime, yyxt19) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt20 != nil { - z.EncExtension(x.MaxQueryTime, yyxt20) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *FsListRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap102 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray102 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102) - } - } -} - -func (x *FsListRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "AllocID": - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - case "Path": - if r.TryDecodeAsNil() { - x.Path = "" - } else { - x.Path = (string)(r.DecodeString()) - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt10 != nil { - z.DecExtension(x.MaxQueryTime, yyxt10) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *FsListRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj15 int - var yyb15 bool - var yyhl15 bool = l >= 0 - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Path = "" - } else { - x.Path = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt22 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt22 != nil { - z.DecExtension(x.MaxQueryTime, yyxt22) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj15-1, "") - } - r.ReadArrayEnd() -} - -func (x *FsListResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Files == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocFileInfo(([]*AllocFileInfo)(x.Files), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Files\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Files`) - } - r.WriteMapElemValue() - if x.Files == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocFileInfo(([]*AllocFileInfo)(x.Files), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *FsListResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap102 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray102 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102) - } - } -} - -func (x *FsListResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Files": - if r.TryDecodeAsNil() { - x.Files = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocFileInfo((*[]*AllocFileInfo)(&x.Files), d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.LastContact)); yyxt8 != nil { - z.DecExtension(x.LastContact, yyxt8) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *FsListResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Files = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocFileInfo((*[]*AllocFileInfo)(&x.Files), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.LastContact)); yyxt15 != nil { - z.DecExtension(x.LastContact, yyxt15) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *FsStatRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(10) - } else { - r.WriteMapStart(10) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AllocID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `AllocID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AllocID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Path))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Path)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Path\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Path`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Path))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Path)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt19 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt19 != nil { - z.EncExtension(x.MaxQueryTime, yyxt19) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt20 != nil { - z.EncExtension(x.MaxQueryTime, yyxt20) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *FsStatRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap102 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray102 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102) - } - } -} - -func (x *FsStatRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "AllocID": - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - case "Path": - if r.TryDecodeAsNil() { - x.Path = "" - } else { - x.Path = (string)(r.DecodeString()) - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt10 != nil { - z.DecExtension(x.MaxQueryTime, yyxt10) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *FsStatRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj15 int - var yyb15 bool - var yyhl15 bool = l >= 0 - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Path = "" - } else { - x.Path = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt22 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt22 != nil { - z.DecExtension(x.MaxQueryTime, yyxt22) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj15-1, "") - } - r.ReadArrayEnd() -} - -func (x *FsStatResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - var yyn3 bool - if x.Info == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Info == nil { - r.EncodeNil() - } else { - x.Info.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Info\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Info`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Info == nil { - r.EncodeNil() - } else { - x.Info.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *FsStatResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap102 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray102 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102) - } - } -} - -func (x *FsStatResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Info": - if r.TryDecodeAsNil() { - if true && x.Info != nil { - x.Info = nil - } - } else { - if x.Info == nil { - x.Info = new(AllocFileInfo) - } - - x.Info.CodecDecodeSelf(d) - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.LastContact)); yyxt7 != nil { - z.DecExtension(x.LastContact, yyxt7) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *FsStatResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Info != nil { - x.Info = nil - } - } else { - if x.Info == nil { - x.Info = new(AllocFileInfo) - } - - x.Info.CodecDecodeSelf(d) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.LastContact)); yyxt13 != nil { - z.DecExtension(x.LastContact, yyxt13) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *FsStreamRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(15) - } else { - r.WriteMapStart(15) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AllocID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `AllocID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AllocID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Path))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Path)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Path\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Path`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Path))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Path)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Offset)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Offset\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Offset`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Offset)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Origin))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Origin)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Origin\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Origin`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Origin))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Origin)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.PlainText)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PlainText\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `PlainText`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.PlainText)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Limit)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Limit\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Limit`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Limit)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Follow)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Follow\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Follow`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Follow)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt34 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt34 != nil { - z.EncExtension(x.MaxQueryTime, yyxt34) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt35 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt35 != nil { - z.EncExtension(x.MaxQueryTime, yyxt35) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *FsStreamRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap102 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray102 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102) - } - } -} - -func (x *FsStreamRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "AllocID": - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - case "Path": - if r.TryDecodeAsNil() { - x.Path = "" - } else { - x.Path = (string)(r.DecodeString()) - } - case "Offset": - if r.TryDecodeAsNil() { - x.Offset = 0 - } else { - x.Offset = (int64)(r.DecodeInt64()) - } - case "Origin": - if r.TryDecodeAsNil() { - x.Origin = "" - } else { - x.Origin = (string)(r.DecodeString()) - } - case "PlainText": - if r.TryDecodeAsNil() { - x.PlainText = false - } else { - x.PlainText = (bool)(r.DecodeBool()) - } - case "Limit": - if r.TryDecodeAsNil() { - x.Limit = 0 - } else { - x.Limit = (int64)(r.DecodeInt64()) - } - case "Follow": - if r.TryDecodeAsNil() { - x.Follow = false - } else { - x.Follow = (bool)(r.DecodeBool()) - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt15 != nil { - z.DecExtension(x.MaxQueryTime, yyxt15) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *FsStreamRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj20 int - var yyb20 bool - var yyhl20 bool = l >= 0 - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Path = "" - } else { - x.Path = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Offset = 0 - } else { - x.Offset = (int64)(r.DecodeInt64()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Origin = "" - } else { - x.Origin = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PlainText = false - } else { - x.PlainText = (bool)(r.DecodeBool()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Limit = 0 - } else { - x.Limit = (int64)(r.DecodeInt64()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Follow = false - } else { - x.Follow = (bool)(r.DecodeBool()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt32 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt32 != nil { - z.DecExtension(x.MaxQueryTime, yyxt32) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj20-1, "") - } - r.ReadArrayEnd() -} - -func (x *FsLogsRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(15) - } else { - r.WriteMapStart(15) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AllocID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `AllocID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AllocID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Task))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Task)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Task\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Task`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Task))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Task)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LogType))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.LogType)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LogType\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `LogType`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LogType))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.LogType)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Offset)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Offset\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Offset`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Offset)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Origin))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Origin)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Origin\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Origin`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Origin))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Origin)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.PlainText)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PlainText\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `PlainText`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.PlainText)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Follow)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Follow\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Follow`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Follow)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt34 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt34 != nil { - z.EncExtension(x.MaxQueryTime, yyxt34) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt35 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt35 != nil { - z.EncExtension(x.MaxQueryTime, yyxt35) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *FsLogsRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap102 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray102 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102) - } - } -} - -func (x *FsLogsRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "AllocID": - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - case "Task": - if r.TryDecodeAsNil() { - x.Task = "" - } else { - x.Task = (string)(r.DecodeString()) - } - case "LogType": - if r.TryDecodeAsNil() { - x.LogType = "" - } else { - x.LogType = (string)(r.DecodeString()) - } - case "Offset": - if r.TryDecodeAsNil() { - x.Offset = 0 - } else { - x.Offset = (int64)(r.DecodeInt64()) - } - case "Origin": - if r.TryDecodeAsNil() { - x.Origin = "" - } else { - x.Origin = (string)(r.DecodeString()) - } - case "PlainText": - if r.TryDecodeAsNil() { - x.PlainText = false - } else { - x.PlainText = (bool)(r.DecodeBool()) - } - case "Follow": - if r.TryDecodeAsNil() { - x.Follow = false - } else { - x.Follow = (bool)(r.DecodeBool()) - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt15 != nil { - z.DecExtension(x.MaxQueryTime, yyxt15) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *FsLogsRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj20 int - var yyb20 bool - var yyhl20 bool = l >= 0 - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Task = "" - } else { - x.Task = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LogType = "" - } else { - x.LogType = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Offset = 0 - } else { - x.Offset = (int64)(r.DecodeInt64()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Origin = "" - } else { - x.Origin = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PlainText = false - } else { - x.PlainText = (bool)(r.DecodeBool()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Follow = false - } else { - x.Follow = (bool)(r.DecodeBool()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt32 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt32 != nil { - z.DecExtension(x.MaxQueryTime, yyxt32) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj20-1, "") - } - r.ReadArrayEnd() -} - -func (x *StreamErrWrapper) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(2) - } else { - r.WriteMapStart(2) - } - var yyn3 bool - if x.Error == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Error == nil { - r.EncodeNil() - } else { - x.Error.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Error\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Error`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Error == nil { - r.EncodeNil() - } else { - x.Error.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Payload == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.Payload)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Payload\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Payload`) - } - r.WriteMapElemValue() - if x.Payload == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.Payload)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *StreamErrWrapper) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap102 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray102 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102) - } - } -} - -func (x *StreamErrWrapper) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Error": - if r.TryDecodeAsNil() { - if true && x.Error != nil { - x.Error = nil - } - } else { - if x.Error == nil { - x.Error = new(RpcError) - } - - x.Error.CodecDecodeSelf(d) - } - case "Payload": - if r.TryDecodeAsNil() { - x.Payload = nil - } else { - if false { - } else { - x.Payload = r.DecodeBytes(([]byte)(x.Payload), false) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *StreamErrWrapper) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj7 int - var yyb7 bool - var yyhl7 bool = l >= 0 - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Error != nil { - x.Error = nil - } - } else { - if x.Error == nil { - x.Error = new(RpcError) - } - - x.Error.CodecDecodeSelf(d) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Payload = nil - } else { - if false { - } else { - x.Payload = r.DecodeBytes(([]byte)(x.Payload), false) - } - } - for { - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj7-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocExecRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(12) - } else { - r.WriteMapStart(12) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AllocID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `AllocID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AllocID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Task))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Task)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Task\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Task`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Task))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Task)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Tty)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Tty\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Tty`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Tty)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Cmd == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Cmd, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Cmd\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Cmd`) - } - r.WriteMapElemValue() - if x.Cmd == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Cmd, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt25 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt25 != nil { - z.EncExtension(x.MaxQueryTime, yyxt25) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.EncExtension(x.MaxQueryTime, yyxt26) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocExecRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap102 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray102 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102) - } - } -} - -func (x *AllocExecRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "AllocID": - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - case "Task": - if r.TryDecodeAsNil() { - x.Task = "" - } else { - x.Task = (string)(r.DecodeString()) - } - case "Tty": - if r.TryDecodeAsNil() { - x.Tty = false - } else { - x.Tty = (bool)(r.DecodeBool()) - } - case "Cmd": - if r.TryDecodeAsNil() { - x.Cmd = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Cmd, d) - } - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt13 != nil { - z.DecExtension(x.MaxQueryTime, yyxt13) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocExecRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj18 int - var yyb18 bool - var yyhl18 bool = l >= 0 - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Task = "" - } else { - x.Task = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Tty = false - } else { - x.Tty = (bool)(r.DecodeBool()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Cmd = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Cmd, d) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt28 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt28 != nil { - z.DecExtension(x.MaxQueryTime, yyxt28) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj18-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocStatsRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(10) - } else { - r.WriteMapStart(10) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AllocID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `AllocID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AllocID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Task))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Task)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Task\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Task`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Task))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Task)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt19 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt19 != nil { - z.EncExtension(x.MaxQueryTime, yyxt19) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt20 != nil { - z.EncExtension(x.MaxQueryTime, yyxt20) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocStatsRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap102 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray102 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102) - } - } -} - -func (x *AllocStatsRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "AllocID": - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - case "Task": - if r.TryDecodeAsNil() { - x.Task = "" - } else { - x.Task = (string)(r.DecodeString()) - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt10 != nil { - z.DecExtension(x.MaxQueryTime, yyxt10) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocStatsRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj15 int - var yyb15 bool - var yyhl15 bool = l >= 0 - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Task = "" - } else { - x.Task = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt22 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt22 != nil { - z.DecExtension(x.MaxQueryTime, yyxt22) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj15-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocStatsResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - var yyn3 bool - if x.Stats == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Stats == nil { - r.EncodeNil() - } else { - x.Stats.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Stats\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Stats`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Stats == nil { - r.EncodeNil() - } else { - x.Stats.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocStatsResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap102 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray102 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102) - } - } -} - -func (x *AllocStatsResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Stats": - if r.TryDecodeAsNil() { - if true && x.Stats != nil { - x.Stats = nil - } - } else { - if x.Stats == nil { - x.Stats = new(AllocResourceUsage) - } - - x.Stats.CodecDecodeSelf(d) - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.LastContact)); yyxt7 != nil { - z.DecExtension(x.LastContact, yyxt7) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocStatsResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Stats != nil { - x.Stats = nil - } - } else { - if x.Stats == nil { - x.Stats = new(AllocResourceUsage) - } - - x.Stats.CodecDecodeSelf(d) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.LastContact)); yyxt13 != nil { - z.DecExtension(x.LastContact, yyxt13) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *MemoryStats) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(8) - } else { - r.WriteMapStart(8) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.RSS)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RSS\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `RSS`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.RSS)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Cache)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Cache\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Cache`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Cache)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Swap)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Swap\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Swap`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Swap)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Usage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Usage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Usage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Usage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MaxUsage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxUsage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `MaxUsage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MaxUsage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.KernelUsage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KernelUsage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `KernelUsage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.KernelUsage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.KernelMaxUsage)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KernelMaxUsage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `KernelMaxUsage`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.KernelMaxUsage)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Measured == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Measured, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Measured\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Measured`) - } - r.WriteMapElemValue() - if x.Measured == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Measured, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *MemoryStats) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap102 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray102 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102) - } - } -} - -func (x *MemoryStats) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "RSS": - if r.TryDecodeAsNil() { - x.RSS = 0 - } else { - x.RSS = (uint64)(r.DecodeUint64()) - } - case "Cache": - if r.TryDecodeAsNil() { - x.Cache = 0 - } else { - x.Cache = (uint64)(r.DecodeUint64()) - } - case "Swap": - if r.TryDecodeAsNil() { - x.Swap = 0 - } else { - x.Swap = (uint64)(r.DecodeUint64()) - } - case "Usage": - if r.TryDecodeAsNil() { - x.Usage = 0 - } else { - x.Usage = (uint64)(r.DecodeUint64()) - } - case "MaxUsage": - if r.TryDecodeAsNil() { - x.MaxUsage = 0 - } else { - x.MaxUsage = (uint64)(r.DecodeUint64()) - } - case "KernelUsage": - if r.TryDecodeAsNil() { - x.KernelUsage = 0 - } else { - x.KernelUsage = (uint64)(r.DecodeUint64()) - } - case "KernelMaxUsage": - if r.TryDecodeAsNil() { - x.KernelMaxUsage = 0 - } else { - x.KernelMaxUsage = (uint64)(r.DecodeUint64()) - } - case "Measured": - if r.TryDecodeAsNil() { - x.Measured = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Measured, d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *MemoryStats) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RSS = 0 - } else { - x.RSS = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Cache = 0 - } else { - x.Cache = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Swap = 0 - } else { - x.Swap = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Usage = 0 - } else { - x.Usage = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MaxUsage = 0 - } else { - x.MaxUsage = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.KernelUsage = 0 - } else { - x.KernelUsage = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.KernelMaxUsage = 0 - } else { - x.KernelMaxUsage = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Measured = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Measured, d) - } - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-1, "") - } - r.ReadArrayEnd() -} - -func (x *CpuStats) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(7) - } else { - r.WriteMapStart(7) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeFloat64(float64(x.SystemMode)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SystemMode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `SystemMode`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeFloat64(float64(x.SystemMode)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeFloat64(float64(x.UserMode)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"UserMode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `UserMode`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeFloat64(float64(x.UserMode)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeFloat64(float64(x.TotalTicks)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TotalTicks\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `TotalTicks`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeFloat64(float64(x.TotalTicks)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.ThrottledPeriods)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ThrottledPeriods\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `ThrottledPeriods`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.ThrottledPeriods)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.ThrottledTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ThrottledTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `ThrottledTime`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.ThrottledTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeFloat64(float64(x.Percent)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Percent\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Percent`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeFloat64(float64(x.Percent)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Measured == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Measured, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Measured\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Measured`) - } - r.WriteMapElemValue() - if x.Measured == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Measured, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CpuStats) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap102 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray102 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102) - } - } -} - -func (x *CpuStats) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "SystemMode": - if r.TryDecodeAsNil() { - x.SystemMode = 0 - } else { - x.SystemMode = (float64)(r.DecodeFloat64()) - } - case "UserMode": - if r.TryDecodeAsNil() { - x.UserMode = 0 - } else { - x.UserMode = (float64)(r.DecodeFloat64()) - } - case "TotalTicks": - if r.TryDecodeAsNil() { - x.TotalTicks = 0 - } else { - x.TotalTicks = (float64)(r.DecodeFloat64()) - } - case "ThrottledPeriods": - if r.TryDecodeAsNil() { - x.ThrottledPeriods = 0 - } else { - x.ThrottledPeriods = (uint64)(r.DecodeUint64()) - } - case "ThrottledTime": - if r.TryDecodeAsNil() { - x.ThrottledTime = 0 - } else { - x.ThrottledTime = (uint64)(r.DecodeUint64()) - } - case "Percent": - if r.TryDecodeAsNil() { - x.Percent = 0 - } else { - x.Percent = (float64)(r.DecodeFloat64()) - } - case "Measured": - if r.TryDecodeAsNil() { - x.Measured = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Measured, d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CpuStats) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SystemMode = 0 - } else { - x.SystemMode = (float64)(r.DecodeFloat64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.UserMode = 0 - } else { - x.UserMode = (float64)(r.DecodeFloat64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TotalTicks = 0 - } else { - x.TotalTicks = (float64)(r.DecodeFloat64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ThrottledPeriods = 0 - } else { - x.ThrottledPeriods = (uint64)(r.DecodeUint64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ThrottledTime = 0 - } else { - x.ThrottledTime = (uint64)(r.DecodeUint64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Percent = 0 - } else { - x.Percent = (float64)(r.DecodeFloat64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Measured = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Measured, d) - } - } - for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj12-1, "") - } - r.ReadArrayEnd() -} - -func (x *ResourceUsage) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(3) - } else { - r.WriteMapStart(3) - } - var yyn3 bool - if x.MemoryStats == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.MemoryStats == nil { - r.EncodeNil() - } else { - x.MemoryStats.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MemoryStats\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `MemoryStats`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.MemoryStats == nil { - r.EncodeNil() - } else { - x.MemoryStats.CodecEncodeSelf(e) - } - } - } - var yyn6 bool - if x.CpuStats == nil { - yyn6 = true - goto LABEL6 - } - LABEL6: - if yyr2 || yy2arr2 { - if yyn6 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.CpuStats == nil { - r.EncodeNil() - } else { - x.CpuStats.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CpuStats\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `CpuStats`) - } - r.WriteMapElemValue() - if yyn6 { - r.EncodeNil() - } else { - if x.CpuStats == nil { - r.EncodeNil() - } else { - x.CpuStats.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.DeviceStats == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtodevice_DeviceGroupStats(([]*pkg2_device.DeviceGroupStats)(x.DeviceStats), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeviceStats\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `DeviceStats`) - } - r.WriteMapElemValue() - if x.DeviceStats == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtodevice_DeviceGroupStats(([]*pkg2_device.DeviceGroupStats)(x.DeviceStats), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ResourceUsage) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap102 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray102 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102) - } - } -} - -func (x *ResourceUsage) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "MemoryStats": - if r.TryDecodeAsNil() { - if true && x.MemoryStats != nil { - x.MemoryStats = nil - } - } else { - if x.MemoryStats == nil { - x.MemoryStats = new(MemoryStats) - } - - x.MemoryStats.CodecDecodeSelf(d) - } - case "CpuStats": - if r.TryDecodeAsNil() { - if true && x.CpuStats != nil { - x.CpuStats = nil - } - } else { - if x.CpuStats == nil { - x.CpuStats = new(CpuStats) - } - - x.CpuStats.CodecDecodeSelf(d) - } - case "DeviceStats": - if r.TryDecodeAsNil() { - x.DeviceStats = nil - } else { - if false { - } else { - h.decSlicePtrtodevice_DeviceGroupStats((*[]*pkg2_device.DeviceGroupStats)(&x.DeviceStats), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ResourceUsage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj8 int - var yyb8 bool - var yyhl8 bool = l >= 0 - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.MemoryStats != nil { - x.MemoryStats = nil - } - } else { - if x.MemoryStats == nil { - x.MemoryStats = new(MemoryStats) - } - - x.MemoryStats.CodecDecodeSelf(d) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.CpuStats != nil { - x.CpuStats = nil - } - } else { - if x.CpuStats == nil { - x.CpuStats = new(CpuStats) - } - - x.CpuStats.CodecDecodeSelf(d) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeviceStats = nil - } else { - if false { - } else { - h.decSlicePtrtodevice_DeviceGroupStats((*[]*pkg2_device.DeviceGroupStats)(&x.DeviceStats), d) - } - } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj8-1, "") - } - r.ReadArrayEnd() -} - -func (x *TaskResourceUsage) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(3) - } else { - r.WriteMapStart(3) - } - var yyn3 bool - if x.ResourceUsage == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ResourceUsage == nil { - r.EncodeNil() - } else { - x.ResourceUsage.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ResourceUsage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `ResourceUsage`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.ResourceUsage == nil { - r.EncodeNil() - } else { - x.ResourceUsage.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Timestamp)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Timestamp\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Timestamp`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Timestamp)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Pids == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoResourceUsage((map[string]*ResourceUsage)(x.Pids), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Pids\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Pids`) - } - r.WriteMapElemValue() - if x.Pids == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoResourceUsage((map[string]*ResourceUsage)(x.Pids), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *TaskResourceUsage) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap102 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray102 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102) - } - } -} - -func (x *TaskResourceUsage) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "ResourceUsage": - if r.TryDecodeAsNil() { - if true && x.ResourceUsage != nil { - x.ResourceUsage = nil - } - } else { - if x.ResourceUsage == nil { - x.ResourceUsage = new(ResourceUsage) - } - - x.ResourceUsage.CodecDecodeSelf(d) - } - case "Timestamp": - if r.TryDecodeAsNil() { - x.Timestamp = 0 - } else { - x.Timestamp = (int64)(r.DecodeInt64()) - } - case "Pids": - if r.TryDecodeAsNil() { - x.Pids = nil - } else { - if false { - } else { - h.decMapstringPtrtoResourceUsage((*map[string]*ResourceUsage)(&x.Pids), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *TaskResourceUsage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj8 int - var yyb8 bool - var yyhl8 bool = l >= 0 - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.ResourceUsage != nil { - x.ResourceUsage = nil - } - } else { - if x.ResourceUsage == nil { - x.ResourceUsage = new(ResourceUsage) - } - - x.ResourceUsage.CodecDecodeSelf(d) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Timestamp = 0 - } else { - x.Timestamp = (int64)(r.DecodeInt64()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Pids = nil - } else { - if false { - } else { - h.decMapstringPtrtoResourceUsage((*map[string]*ResourceUsage)(&x.Pids), d) - } - } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj8-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocResourceUsage) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(3) - } else { - r.WriteMapStart(3) - } - var yyn3 bool - if x.ResourceUsage == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ResourceUsage == nil { - r.EncodeNil() - } else { - x.ResourceUsage.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ResourceUsage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `ResourceUsage`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.ResourceUsage == nil { - r.EncodeNil() - } else { - x.ResourceUsage.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Tasks == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoTaskResourceUsage((map[string]*TaskResourceUsage)(x.Tasks), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Tasks\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Tasks`) - } - r.WriteMapElemValue() - if x.Tasks == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoTaskResourceUsage((map[string]*TaskResourceUsage)(x.Tasks), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Timestamp)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Timestamp\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Timestamp`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Timestamp)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocResourceUsage) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap102 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray102 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102) - } - } -} - -func (x *AllocResourceUsage) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "ResourceUsage": - if r.TryDecodeAsNil() { - if true && x.ResourceUsage != nil { - x.ResourceUsage = nil - } - } else { - if x.ResourceUsage == nil { - x.ResourceUsage = new(ResourceUsage) - } - - x.ResourceUsage.CodecDecodeSelf(d) - } - case "Tasks": - if r.TryDecodeAsNil() { - x.Tasks = nil - } else { - if false { - } else { - h.decMapstringPtrtoTaskResourceUsage((*map[string]*TaskResourceUsage)(&x.Tasks), d) - } - } - case "Timestamp": - if r.TryDecodeAsNil() { - x.Timestamp = 0 - } else { - x.Timestamp = (int64)(r.DecodeInt64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocResourceUsage) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj8 int - var yyb8 bool - var yyhl8 bool = l >= 0 - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.ResourceUsage != nil { - x.ResourceUsage = nil - } - } else { - if x.ResourceUsage == nil { - x.ResourceUsage = new(ResourceUsage) - } - - x.ResourceUsage.CodecDecodeSelf(d) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Tasks = nil - } else { - if false { - } else { - h.decMapstringPtrtoTaskResourceUsage((*map[string]*TaskResourceUsage)(&x.Tasks), d) - } - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Timestamp = 0 - } else { - x.Timestamp = (int64)(r.DecodeInt64()) - } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj8-1, "") - } - r.ReadArrayEnd() -} - -func (x *HealthCheckRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(0) - } else { - r.WriteMapStart(0) - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *HealthCheckRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap102 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray102 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102) - } - } -} - -func (x *HealthCheckRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *HealthCheckRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj4 int - var yyb4 bool - var yyhl4 bool = l >= 0 - for { - yyj4++ - if yyhl4 { - yyb4 = yyj4 > l - } else { - yyb4 = r.CheckBreak() - } - if yyb4 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj4-1, "") - } - r.ReadArrayEnd() -} - -func (x *HealthCheckResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Drivers == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtostructs_DriverInfo((map[string]*pkg4_structs.DriverInfo)(x.Drivers), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Drivers\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Drivers`) - } - r.WriteMapElemValue() - if x.Drivers == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtostructs_DriverInfo((map[string]*pkg4_structs.DriverInfo)(x.Drivers), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *HealthCheckResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap102 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray102 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102) - } - } -} - -func (x *HealthCheckResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Drivers": - if r.TryDecodeAsNil() { - x.Drivers = nil - } else { - if false { - } else { - h.decMapstringPtrtostructs_DriverInfo((*map[string]*pkg4_structs.DriverInfo)(&x.Drivers), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *HealthCheckResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Drivers = nil - } else { - if false { - } else { - h.decMapstringPtrtostructs_DriverInfo((*map[string]*pkg4_structs.DriverInfo)(&x.Drivers), d) - } - } - for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj6-1, "") - } - r.ReadArrayEnd() -} - -func (x *HealthCheckIntervalRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(0) - } else { - r.WriteMapStart(0) - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *HealthCheckIntervalRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap102 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray102 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102) - } - } -} - -func (x *HealthCheckIntervalRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *HealthCheckIntervalRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj4 int - var yyb4 bool - var yyhl4 bool = l >= 0 - for { - yyj4++ - if yyhl4 { - yyb4 = yyj4 > l - } else { - yyb4 = r.CheckBreak() - } - if yyb4 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj4-1, "") - } - r.ReadArrayEnd() -} - -func (x *HealthCheckIntervalResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(2) - } else { - r.WriteMapStart(2) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Eligible)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Eligible\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Eligible`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Eligible)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.Period)); yyxt7 != nil { - z.EncExtension(x.Period, yyxt7) - } else { - r.EncodeInt(int64(x.Period)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Period\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, `Period`) - } - r.WriteMapElemValue() - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.Period)); yyxt8 != nil { - z.EncExtension(x.Period, yyxt8) - } else { - r.EncodeInt(int64(x.Period)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *HealthCheckIntervalResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap102 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray102 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct102) - } - } -} - -func (x *HealthCheckIntervalResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Eligible": - if r.TryDecodeAsNil() { - x.Eligible = false - } else { - x.Eligible = (bool)(r.DecodeBool()) - } - case "Period": - if r.TryDecodeAsNil() { - x.Period = 0 - } else { - if false { - } else if yyxt6 := z.Extension(z.I2Rtid(x.Period)); yyxt6 != nil { - z.DecExtension(x.Period, yyxt6) - } else { - x.Period = (time.Duration)(r.DecodeInt64()) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *HealthCheckIntervalResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj7 int - var yyb7 bool - var yyhl7 bool = l >= 0 - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Eligible = false - } else { - x.Eligible = (bool)(r.DecodeBool()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Period = 0 - } else { - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.Period)); yyxt10 != nil { - z.DecExtension(x.Period, yyxt10) - } else { - x.Period = (time.Duration)(r.DecodeInt64()) - } - } - for { - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj7-1, "") - } - r.ReadArrayEnd() -} - -func (x codecSelfer102) encSlicePtrtoAllocFileInfo(v []*AllocFileInfo, e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer102) decSlicePtrtoAllocFileInfo(v *[]*AllocFileInfo, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*AllocFileInfo{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*AllocFileInfo, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*AllocFileInfo, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(AllocFileInfo) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*AllocFileInfo, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer102) encSlicePtrtodevice_DeviceGroupStats(v []*pkg2_device.DeviceGroupStats, e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt2 := z.Extension(z.I2Rtid(yyv1)); yyxt2 != nil { - z.EncExtension(yyv1, yyxt2) - } else { - z.EncFallback(yyv1) - } - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer102) decSlicePtrtodevice_DeviceGroupStats(v *[]*pkg2_device.DeviceGroupStats, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*pkg2_device.DeviceGroupStats{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*pkg2_device.DeviceGroupStats, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*pkg2_device.DeviceGroupStats, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(pkg2_device.DeviceGroupStats) - } - if false { - } else if yyxt3 := z.Extension(z.I2Rtid(yyv1[yyj1])); yyxt3 != nil { - z.DecExtension(yyv1[yyj1], yyxt3) - } else { - z.DecFallback(yyv1[yyj1], false) - } - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*pkg2_device.DeviceGroupStats, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer102) encMapstringPtrtoResourceUsage(v map[string]*ResourceUsage, e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyk1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(yyk1)) - } - } - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer102) decMapstringPtrtoResourceUsage(v *map[string]*ResourceUsage, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 24) - yyv1 = make(map[string]*ResourceUsage, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *ResourceUsage - var yymg1, yymdn1, yyms1, yymok1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - yyms1 = true - if yymg1 { - yymv1, yymok1 = yyv1[yymk1] - if yymok1 { - yyms1 = false - } - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - if yymv1 == nil { - yymv1 = new(ResourceUsage) - } - yymv1.CodecDecodeSelf(d) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyms1 && yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer102) encMapstringPtrtoTaskResourceUsage(v map[string]*TaskResourceUsage, e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyk1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(yyk1)) - } - } - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer102) decMapstringPtrtoTaskResourceUsage(v *map[string]*TaskResourceUsage, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 24) - yyv1 = make(map[string]*TaskResourceUsage, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *TaskResourceUsage - var yymg1, yymdn1, yyms1, yymok1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - yyms1 = true - if yymg1 { - yymv1, yymok1 = yyv1[yymk1] - if yymok1 { - yyms1 = false - } - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - if yymv1 == nil { - yymv1 = new(TaskResourceUsage) - } - yymv1.CodecDecodeSelf(d) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyms1 && yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer102) encMapstringPtrtostructs_DriverInfo(v map[string]*pkg4_structs.DriverInfo, e *codec1978.Encoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyk1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8102, string(yyk1)) - } - } - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt3 := z.Extension(z.I2Rtid(yyv1)); yyxt3 != nil { - z.EncExtension(yyv1, yyxt3) - } else { - z.EncFallback(yyv1) - } - } - } - r.WriteMapEnd() -} - -func (x codecSelfer102) decMapstringPtrtostructs_DriverInfo(v *map[string]*pkg4_structs.DriverInfo, d *codec1978.Decoder) { - var h codecSelfer102 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 24) - yyv1 = make(map[string]*pkg4_structs.DriverInfo, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *pkg4_structs.DriverInfo - var yymg1, yymdn1, yyms1, yymok1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - yyms1 = true - if yymg1 { - yymv1, yymok1 = yyv1[yymk1] - if yymok1 { - yyms1 = false - } - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - if yymv1 == nil { - yymv1 = new(pkg4_structs.DriverInfo) - } - if false { - } else if yyxt4 := z.Extension(z.I2Rtid(yymv1)); yyxt4 != nil { - z.DecExtension(yymv1, yyxt4) - } else { - z.DecFallback(yymv1, false) - } - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyms1 && yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} diff --git a/nomad/structs/structs.generated.go b/nomad/structs/structs.generated.go deleted file mode 100644 index afca3d6f9..000000000 --- a/nomad/structs/structs.generated.go +++ /dev/null @@ -1,106164 +0,0 @@ -// +build codec_generated - -// Code generated by codecgen - DO NOT EDIT. - -package structs - -import ( - "errors" - pkg3_acl "github.com/hashicorp/nomad/acl" - pkg1_structs "github.com/hashicorp/nomad/plugins/shared/structs" - pkg2_raft "github.com/hashicorp/raft" - codec1978 "github.com/ugorji/go/codec" - "net" - "runtime" - "strconv" - "time" -) - -const ( - // ----- content types ---- - codecSelferCcUTF8100 = 1 - codecSelferCcRAW100 = 255 - // ----- value types used ---- - codecSelferValueTypeArray100 = 10 - codecSelferValueTypeMap100 = 9 - codecSelferValueTypeString100 = 6 - codecSelferValueTypeInt100 = 2 - codecSelferValueTypeUint100 = 3 - codecSelferValueTypeFloat100 = 4 - codecSelferBitsize100 = uint8(32 << (^uint(0) >> 63)) -) - -var ( - errCodecSelferOnlyMapOrArrayEncodeToStruct100 = errors.New(`only encoded map or array can be decoded into a struct`) -) - -type codecSelfer100 struct{} - -func init() { - if codec1978.GenVersion != 10 { - _, file, _, _ := runtime.Caller(0) - panic("codecgen version mismatch: current: 10, need " + strconv.FormatInt(int64(codec1978.GenVersion), 10) + ". Re-generate file: " + file) - } - if false { - var _ byte = 0 // reference the types, but skip this branch at build/run time - var v0 pkg3_acl.Policy - var v1 pkg1_structs.Attribute - var v2 pkg2_raft.ServerID - var v3 net.IP - var v4 time.Time - _, _, _, _, _ = v0, v1, v2, v3, v4 - } -} - -func (x *BatchFuture) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(0) - } else { - r.WriteMapStart(0) - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *BatchFuture) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *BatchFuture) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *BatchFuture) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj4 int - var yyb4 bool - var yyhl4 bool = l >= 0 - for { - yyj4++ - if yyhl4 { - yyb4 = yyj4 > l - } else { - yyb4 = r.CheckBreak() - } - if yyb4 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj4-1, "") - } - r.ReadArrayEnd() -} - -func (x Bitmap) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - h.encBitmap((Bitmap)(x), e) - } - } -} - -func (x *Bitmap) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - h.decBitmap((*Bitmap)(x), d) - } -} - -func (x *DeviceAccounter) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Devices == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapDeviceIdTuplePtrtoDeviceAccounterInstance((map[DeviceIdTuple]*DeviceAccounterInstance)(x.Devices), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Devices\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Devices`) - } - r.WriteMapElemValue() - if x.Devices == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapDeviceIdTuplePtrtoDeviceAccounterInstance((map[DeviceIdTuple]*DeviceAccounterInstance)(x.Devices), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DeviceAccounter) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *DeviceAccounter) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Devices": - if r.TryDecodeAsNil() { - x.Devices = nil - } else { - if false { - } else { - h.decMapDeviceIdTuplePtrtoDeviceAccounterInstance((*map[DeviceIdTuple]*DeviceAccounterInstance)(&x.Devices), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DeviceAccounter) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Devices = nil - } else { - if false { - } else { - h.decMapDeviceIdTuplePtrtoDeviceAccounterInstance((*map[DeviceIdTuple]*DeviceAccounterInstance)(&x.Devices), d) - } - } - for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj6-1, "") - } - r.ReadArrayEnd() -} - -func (x *DeviceAccounterInstance) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(2) - } else { - r.WriteMapStart(2) - } - var yyn3 bool - if x.Device == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Device == nil { - r.EncodeNil() - } else { - x.Device.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Device\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Device`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Device == nil { - r.EncodeNil() - } else { - x.Device.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Instances == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntV(x.Instances, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Instances\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Instances`) - } - r.WriteMapElemValue() - if x.Instances == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntV(x.Instances, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DeviceAccounterInstance) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *DeviceAccounterInstance) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Device": - if r.TryDecodeAsNil() { - if true && x.Device != nil { - x.Device = nil - } - } else { - if x.Device == nil { - x.Device = new(NodeDeviceResource) - } - - x.Device.CodecDecodeSelf(d) - } - case "Instances": - if r.TryDecodeAsNil() { - x.Instances = nil - } else { - if false { - } else { - z.F.DecMapStringIntX(&x.Instances, d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DeviceAccounterInstance) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj7 int - var yyb7 bool - var yyhl7 bool = l >= 0 - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Device != nil { - x.Device = nil - } - } else { - if x.Device == nil { - x.Device = new(NodeDeviceResource) - } - - x.Device.CodecDecodeSelf(d) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Instances = nil - } else { - if false { - } else { - z.F.DecMapStringIntX(&x.Instances, d) - } - } - for { - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj7-1, "") - } - r.ReadArrayEnd() -} - -func (x DiffType) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x)) - } - } -} - -func (x *DiffType) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - *x = (DiffType)(r.DecodeString()) - } -} - -func (x *JobDiff) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.Type.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Type\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Type`) - } - r.WriteMapElemValue() - x.Type.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Fields == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoFieldDiff(([]*FieldDiff)(x.Fields), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Fields\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Fields`) - } - r.WriteMapElemValue() - if x.Fields == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoFieldDiff(([]*FieldDiff)(x.Fields), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Objects == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoObjectDiff(([]*ObjectDiff)(x.Objects), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Objects\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Objects`) - } - r.WriteMapElemValue() - if x.Objects == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoObjectDiff(([]*ObjectDiff)(x.Objects), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.TaskGroups == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoTaskGroupDiff(([]*TaskGroupDiff)(x.TaskGroups), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TaskGroups\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TaskGroups`) - } - r.WriteMapElemValue() - if x.TaskGroups == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoTaskGroupDiff(([]*TaskGroupDiff)(x.TaskGroups), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobDiff) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobDiff) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type.CodecDecodeSelf(d) - } - case "ID": - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - case "Fields": - if r.TryDecodeAsNil() { - x.Fields = nil - } else { - if false { - } else { - h.decSlicePtrtoFieldDiff((*[]*FieldDiff)(&x.Fields), d) - } - } - case "Objects": - if r.TryDecodeAsNil() { - x.Objects = nil - } else { - if false { - } else { - h.decSlicePtrtoObjectDiff((*[]*ObjectDiff)(&x.Objects), d) - } - } - case "TaskGroups": - if r.TryDecodeAsNil() { - x.TaskGroups = nil - } else { - if false { - } else { - h.decSlicePtrtoTaskGroupDiff((*[]*TaskGroupDiff)(&x.TaskGroups), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobDiff) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Fields = nil - } else { - if false { - } else { - h.decSlicePtrtoFieldDiff((*[]*FieldDiff)(&x.Fields), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Objects = nil - } else { - if false { - } else { - h.decSlicePtrtoObjectDiff((*[]*ObjectDiff)(&x.Objects), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskGroups = nil - } else { - if false { - } else { - h.decSlicePtrtoTaskGroupDiff((*[]*TaskGroupDiff)(&x.TaskGroups), d) - } - } - for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj12-1, "") - } - r.ReadArrayEnd() -} - -func (x *TaskGroupDiff) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(6) - } else { - r.WriteMapStart(6) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.Type.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Type\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Type`) - } - r.WriteMapElemValue() - x.Type.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Fields == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoFieldDiff(([]*FieldDiff)(x.Fields), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Fields\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Fields`) - } - r.WriteMapElemValue() - if x.Fields == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoFieldDiff(([]*FieldDiff)(x.Fields), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Objects == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoObjectDiff(([]*ObjectDiff)(x.Objects), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Objects\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Objects`) - } - r.WriteMapElemValue() - if x.Objects == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoObjectDiff(([]*ObjectDiff)(x.Objects), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Tasks == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoTaskDiff(([]*TaskDiff)(x.Tasks), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Tasks\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Tasks`) - } - r.WriteMapElemValue() - if x.Tasks == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoTaskDiff(([]*TaskDiff)(x.Tasks), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Updates == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringUint64V(x.Updates, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Updates\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Updates`) - } - r.WriteMapElemValue() - if x.Updates == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringUint64V(x.Updates, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *TaskGroupDiff) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *TaskGroupDiff) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type.CodecDecodeSelf(d) - } - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Fields": - if r.TryDecodeAsNil() { - x.Fields = nil - } else { - if false { - } else { - h.decSlicePtrtoFieldDiff((*[]*FieldDiff)(&x.Fields), d) - } - } - case "Objects": - if r.TryDecodeAsNil() { - x.Objects = nil - } else { - if false { - } else { - h.decSlicePtrtoObjectDiff((*[]*ObjectDiff)(&x.Objects), d) - } - } - case "Tasks": - if r.TryDecodeAsNil() { - x.Tasks = nil - } else { - if false { - } else { - h.decSlicePtrtoTaskDiff((*[]*TaskDiff)(&x.Tasks), d) - } - } - case "Updates": - if r.TryDecodeAsNil() { - x.Updates = nil - } else { - if false { - } else { - z.F.DecMapStringUint64X(&x.Updates, d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *TaskGroupDiff) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj14 int - var yyb14 bool - var yyhl14 bool = l >= 0 - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type.CodecDecodeSelf(d) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Fields = nil - } else { - if false { - } else { - h.decSlicePtrtoFieldDiff((*[]*FieldDiff)(&x.Fields), d) - } - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Objects = nil - } else { - if false { - } else { - h.decSlicePtrtoObjectDiff((*[]*ObjectDiff)(&x.Objects), d) - } - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Tasks = nil - } else { - if false { - } else { - h.decSlicePtrtoTaskDiff((*[]*TaskDiff)(&x.Tasks), d) - } - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Updates = nil - } else { - if false { - } else { - z.F.DecMapStringUint64X(&x.Updates, d) - } - } - for { - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj14-1, "") - } - r.ReadArrayEnd() -} - -func (x TaskGroupDiffs) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - h.encTaskGroupDiffs((TaskGroupDiffs)(x), e) - } - } -} - -func (x *TaskGroupDiffs) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - h.decTaskGroupDiffs((*TaskGroupDiffs)(x), d) - } -} - -func (x *TaskDiff) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.Type.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Type\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Type`) - } - r.WriteMapElemValue() - x.Type.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Fields == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoFieldDiff(([]*FieldDiff)(x.Fields), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Fields\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Fields`) - } - r.WriteMapElemValue() - if x.Fields == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoFieldDiff(([]*FieldDiff)(x.Fields), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Objects == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoObjectDiff(([]*ObjectDiff)(x.Objects), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Objects\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Objects`) - } - r.WriteMapElemValue() - if x.Objects == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoObjectDiff(([]*ObjectDiff)(x.Objects), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Annotations == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Annotations, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Annotations\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Annotations`) - } - r.WriteMapElemValue() - if x.Annotations == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Annotations, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *TaskDiff) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *TaskDiff) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type.CodecDecodeSelf(d) - } - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Fields": - if r.TryDecodeAsNil() { - x.Fields = nil - } else { - if false { - } else { - h.decSlicePtrtoFieldDiff((*[]*FieldDiff)(&x.Fields), d) - } - } - case "Objects": - if r.TryDecodeAsNil() { - x.Objects = nil - } else { - if false { - } else { - h.decSlicePtrtoObjectDiff((*[]*ObjectDiff)(&x.Objects), d) - } - } - case "Annotations": - if r.TryDecodeAsNil() { - x.Annotations = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Annotations, d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *TaskDiff) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Fields = nil - } else { - if false { - } else { - h.decSlicePtrtoFieldDiff((*[]*FieldDiff)(&x.Fields), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Objects = nil - } else { - if false { - } else { - h.decSlicePtrtoObjectDiff((*[]*ObjectDiff)(&x.Objects), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Annotations = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Annotations, d) - } - } - for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj12-1, "") - } - r.ReadArrayEnd() -} - -func (x TaskDiffs) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - h.encTaskDiffs((TaskDiffs)(x), e) - } - } -} - -func (x *TaskDiffs) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - h.decTaskDiffs((*TaskDiffs)(x), d) - } -} - -func (x *ObjectDiff) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.Type.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Type\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Type`) - } - r.WriteMapElemValue() - x.Type.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Fields == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoFieldDiff(([]*FieldDiff)(x.Fields), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Fields\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Fields`) - } - r.WriteMapElemValue() - if x.Fields == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoFieldDiff(([]*FieldDiff)(x.Fields), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Objects == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoObjectDiff(([]*ObjectDiff)(x.Objects), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Objects\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Objects`) - } - r.WriteMapElemValue() - if x.Objects == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoObjectDiff(([]*ObjectDiff)(x.Objects), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ObjectDiff) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ObjectDiff) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type.CodecDecodeSelf(d) - } - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Fields": - if r.TryDecodeAsNil() { - x.Fields = nil - } else { - if false { - } else { - h.decSlicePtrtoFieldDiff((*[]*FieldDiff)(&x.Fields), d) - } - } - case "Objects": - if r.TryDecodeAsNil() { - x.Objects = nil - } else { - if false { - } else { - h.decSlicePtrtoObjectDiff((*[]*ObjectDiff)(&x.Objects), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ObjectDiff) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type.CodecDecodeSelf(d) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Fields = nil - } else { - if false { - } else { - h.decSlicePtrtoFieldDiff((*[]*FieldDiff)(&x.Fields), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Objects = nil - } else { - if false { - } else { - h.decSlicePtrtoObjectDiff((*[]*ObjectDiff)(&x.Objects), d) - } - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x ObjectDiffs) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - h.encObjectDiffs((ObjectDiffs)(x), e) - } - } -} - -func (x *ObjectDiffs) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - h.decObjectDiffs((*ObjectDiffs)(x), d) - } -} - -func (x *FieldDiff) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.Type.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Type\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Type`) - } - r.WriteMapElemValue() - x.Type.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Old))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Old)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Old\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Old`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Old))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Old)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.New))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.New)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"New\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `New`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.New))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.New)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Annotations == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Annotations, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Annotations\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Annotations`) - } - r.WriteMapElemValue() - if x.Annotations == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Annotations, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *FieldDiff) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *FieldDiff) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type.CodecDecodeSelf(d) - } - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Old": - if r.TryDecodeAsNil() { - x.Old = "" - } else { - x.Old = (string)(r.DecodeString()) - } - case "New": - if r.TryDecodeAsNil() { - x.New = "" - } else { - x.New = (string)(r.DecodeString()) - } - case "Annotations": - if r.TryDecodeAsNil() { - x.Annotations = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Annotations, d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *FieldDiff) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type.CodecDecodeSelf(d) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Old = "" - } else { - x.Old = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.New = "" - } else { - x.New = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Annotations = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Annotations, d) - } - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x FieldDiffs) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - h.encFieldDiffs((FieldDiffs)(x), e) - } - } -} - -func (x *FieldDiffs) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - h.decFieldDiffs((*FieldDiffs)(x), d) - } -} - -func (x *NetworkIndex) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.AvailNetworks == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNetworkResource(([]*NetworkResource)(x.AvailNetworks), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AvailNetworks\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AvailNetworks`) - } - r.WriteMapElemValue() - if x.AvailNetworks == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNetworkResource(([]*NetworkResource)(x.AvailNetworks), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.AvailBandwidth == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntV(x.AvailBandwidth, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AvailBandwidth\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AvailBandwidth`) - } - r.WriteMapElemValue() - if x.AvailBandwidth == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntV(x.AvailBandwidth, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.UsedPorts == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringBitmap((map[string]Bitmap)(x.UsedPorts), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"UsedPorts\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `UsedPorts`) - } - r.WriteMapElemValue() - if x.UsedPorts == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringBitmap((map[string]Bitmap)(x.UsedPorts), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.UsedBandwidth == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntV(x.UsedBandwidth, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"UsedBandwidth\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `UsedBandwidth`) - } - r.WriteMapElemValue() - if x.UsedBandwidth == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntV(x.UsedBandwidth, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NetworkIndex) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NetworkIndex) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "AvailNetworks": - if r.TryDecodeAsNil() { - x.AvailNetworks = nil - } else { - if false { - } else { - h.decSlicePtrtoNetworkResource((*[]*NetworkResource)(&x.AvailNetworks), d) - } - } - case "AvailBandwidth": - if r.TryDecodeAsNil() { - x.AvailBandwidth = nil - } else { - if false { - } else { - z.F.DecMapStringIntX(&x.AvailBandwidth, d) - } - } - case "UsedPorts": - if r.TryDecodeAsNil() { - x.UsedPorts = nil - } else { - if false { - } else { - h.decMapstringBitmap((*map[string]Bitmap)(&x.UsedPorts), d) - } - } - case "UsedBandwidth": - if r.TryDecodeAsNil() { - x.UsedBandwidth = nil - } else { - if false { - } else { - z.F.DecMapStringIntX(&x.UsedBandwidth, d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NetworkIndex) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AvailNetworks = nil - } else { - if false { - } else { - h.decSlicePtrtoNetworkResource((*[]*NetworkResource)(&x.AvailNetworks), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AvailBandwidth = nil - } else { - if false { - } else { - z.F.DecMapStringIntX(&x.AvailBandwidth, d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.UsedPorts = nil - } else { - if false { - } else { - h.decMapstringBitmap((*map[string]Bitmap)(&x.UsedPorts), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.UsedBandwidth = nil - } else { - if false { - } else { - z.F.DecMapStringIntX(&x.UsedBandwidth, d) - } - } - for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj12-1, "") - } - r.ReadArrayEnd() -} - -func (x *DriverInfo) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Attributes == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Attributes, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Attributes\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Attributes`) - } - r.WriteMapElemValue() - if x.Attributes == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Attributes, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Detected)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Detected\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Detected`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Detected)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Healthy)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Healthy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Healthy`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Healthy)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.HealthDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.HealthDescription)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"HealthDescription\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `HealthDescription`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.HealthDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.HealthDescription)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.UpdateTime) - } else if yyxt16 := z.Extension(z.I2Rtid(x.UpdateTime)); yyxt16 != nil { - z.EncExtension(x.UpdateTime, yyxt16) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.UpdateTime) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.UpdateTime) - } else { - z.EncFallback(x.UpdateTime) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"UpdateTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `UpdateTime`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.UpdateTime) - } else if yyxt17 := z.Extension(z.I2Rtid(x.UpdateTime)); yyxt17 != nil { - z.EncExtension(x.UpdateTime, yyxt17) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.UpdateTime) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.UpdateTime) - } else { - z.EncFallback(x.UpdateTime) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DriverInfo) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *DriverInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Attributes": - if r.TryDecodeAsNil() { - x.Attributes = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Attributes, d) - } - } - case "Detected": - if r.TryDecodeAsNil() { - x.Detected = false - } else { - x.Detected = (bool)(r.DecodeBool()) - } - case "Healthy": - if r.TryDecodeAsNil() { - x.Healthy = false - } else { - x.Healthy = (bool)(r.DecodeBool()) - } - case "HealthDescription": - if r.TryDecodeAsNil() { - x.HealthDescription = "" - } else { - x.HealthDescription = (string)(r.DecodeString()) - } - case "UpdateTime": - if r.TryDecodeAsNil() { - x.UpdateTime = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.UpdateTime = r.DecodeTime() - } else if yyxt10 := z.Extension(z.I2Rtid(x.UpdateTime)); yyxt10 != nil { - z.DecExtension(x.UpdateTime, yyxt10) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.UpdateTime) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.UpdateTime) - } else { - z.DecFallback(&x.UpdateTime, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DriverInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Attributes = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Attributes, d) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Detected = false - } else { - x.Detected = (bool)(r.DecodeBool()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Healthy = false - } else { - x.Healthy = (bool)(r.DecodeBool()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.HealthDescription = "" - } else { - x.HealthDescription = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.UpdateTime = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.UpdateTime = r.DecodeTime() - } else if yyxt18 := z.Extension(z.I2Rtid(x.UpdateTime)); yyxt18 != nil { - z.DecExtension(x.UpdateTime, yyxt18) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.UpdateTime) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.UpdateTime) - } else { - z.DecFallback(&x.UpdateTime, false) - } - } - for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj11-1, "") - } - r.ReadArrayEnd() -} - -func (x *RaftServer) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(6) - } else { - r.WriteMapStart(6) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt4 := z.Extension(z.I2Rtid(x.ID)); yyxt4 != nil { - z.EncExtension(x.ID, yyxt4) - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ID`) - } - r.WriteMapElemValue() - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.ID)); yyxt5 != nil { - z.EncExtension(x.ID, yyxt5) - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Node))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Node)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Node\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Node`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Node))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Node)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.Address)); yyxt10 != nil { - z.EncExtension(x.Address, yyxt10) - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Address))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Address)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Address\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Address`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.Address)); yyxt11 != nil { - z.EncExtension(x.Address, yyxt11) - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Address))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Address)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Leader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Leader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Leader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Leader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Voter)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Voter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Voter`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Voter)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.RaftProtocol))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.RaftProtocol)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RaftProtocol\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RaftProtocol`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.RaftProtocol))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.RaftProtocol)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *RaftServer) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *RaftServer) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "ID": - if r.TryDecodeAsNil() { - x.ID = "" - } else { - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.ID)); yyxt5 != nil { - z.DecExtension(x.ID, yyxt5) - } else { - x.ID = (pkg2_raft.ServerID)(r.DecodeString()) - } - } - case "Node": - if r.TryDecodeAsNil() { - x.Node = "" - } else { - x.Node = (string)(r.DecodeString()) - } - case "Address": - if r.TryDecodeAsNil() { - x.Address = "" - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.Address)); yyxt8 != nil { - z.DecExtension(x.Address, yyxt8) - } else { - x.Address = (pkg2_raft.ServerAddress)(r.DecodeString()) - } - } - case "Leader": - if r.TryDecodeAsNil() { - x.Leader = false - } else { - x.Leader = (bool)(r.DecodeBool()) - } - case "Voter": - if r.TryDecodeAsNil() { - x.Voter = false - } else { - x.Voter = (bool)(r.DecodeBool()) - } - case "RaftProtocol": - if r.TryDecodeAsNil() { - x.RaftProtocol = "" - } else { - x.RaftProtocol = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *RaftServer) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.ID)); yyxt14 != nil { - z.DecExtension(x.ID, yyxt14) - } else { - x.ID = (pkg2_raft.ServerID)(r.DecodeString()) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Node = "" - } else { - x.Node = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Address = "" - } else { - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.Address)); yyxt17 != nil { - z.DecExtension(x.Address, yyxt17) - } else { - x.Address = (pkg2_raft.ServerAddress)(r.DecodeString()) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Leader = false - } else { - x.Leader = (bool)(r.DecodeBool()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Voter = false - } else { - x.Voter = (bool)(r.DecodeBool()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RaftProtocol = "" - } else { - x.RaftProtocol = (string)(r.DecodeString()) - } - for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj12-1, "") - } - r.ReadArrayEnd() -} - -func (x *RaftConfigurationResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(2) - } else { - r.WriteMapStart(2) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Servers == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoRaftServer(([]*RaftServer)(x.Servers), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Servers\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Servers`) - } - r.WriteMapElemValue() - if x.Servers == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoRaftServer(([]*RaftServer)(x.Servers), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *RaftConfigurationResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *RaftConfigurationResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Servers": - if r.TryDecodeAsNil() { - x.Servers = nil - } else { - if false { - } else { - h.decSlicePtrtoRaftServer((*[]*RaftServer)(&x.Servers), d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *RaftConfigurationResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj7 int - var yyb7 bool - var yyhl7 bool = l >= 0 - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Servers = nil - } else { - if false { - } else { - h.decSlicePtrtoRaftServer((*[]*RaftServer)(&x.Servers), d) - } - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - for { - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj7-1, "") - } - r.ReadArrayEnd() -} - -func (x *RaftPeerByAddressRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt4 := z.Extension(z.I2Rtid(x.Address)); yyxt4 != nil { - z.EncExtension(x.Address, yyxt4) - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Address))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Address)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Address\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Address`) - } - r.WriteMapElemValue() - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.Address)); yyxt5 != nil { - z.EncExtension(x.Address, yyxt5) - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Address))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Address)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *RaftPeerByAddressRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *RaftPeerByAddressRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Address": - if r.TryDecodeAsNil() { - x.Address = "" - } else { - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.Address)); yyxt5 != nil { - z.DecExtension(x.Address, yyxt5) - } else { - x.Address = (pkg2_raft.ServerAddress)(r.DecodeString()) - } - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *RaftPeerByAddressRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Address = "" - } else { - if false { - } else if yyxt12 := z.Extension(z.I2Rtid(x.Address)); yyxt12 != nil { - z.DecExtension(x.Address, yyxt12) - } else { - x.Address = (pkg2_raft.ServerAddress)(r.DecodeString()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *RaftPeerByIDRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt4 := z.Extension(z.I2Rtid(x.ID)); yyxt4 != nil { - z.EncExtension(x.ID, yyxt4) - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ID`) - } - r.WriteMapElemValue() - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.ID)); yyxt5 != nil { - z.EncExtension(x.ID, yyxt5) - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *RaftPeerByIDRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *RaftPeerByIDRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "ID": - if r.TryDecodeAsNil() { - x.ID = "" - } else { - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.ID)); yyxt5 != nil { - z.DecExtension(x.ID, yyxt5) - } else { - x.ID = (pkg2_raft.ServerID)(r.DecodeString()) - } - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *RaftPeerByIDRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - if false { - } else if yyxt12 := z.Extension(z.I2Rtid(x.ID)); yyxt12 != nil { - z.DecExtension(x.ID, yyxt12) - } else { - x.ID = (pkg2_raft.ServerID)(r.DecodeString()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *AutopilotSetConfigRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(7) - } else { - r.WriteMapStart(7) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Datacenter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Datacenter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Datacenter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Datacenter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Datacenter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Datacenter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - yy7 := &x.Config - yy7.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Config\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Config`) - } - r.WriteMapElemValue() - yy9 := &x.Config - yy9.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.CAS)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CAS\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CAS`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.CAS)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AutopilotSetConfigRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *AutopilotSetConfigRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Datacenter": - if r.TryDecodeAsNil() { - x.Datacenter = "" - } else { - x.Datacenter = (string)(r.DecodeString()) - } - case "Config": - if r.TryDecodeAsNil() { - x.Config = AutopilotConfig{} - } else { - x.Config.CodecDecodeSelf(d) - } - case "CAS": - if r.TryDecodeAsNil() { - x.CAS = false - } else { - x.CAS = (bool)(r.DecodeBool()) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AutopilotSetConfigRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Datacenter = "" - } else { - x.Datacenter = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Config = AutopilotConfig{} - } else { - x.Config.CodecDecodeSelf(d) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CAS = false - } else { - x.CAS = (bool)(r.DecodeBool()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj11-1, "") - } - r.ReadArrayEnd() -} - -func (x *AutopilotConfig) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(9) - } else { - r.WriteMapStart(9) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.CleanupDeadServers)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CleanupDeadServers\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CleanupDeadServers`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.CleanupDeadServers)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.ServerStabilizationTime)); yyxt7 != nil { - z.EncExtension(x.ServerStabilizationTime, yyxt7) - } else { - r.EncodeInt(int64(x.ServerStabilizationTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ServerStabilizationTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ServerStabilizationTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.ServerStabilizationTime)); yyxt8 != nil { - z.EncExtension(x.ServerStabilizationTime, yyxt8) - } else { - r.EncodeInt(int64(x.ServerStabilizationTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContactThreshold)); yyxt10 != nil { - z.EncExtension(x.LastContactThreshold, yyxt10) - } else { - r.EncodeInt(int64(x.LastContactThreshold)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContactThreshold\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContactThreshold`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContactThreshold)); yyxt11 != nil { - z.EncExtension(x.LastContactThreshold, yyxt11) - } else { - r.EncodeInt(int64(x.LastContactThreshold)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MaxTrailingLogs)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxTrailingLogs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxTrailingLogs`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MaxTrailingLogs)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.EnableRedundancyZones)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EnableRedundancyZones\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EnableRedundancyZones`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.EnableRedundancyZones)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.DisableUpgradeMigration)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DisableUpgradeMigration\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DisableUpgradeMigration`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.DisableUpgradeMigration)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.EnableCustomUpgrades)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EnableCustomUpgrades\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EnableCustomUpgrades`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.EnableCustomUpgrades)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AutopilotConfig) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *AutopilotConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "CleanupDeadServers": - if r.TryDecodeAsNil() { - x.CleanupDeadServers = false - } else { - x.CleanupDeadServers = (bool)(r.DecodeBool()) - } - case "ServerStabilizationTime": - if r.TryDecodeAsNil() { - x.ServerStabilizationTime = 0 - } else { - if false { - } else if yyxt6 := z.Extension(z.I2Rtid(x.ServerStabilizationTime)); yyxt6 != nil { - z.DecExtension(x.ServerStabilizationTime, yyxt6) - } else { - x.ServerStabilizationTime = (time.Duration)(r.DecodeInt64()) - } - } - case "LastContactThreshold": - if r.TryDecodeAsNil() { - x.LastContactThreshold = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.LastContactThreshold)); yyxt8 != nil { - z.DecExtension(x.LastContactThreshold, yyxt8) - } else { - x.LastContactThreshold = (time.Duration)(r.DecodeInt64()) - } - } - case "MaxTrailingLogs": - if r.TryDecodeAsNil() { - x.MaxTrailingLogs = 0 - } else { - x.MaxTrailingLogs = (uint64)(r.DecodeUint64()) - } - case "EnableRedundancyZones": - if r.TryDecodeAsNil() { - x.EnableRedundancyZones = false - } else { - x.EnableRedundancyZones = (bool)(r.DecodeBool()) - } - case "DisableUpgradeMigration": - if r.TryDecodeAsNil() { - x.DisableUpgradeMigration = false - } else { - x.DisableUpgradeMigration = (bool)(r.DecodeBool()) - } - case "EnableCustomUpgrades": - if r.TryDecodeAsNil() { - x.EnableCustomUpgrades = false - } else { - x.EnableCustomUpgrades = (bool)(r.DecodeBool()) - } - case "CreateIndex": - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - case "ModifyIndex": - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AutopilotConfig) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj15 int - var yyb15 bool - var yyhl15 bool = l >= 0 - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CleanupDeadServers = false - } else { - x.CleanupDeadServers = (bool)(r.DecodeBool()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ServerStabilizationTime = 0 - } else { - if false { - } else if yyxt18 := z.Extension(z.I2Rtid(x.ServerStabilizationTime)); yyxt18 != nil { - z.DecExtension(x.ServerStabilizationTime, yyxt18) - } else { - x.ServerStabilizationTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LastContactThreshold = 0 - } else { - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.LastContactThreshold)); yyxt20 != nil { - z.DecExtension(x.LastContactThreshold, yyxt20) - } else { - x.LastContactThreshold = (time.Duration)(r.DecodeInt64()) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MaxTrailingLogs = 0 - } else { - x.MaxTrailingLogs = (uint64)(r.DecodeUint64()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EnableRedundancyZones = false - } else { - x.EnableRedundancyZones = (bool)(r.DecodeBool()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DisableUpgradeMigration = false - } else { - x.DisableUpgradeMigration = (bool)(r.DecodeBool()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EnableCustomUpgrades = false - } else { - x.EnableCustomUpgrades = (bool)(r.DecodeBool()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - for { - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj15-1, "") - } - r.ReadArrayEnd() -} - -func (x *SchedulerConfiguration) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(3) - } else { - r.WriteMapStart(3) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - yy4 := &x.PreemptionConfig - yy4.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PreemptionConfig\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PreemptionConfig`) - } - r.WriteMapElemValue() - yy6 := &x.PreemptionConfig - yy6.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *SchedulerConfiguration) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *SchedulerConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "PreemptionConfig": - if r.TryDecodeAsNil() { - x.PreemptionConfig = PreemptionConfig{} - } else { - x.PreemptionConfig.CodecDecodeSelf(d) - } - case "CreateIndex": - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - case "ModifyIndex": - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *SchedulerConfiguration) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj7 int - var yyb7 bool - var yyhl7 bool = l >= 0 - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreemptionConfig = PreemptionConfig{} - } else { - x.PreemptionConfig.CodecDecodeSelf(d) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - for { - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj7-1, "") - } - r.ReadArrayEnd() -} - -func (x *SchedulerConfigurationResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - var yyn3 bool - if x.SchedulerConfig == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.SchedulerConfig == nil { - r.EncodeNil() - } else { - x.SchedulerConfig.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SchedulerConfig\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SchedulerConfig`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.SchedulerConfig == nil { - r.EncodeNil() - } else { - x.SchedulerConfig.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *SchedulerConfigurationResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *SchedulerConfigurationResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "SchedulerConfig": - if r.TryDecodeAsNil() { - if true && x.SchedulerConfig != nil { - x.SchedulerConfig = nil - } - } else { - if x.SchedulerConfig == nil { - x.SchedulerConfig = new(SchedulerConfiguration) - } - - x.SchedulerConfig.CodecDecodeSelf(d) - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.LastContact)); yyxt7 != nil { - z.DecExtension(x.LastContact, yyxt7) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *SchedulerConfigurationResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.SchedulerConfig != nil { - x.SchedulerConfig = nil - } - } else { - if x.SchedulerConfig == nil { - x.SchedulerConfig = new(SchedulerConfiguration) - } - - x.SchedulerConfig.CodecDecodeSelf(d) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.LastContact)); yyxt13 != nil { - z.DecExtension(x.LastContact, yyxt13) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *SchedulerSetConfigurationResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(2) - } else { - r.WriteMapStart(2) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Updated)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Updated\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Updated`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Updated)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *SchedulerSetConfigurationResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *SchedulerSetConfigurationResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Updated": - if r.TryDecodeAsNil() { - x.Updated = false - } else { - x.Updated = (bool)(r.DecodeBool()) - } - case "Index": - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *SchedulerSetConfigurationResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Updated = false - } else { - x.Updated = (bool)(r.DecodeBool()) - } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj6-1, "") - } - r.ReadArrayEnd() -} - -func (x *PreemptionConfig) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(3) - } else { - r.WriteMapStart(3) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.SystemSchedulerEnabled)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SystemSchedulerEnabled\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SystemSchedulerEnabled`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.SystemSchedulerEnabled)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.BatchSchedulerEnabled)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"BatchSchedulerEnabled\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `BatchSchedulerEnabled`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.BatchSchedulerEnabled)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.ServiceSchedulerEnabled)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ServiceSchedulerEnabled\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ServiceSchedulerEnabled`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.ServiceSchedulerEnabled)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *PreemptionConfig) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *PreemptionConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "SystemSchedulerEnabled": - if r.TryDecodeAsNil() { - x.SystemSchedulerEnabled = false - } else { - x.SystemSchedulerEnabled = (bool)(r.DecodeBool()) - } - case "BatchSchedulerEnabled": - if r.TryDecodeAsNil() { - x.BatchSchedulerEnabled = false - } else { - x.BatchSchedulerEnabled = (bool)(r.DecodeBool()) - } - case "ServiceSchedulerEnabled": - if r.TryDecodeAsNil() { - x.ServiceSchedulerEnabled = false - } else { - x.ServiceSchedulerEnabled = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *PreemptionConfig) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj7 int - var yyb7 bool - var yyhl7 bool = l >= 0 - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SystemSchedulerEnabled = false - } else { - x.SystemSchedulerEnabled = (bool)(r.DecodeBool()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.BatchSchedulerEnabled = false - } else { - x.BatchSchedulerEnabled = (bool)(r.DecodeBool()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ServiceSchedulerEnabled = false - } else { - x.ServiceSchedulerEnabled = (bool)(r.DecodeBool()) - } - for { - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj7-1, "") - } - r.ReadArrayEnd() -} - -func (x *SchedulerSetConfigRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(6) - } else { - r.WriteMapStart(6) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - yy4 := &x.Config - yy4.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Config\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Config`) - } - r.WriteMapElemValue() - yy6 := &x.Config - yy6.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.CAS)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CAS\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CAS`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.CAS)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *SchedulerSetConfigRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *SchedulerSetConfigRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Config": - if r.TryDecodeAsNil() { - x.Config = SchedulerConfiguration{} - } else { - x.Config.CodecDecodeSelf(d) - } - case "CAS": - if r.TryDecodeAsNil() { - x.CAS = false - } else { - x.CAS = (bool)(r.DecodeBool()) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *SchedulerSetConfigRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Config = SchedulerConfiguration{} - } else { - x.Config.CodecDecodeSelf(d) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CAS = false - } else { - x.CAS = (bool)(r.DecodeBool()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *ServiceCheck) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(18) - } else { - r.WriteMapStart(18) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Type))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Type)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Type\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Type`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Type))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Type)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Command))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Command)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Command\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Command`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Command))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Command)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Args == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Args, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Args\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Args`) - } - r.WriteMapElemValue() - if x.Args == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Args, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Path))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Path)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Path\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Path`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Path))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Path)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Protocol))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Protocol)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Protocol\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Protocol`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Protocol))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Protocol)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PortLabel))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PortLabel)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PortLabel\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PortLabel`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PortLabel))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PortLabel)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AddressMode))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AddressMode)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AddressMode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AddressMode`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AddressMode))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AddressMode)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt28 := z.Extension(z.I2Rtid(x.Interval)); yyxt28 != nil { - z.EncExtension(x.Interval, yyxt28) - } else { - r.EncodeInt(int64(x.Interval)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Interval\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Interval`) - } - r.WriteMapElemValue() - if false { - } else if yyxt29 := z.Extension(z.I2Rtid(x.Interval)); yyxt29 != nil { - z.EncExtension(x.Interval, yyxt29) - } else { - r.EncodeInt(int64(x.Interval)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt31 := z.Extension(z.I2Rtid(x.Timeout)); yyxt31 != nil { - z.EncExtension(x.Timeout, yyxt31) - } else { - r.EncodeInt(int64(x.Timeout)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Timeout\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Timeout`) - } - r.WriteMapElemValue() - if false { - } else if yyxt32 := z.Extension(z.I2Rtid(x.Timeout)); yyxt32 != nil { - z.EncExtension(x.Timeout, yyxt32) - } else { - r.EncodeInt(int64(x.Timeout)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.InitialStatus))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.InitialStatus)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"InitialStatus\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `InitialStatus`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.InitialStatus))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.InitialStatus)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.TLSSkipVerify)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TLSSkipVerify\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TLSSkipVerify`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.TLSSkipVerify)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Method))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Method)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Method\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Method`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Method))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Method)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Header == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringSlicestring((map[string][]string)(x.Header), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Header\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Header`) - } - r.WriteMapElemValue() - if x.Header == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringSlicestring((map[string][]string)(x.Header), e) - } - } - } - var yyn45 bool - if x.CheckRestart == nil { - yyn45 = true - goto LABEL45 - } - LABEL45: - if yyr2 || yy2arr2 { - if yyn45 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.CheckRestart == nil { - r.EncodeNil() - } else { - x.CheckRestart.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CheckRestart\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CheckRestart`) - } - r.WriteMapElemValue() - if yyn45 { - r.EncodeNil() - } else { - if x.CheckRestart == nil { - r.EncodeNil() - } else { - x.CheckRestart.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.GRPCService))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.GRPCService)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"GRPCService\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `GRPCService`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.GRPCService))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.GRPCService)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.GRPCUseTLS)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"GRPCUseTLS\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `GRPCUseTLS`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.GRPCUseTLS)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TaskName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TaskName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TaskName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TaskName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TaskName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TaskName)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ServiceCheck) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ServiceCheck) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - case "Command": - if r.TryDecodeAsNil() { - x.Command = "" - } else { - x.Command = (string)(r.DecodeString()) - } - case "Args": - if r.TryDecodeAsNil() { - x.Args = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Args, d) - } - } - case "Path": - if r.TryDecodeAsNil() { - x.Path = "" - } else { - x.Path = (string)(r.DecodeString()) - } - case "Protocol": - if r.TryDecodeAsNil() { - x.Protocol = "" - } else { - x.Protocol = (string)(r.DecodeString()) - } - case "PortLabel": - if r.TryDecodeAsNil() { - x.PortLabel = "" - } else { - x.PortLabel = (string)(r.DecodeString()) - } - case "AddressMode": - if r.TryDecodeAsNil() { - x.AddressMode = "" - } else { - x.AddressMode = (string)(r.DecodeString()) - } - case "Interval": - if r.TryDecodeAsNil() { - x.Interval = 0 - } else { - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.Interval)); yyxt14 != nil { - z.DecExtension(x.Interval, yyxt14) - } else { - x.Interval = (time.Duration)(r.DecodeInt64()) - } - } - case "Timeout": - if r.TryDecodeAsNil() { - x.Timeout = 0 - } else { - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.Timeout)); yyxt16 != nil { - z.DecExtension(x.Timeout, yyxt16) - } else { - x.Timeout = (time.Duration)(r.DecodeInt64()) - } - } - case "InitialStatus": - if r.TryDecodeAsNil() { - x.InitialStatus = "" - } else { - x.InitialStatus = (string)(r.DecodeString()) - } - case "TLSSkipVerify": - if r.TryDecodeAsNil() { - x.TLSSkipVerify = false - } else { - x.TLSSkipVerify = (bool)(r.DecodeBool()) - } - case "Method": - if r.TryDecodeAsNil() { - x.Method = "" - } else { - x.Method = (string)(r.DecodeString()) - } - case "Header": - if r.TryDecodeAsNil() { - x.Header = nil - } else { - if false { - } else { - h.decMapstringSlicestring((*map[string][]string)(&x.Header), d) - } - } - case "CheckRestart": - if r.TryDecodeAsNil() { - if true && x.CheckRestart != nil { - x.CheckRestart = nil - } - } else { - if x.CheckRestart == nil { - x.CheckRestart = new(CheckRestart) - } - - x.CheckRestart.CodecDecodeSelf(d) - } - case "GRPCService": - if r.TryDecodeAsNil() { - x.GRPCService = "" - } else { - x.GRPCService = (string)(r.DecodeString()) - } - case "GRPCUseTLS": - if r.TryDecodeAsNil() { - x.GRPCUseTLS = false - } else { - x.GRPCUseTLS = (bool)(r.DecodeBool()) - } - case "TaskName": - if r.TryDecodeAsNil() { - x.TaskName = "" - } else { - x.TaskName = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ServiceCheck) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj26 int - var yyb26 bool - var yyhl26 bool = l >= 0 - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Command = "" - } else { - x.Command = (string)(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Args = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Args, d) - } - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Path = "" - } else { - x.Path = (string)(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Protocol = "" - } else { - x.Protocol = (string)(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PortLabel = "" - } else { - x.PortLabel = (string)(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AddressMode = "" - } else { - x.AddressMode = (string)(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Interval = 0 - } else { - if false { - } else if yyxt37 := z.Extension(z.I2Rtid(x.Interval)); yyxt37 != nil { - z.DecExtension(x.Interval, yyxt37) - } else { - x.Interval = (time.Duration)(r.DecodeInt64()) - } - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Timeout = 0 - } else { - if false { - } else if yyxt39 := z.Extension(z.I2Rtid(x.Timeout)); yyxt39 != nil { - z.DecExtension(x.Timeout, yyxt39) - } else { - x.Timeout = (time.Duration)(r.DecodeInt64()) - } - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.InitialStatus = "" - } else { - x.InitialStatus = (string)(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TLSSkipVerify = false - } else { - x.TLSSkipVerify = (bool)(r.DecodeBool()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Method = "" - } else { - x.Method = (string)(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Header = nil - } else { - if false { - } else { - h.decMapstringSlicestring((*map[string][]string)(&x.Header), d) - } - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.CheckRestart != nil { - x.CheckRestart = nil - } - } else { - if x.CheckRestart == nil { - x.CheckRestart = new(CheckRestart) - } - - x.CheckRestart.CodecDecodeSelf(d) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.GRPCService = "" - } else { - x.GRPCService = (string)(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.GRPCUseTLS = false - } else { - x.GRPCUseTLS = (bool)(r.DecodeBool()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskName = "" - } else { - x.TaskName = (string)(r.DecodeString()) - } - for { - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj26-1, "") - } - r.ReadArrayEnd() -} - -func (x *Service) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(8) - } else { - r.WriteMapStart(8) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PortLabel))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PortLabel)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PortLabel\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PortLabel`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PortLabel))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PortLabel)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AddressMode))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AddressMode)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AddressMode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AddressMode`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AddressMode))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AddressMode)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Tags == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Tags, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Tags\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Tags`) - } - r.WriteMapElemValue() - if x.Tags == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Tags, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.CanaryTags == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.CanaryTags, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CanaryTags\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CanaryTags`) - } - r.WriteMapElemValue() - if x.CanaryTags == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.CanaryTags, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Checks == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoServiceCheck(([]*ServiceCheck)(x.Checks), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Checks\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Checks`) - } - r.WriteMapElemValue() - if x.Checks == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoServiceCheck(([]*ServiceCheck)(x.Checks), e) - } - } - } - var yyn21 bool - if x.Connect == nil { - yyn21 = true - goto LABEL21 - } - LABEL21: - if yyr2 || yy2arr2 { - if yyn21 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Connect == nil { - r.EncodeNil() - } else { - x.Connect.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Connect\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Connect`) - } - r.WriteMapElemValue() - if yyn21 { - r.EncodeNil() - } else { - if x.Connect == nil { - r.EncodeNil() - } else { - x.Connect.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Meta, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Meta\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Meta`) - } - r.WriteMapElemValue() - if x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Meta, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *Service) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *Service) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "PortLabel": - if r.TryDecodeAsNil() { - x.PortLabel = "" - } else { - x.PortLabel = (string)(r.DecodeString()) - } - case "AddressMode": - if r.TryDecodeAsNil() { - x.AddressMode = "" - } else { - x.AddressMode = (string)(r.DecodeString()) - } - case "Tags": - if r.TryDecodeAsNil() { - x.Tags = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Tags, d) - } - } - case "CanaryTags": - if r.TryDecodeAsNil() { - x.CanaryTags = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.CanaryTags, d) - } - } - case "Checks": - if r.TryDecodeAsNil() { - x.Checks = nil - } else { - if false { - } else { - h.decSlicePtrtoServiceCheck((*[]*ServiceCheck)(&x.Checks), d) - } - } - case "Connect": - if r.TryDecodeAsNil() { - if true && x.Connect != nil { - x.Connect = nil - } - } else { - if x.Connect == nil { - x.Connect = new(ConsulConnect) - } - - x.Connect.CodecDecodeSelf(d) - } - case "Meta": - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Meta, d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *Service) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj16 int - var yyb16 bool - var yyhl16 bool = l >= 0 - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PortLabel = "" - } else { - x.PortLabel = (string)(r.DecodeString()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AddressMode = "" - } else { - x.AddressMode = (string)(r.DecodeString()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Tags = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Tags, d) - } - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CanaryTags = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.CanaryTags, d) - } - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Checks = nil - } else { - if false { - } else { - h.decSlicePtrtoServiceCheck((*[]*ServiceCheck)(&x.Checks), d) - } - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Connect != nil { - x.Connect = nil - } - } else { - if x.Connect == nil { - x.Connect = new(ConsulConnect) - } - - x.Connect.CodecDecodeSelf(d) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Meta, d) - } - } - for { - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj16-1, "") - } - r.ReadArrayEnd() -} - -func (x *ConsulConnect) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(3) - } else { - r.WriteMapStart(3) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Native)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Native\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Native`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Native)) - } - } - var yyn6 bool - if x.SidecarService == nil { - yyn6 = true - goto LABEL6 - } - LABEL6: - if yyr2 || yy2arr2 { - if yyn6 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.SidecarService == nil { - r.EncodeNil() - } else { - x.SidecarService.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SidecarService\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SidecarService`) - } - r.WriteMapElemValue() - if yyn6 { - r.EncodeNil() - } else { - if x.SidecarService == nil { - r.EncodeNil() - } else { - x.SidecarService.CodecEncodeSelf(e) - } - } - } - var yyn9 bool - if x.SidecarTask == nil { - yyn9 = true - goto LABEL9 - } - LABEL9: - if yyr2 || yy2arr2 { - if yyn9 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.SidecarTask == nil { - r.EncodeNil() - } else { - x.SidecarTask.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SidecarTask\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SidecarTask`) - } - r.WriteMapElemValue() - if yyn9 { - r.EncodeNil() - } else { - if x.SidecarTask == nil { - r.EncodeNil() - } else { - x.SidecarTask.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ConsulConnect) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ConsulConnect) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Native": - if r.TryDecodeAsNil() { - x.Native = false - } else { - x.Native = (bool)(r.DecodeBool()) - } - case "SidecarService": - if r.TryDecodeAsNil() { - if true && x.SidecarService != nil { - x.SidecarService = nil - } - } else { - if x.SidecarService == nil { - x.SidecarService = new(ConsulSidecarService) - } - - x.SidecarService.CodecDecodeSelf(d) - } - case "SidecarTask": - if r.TryDecodeAsNil() { - if true && x.SidecarTask != nil { - x.SidecarTask = nil - } - } else { - if x.SidecarTask == nil { - x.SidecarTask = new(SidecarTask) - } - - x.SidecarTask.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ConsulConnect) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj7 int - var yyb7 bool - var yyhl7 bool = l >= 0 - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Native = false - } else { - x.Native = (bool)(r.DecodeBool()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.SidecarService != nil { - x.SidecarService = nil - } - } else { - if x.SidecarService == nil { - x.SidecarService = new(ConsulSidecarService) - } - - x.SidecarService.CodecDecodeSelf(d) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.SidecarTask != nil { - x.SidecarTask = nil - } - } else { - if x.SidecarTask == nil { - x.SidecarTask = new(SidecarTask) - } - - x.SidecarTask.CodecDecodeSelf(d) - } - for { - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj7-1, "") - } - r.ReadArrayEnd() -} - -func (x *ConsulSidecarService) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(3) - } else { - r.WriteMapStart(3) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Tags == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Tags, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Tags\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Tags`) - } - r.WriteMapElemValue() - if x.Tags == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Tags, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Port))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Port)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Port\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Port`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Port))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Port)) - } - } - } - var yyn9 bool - if x.Proxy == nil { - yyn9 = true - goto LABEL9 - } - LABEL9: - if yyr2 || yy2arr2 { - if yyn9 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Proxy == nil { - r.EncodeNil() - } else { - x.Proxy.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Proxy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Proxy`) - } - r.WriteMapElemValue() - if yyn9 { - r.EncodeNil() - } else { - if x.Proxy == nil { - r.EncodeNil() - } else { - x.Proxy.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ConsulSidecarService) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ConsulSidecarService) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Tags": - if r.TryDecodeAsNil() { - x.Tags = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Tags, d) - } - } - case "Port": - if r.TryDecodeAsNil() { - x.Port = "" - } else { - x.Port = (string)(r.DecodeString()) - } - case "Proxy": - if r.TryDecodeAsNil() { - if true && x.Proxy != nil { - x.Proxy = nil - } - } else { - if x.Proxy == nil { - x.Proxy = new(ConsulProxy) - } - - x.Proxy.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ConsulSidecarService) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj8 int - var yyb8 bool - var yyhl8 bool = l >= 0 - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Tags = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Tags, d) - } - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Port = "" - } else { - x.Port = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Proxy != nil { - x.Proxy = nil - } - } else { - if x.Proxy == nil { - x.Proxy = new(ConsulProxy) - } - - x.Proxy.CodecDecodeSelf(d) - } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj8-1, "") - } - r.ReadArrayEnd() -} - -func (x *SidecarTask) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(11) - } else { - r.WriteMapStart(11) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Driver))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Driver)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Driver\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Driver`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Driver))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Driver)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.User))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.User)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"User\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `User`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.User))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.User)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Config == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntfV(x.Config, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Config\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Config`) - } - r.WriteMapElemValue() - if x.Config == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntfV(x.Config, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Env == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Env, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Env\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Env`) - } - r.WriteMapElemValue() - if x.Env == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Env, e) - } - } - } - var yyn18 bool - if x.Resources == nil { - yyn18 = true - goto LABEL18 - } - LABEL18: - if yyr2 || yy2arr2 { - if yyn18 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Resources == nil { - r.EncodeNil() - } else { - x.Resources.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Resources\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Resources`) - } - r.WriteMapElemValue() - if yyn18 { - r.EncodeNil() - } else { - if x.Resources == nil { - r.EncodeNil() - } else { - x.Resources.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Meta, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Meta\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Meta`) - } - r.WriteMapElemValue() - if x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Meta, e) - } - } - } - var yyn24 bool - if x.KillTimeout == nil { - yyn24 = true - goto LABEL24 - } - LABEL24: - if yyr2 || yy2arr2 { - if yyn24 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.KillTimeout == nil { - r.EncodeNil() - } else { - yy25 := *x.KillTimeout - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(yy25)); yyxt26 != nil { - z.EncExtension(yy25, yyxt26) - } else { - r.EncodeInt(int64(yy25)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KillTimeout\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KillTimeout`) - } - r.WriteMapElemValue() - if yyn24 { - r.EncodeNil() - } else { - if x.KillTimeout == nil { - r.EncodeNil() - } else { - yy27 := *x.KillTimeout - if false { - } else if yyxt28 := z.Extension(z.I2Rtid(yy27)); yyxt28 != nil { - z.EncExtension(yy27, yyxt28) - } else { - r.EncodeInt(int64(yy27)) - } - } - } - } - var yyn29 bool - if x.LogConfig == nil { - yyn29 = true - goto LABEL29 - } - LABEL29: - if yyr2 || yy2arr2 { - if yyn29 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.LogConfig == nil { - r.EncodeNil() - } else { - x.LogConfig.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LogConfig\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LogConfig`) - } - r.WriteMapElemValue() - if yyn29 { - r.EncodeNil() - } else { - if x.LogConfig == nil { - r.EncodeNil() - } else { - x.LogConfig.CodecEncodeSelf(e) - } - } - } - var yyn32 bool - if x.ShutdownDelay == nil { - yyn32 = true - goto LABEL32 - } - LABEL32: - if yyr2 || yy2arr2 { - if yyn32 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ShutdownDelay == nil { - r.EncodeNil() - } else { - yy33 := *x.ShutdownDelay - if false { - } else if yyxt34 := z.Extension(z.I2Rtid(yy33)); yyxt34 != nil { - z.EncExtension(yy33, yyxt34) - } else { - r.EncodeInt(int64(yy33)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ShutdownDelay\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ShutdownDelay`) - } - r.WriteMapElemValue() - if yyn32 { - r.EncodeNil() - } else { - if x.ShutdownDelay == nil { - r.EncodeNil() - } else { - yy35 := *x.ShutdownDelay - if false { - } else if yyxt36 := z.Extension(z.I2Rtid(yy35)); yyxt36 != nil { - z.EncExtension(yy35, yyxt36) - } else { - r.EncodeInt(int64(yy35)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.KillSignal))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.KillSignal)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KillSignal\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KillSignal`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.KillSignal))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.KillSignal)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *SidecarTask) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *SidecarTask) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Driver": - if r.TryDecodeAsNil() { - x.Driver = "" - } else { - x.Driver = (string)(r.DecodeString()) - } - case "User": - if r.TryDecodeAsNil() { - x.User = "" - } else { - x.User = (string)(r.DecodeString()) - } - case "Config": - if r.TryDecodeAsNil() { - x.Config = nil - } else { - if false { - } else { - z.F.DecMapStringIntfX(&x.Config, d) - } - } - case "Env": - if r.TryDecodeAsNil() { - x.Env = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Env, d) - } - } - case "Resources": - if r.TryDecodeAsNil() { - if true && x.Resources != nil { - x.Resources = nil - } - } else { - if x.Resources == nil { - x.Resources = new(Resources) - } - - x.Resources.CodecDecodeSelf(d) - } - case "Meta": - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Meta, d) - } - } - case "KillTimeout": - if r.TryDecodeAsNil() { - if true && x.KillTimeout != nil { - x.KillTimeout = nil - } - } else { - if x.KillTimeout == nil { - x.KillTimeout = new(time.Duration) - } - - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.KillTimeout)); yyxt15 != nil { - z.DecExtension(x.KillTimeout, yyxt15) - } else { - *x.KillTimeout = (time.Duration)(r.DecodeInt64()) - } - } - case "LogConfig": - if r.TryDecodeAsNil() { - if true && x.LogConfig != nil { - x.LogConfig = nil - } - } else { - if x.LogConfig == nil { - x.LogConfig = new(LogConfig) - } - - x.LogConfig.CodecDecodeSelf(d) - } - case "ShutdownDelay": - if r.TryDecodeAsNil() { - if true && x.ShutdownDelay != nil { - x.ShutdownDelay = nil - } - } else { - if x.ShutdownDelay == nil { - x.ShutdownDelay = new(time.Duration) - } - - if false { - } else if yyxt18 := z.Extension(z.I2Rtid(x.ShutdownDelay)); yyxt18 != nil { - z.DecExtension(x.ShutdownDelay, yyxt18) - } else { - *x.ShutdownDelay = (time.Duration)(r.DecodeInt64()) - } - } - case "KillSignal": - if r.TryDecodeAsNil() { - x.KillSignal = "" - } else { - x.KillSignal = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *SidecarTask) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj20 int - var yyb20 bool - var yyhl20 bool = l >= 0 - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Driver = "" - } else { - x.Driver = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.User = "" - } else { - x.User = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Config = nil - } else { - if false { - } else { - z.F.DecMapStringIntfX(&x.Config, d) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Env = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Env, d) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Resources != nil { - x.Resources = nil - } - } else { - if x.Resources == nil { - x.Resources = new(Resources) - } - - x.Resources.CodecDecodeSelf(d) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Meta, d) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.KillTimeout != nil { - x.KillTimeout = nil - } - } else { - if x.KillTimeout == nil { - x.KillTimeout = new(time.Duration) - } - - if false { - } else if yyxt32 := z.Extension(z.I2Rtid(x.KillTimeout)); yyxt32 != nil { - z.DecExtension(x.KillTimeout, yyxt32) - } else { - *x.KillTimeout = (time.Duration)(r.DecodeInt64()) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.LogConfig != nil { - x.LogConfig = nil - } - } else { - if x.LogConfig == nil { - x.LogConfig = new(LogConfig) - } - - x.LogConfig.CodecDecodeSelf(d) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.ShutdownDelay != nil { - x.ShutdownDelay = nil - } - } else { - if x.ShutdownDelay == nil { - x.ShutdownDelay = new(time.Duration) - } - - if false { - } else if yyxt35 := z.Extension(z.I2Rtid(x.ShutdownDelay)); yyxt35 != nil { - z.DecExtension(x.ShutdownDelay, yyxt35) - } else { - *x.ShutdownDelay = (time.Duration)(r.DecodeInt64()) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.KillSignal = "" - } else { - x.KillSignal = (string)(r.DecodeString()) - } - for { - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj20-1, "") - } - r.ReadArrayEnd() -} - -func (x *ConsulProxy) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LocalServiceAddress))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.LocalServiceAddress)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LocalServiceAddress\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LocalServiceAddress`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LocalServiceAddress))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.LocalServiceAddress)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.LocalServicePort)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LocalServicePort\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LocalServicePort`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.LocalServicePort)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Upstreams == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSliceConsulUpstream(([]ConsulUpstream)(x.Upstreams), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Upstreams\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Upstreams`) - } - r.WriteMapElemValue() - if x.Upstreams == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSliceConsulUpstream(([]ConsulUpstream)(x.Upstreams), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Config == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntfV(x.Config, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Config\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Config`) - } - r.WriteMapElemValue() - if x.Config == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntfV(x.Config, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ConsulProxy) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ConsulProxy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "LocalServiceAddress": - if r.TryDecodeAsNil() { - x.LocalServiceAddress = "" - } else { - x.LocalServiceAddress = (string)(r.DecodeString()) - } - case "LocalServicePort": - if r.TryDecodeAsNil() { - x.LocalServicePort = 0 - } else { - x.LocalServicePort = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Upstreams": - if r.TryDecodeAsNil() { - x.Upstreams = nil - } else { - if false { - } else { - h.decSliceConsulUpstream((*[]ConsulUpstream)(&x.Upstreams), d) - } - } - case "Config": - if r.TryDecodeAsNil() { - x.Config = nil - } else { - if false { - } else { - z.F.DecMapStringIntfX(&x.Config, d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ConsulProxy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LocalServiceAddress = "" - } else { - x.LocalServiceAddress = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LocalServicePort = 0 - } else { - x.LocalServicePort = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Upstreams = nil - } else { - if false { - } else { - h.decSliceConsulUpstream((*[]ConsulUpstream)(&x.Upstreams), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Config = nil - } else { - if false { - } else { - z.F.DecMapStringIntfX(&x.Config, d) - } - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *ConsulUpstream) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(2) - } else { - r.WriteMapStart(2) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DestinationName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DestinationName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DestinationName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DestinationName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DestinationName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DestinationName)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.LocalBindPort)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LocalBindPort\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LocalBindPort`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.LocalBindPort)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ConsulUpstream) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ConsulUpstream) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "DestinationName": - if r.TryDecodeAsNil() { - x.DestinationName = "" - } else { - x.DestinationName = (string)(r.DecodeString()) - } - case "LocalBindPort": - if r.TryDecodeAsNil() { - x.LocalBindPort = 0 - } else { - x.LocalBindPort = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ConsulUpstream) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DestinationName = "" - } else { - x.DestinationName = (string)(r.DecodeString()) - } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LocalBindPort = 0 - } else { - x.LocalBindPort = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj6-1, "") - } - r.ReadArrayEnd() -} - -func (x *StreamingRpcHeader) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Method))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Method)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Method\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Method`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Method))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Method)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *StreamingRpcHeader) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *StreamingRpcHeader) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Method": - if r.TryDecodeAsNil() { - x.Method = "" - } else { - x.Method = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *StreamingRpcHeader) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj5 int - var yyb5 bool - var yyhl5 bool = l >= 0 - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Method = "" - } else { - x.Method = (string)(r.DecodeString()) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *StreamingRpcAck) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Error))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Error)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Error\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Error`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Error))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Error)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *StreamingRpcAck) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *StreamingRpcAck) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Error": - if r.TryDecodeAsNil() { - x.Error = "" - } else { - x.Error = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *StreamingRpcAck) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj5 int - var yyb5 bool - var yyhl5 bool = l >= 0 - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Error = "" - } else { - x.Error = (string)(r.DecodeString()) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *StreamingRpcRegistry) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(0) - } else { - r.WriteMapStart(0) - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *StreamingRpcRegistry) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *StreamingRpcRegistry) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *StreamingRpcRegistry) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj4 int - var yyb4 bool - var yyhl4 bool = l >= 0 - for { - yyj4++ - if yyhl4 { - yyb4 = yyj4 > l - } else { - yyb4 = r.CheckBreak() - } - if yyb4 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj4-1, "") - } - r.ReadArrayEnd() -} - -func (x MessageType) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - r.EncodeUint(uint64(x)) - } -} - -func (x *MessageType) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - *x = (MessageType)(z.C.UintV(r.DecodeUint64(), 8)) - } -} - -func (x Context) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x)) - } - } -} - -func (x *Context) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - *x = (Context)(r.DecodeString()) - } -} - -func (x *NamespacedID) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(2) - } else { - r.WriteMapStart(2) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NamespacedID) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NamespacedID) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "ID": - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NamespacedID) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj6-1, "") - } - r.ReadArrayEnd() -} - -func (x *InternalRpcInfo) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *InternalRpcInfo) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *InternalRpcInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Forwarded": - if r.TryDecodeAsNil() { - x.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *InternalRpcInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj5 int - var yyb5 bool - var yyhl5 bool = l >= 0 - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *QueryOptions) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(8) - } else { - r.WriteMapStart(8) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt13 != nil { - z.EncExtension(x.MaxQueryTime, yyxt13) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt14 != nil { - z.EncExtension(x.MaxQueryTime, yyxt14) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *QueryOptions) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *QueryOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Region": - if r.TryDecodeAsNil() { - x.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.MaxQueryTime = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt8 != nil { - z.DecExtension(x.MaxQueryTime, yyxt8) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *QueryOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MaxQueryTime = 0 - } else { - if false { - } else if yyxt18 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt18 != nil { - z.DecExtension(x.MaxQueryTime, yyxt18) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-1, "") - } - r.ReadArrayEnd() -} - -func (x *WriteRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *WriteRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *WriteRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Region": - if r.TryDecodeAsNil() { - x.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *WriteRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj8 int - var yyb8 bool - var yyhl8 bool = l >= 0 - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj8-1, "") - } - r.ReadArrayEnd() -} - -func (x *QueryMeta) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(3) - } else { - r.WriteMapStart(3) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.LastContact)); yyxt7 != nil { - z.EncExtension(x.LastContact, yyxt7) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.LastContact)); yyxt8 != nil { - z.EncExtension(x.LastContact, yyxt8) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *QueryMeta) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *QueryMeta) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Index": - if r.TryDecodeAsNil() { - x.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.LastContact = 0 - } else { - if false { - } else if yyxt6 := z.Extension(z.I2Rtid(x.LastContact)); yyxt6 != nil { - z.DecExtension(x.LastContact, yyxt6) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *QueryMeta) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj8 int - var yyb8 bool - var yyhl8 bool = l >= 0 - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LastContact = 0 - } else { - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.DecExtension(x.LastContact, yyxt11) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj8-1, "") - } - r.ReadArrayEnd() -} - -func (x *WriteMeta) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *WriteMeta) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *WriteMeta) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Index": - if r.TryDecodeAsNil() { - x.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *WriteMeta) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj5 int - var yyb5 bool - var yyhl5 bool = l >= 0 - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeRegisterRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(6) - } else { - r.WriteMapStart(6) - } - var yyn3 bool - if x.Node == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Node == nil { - r.EncodeNil() - } else { - x.Node.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Node\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Node`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Node == nil { - r.EncodeNil() - } else { - x.Node.CodecEncodeSelf(e) - } - } - } - var yyn6 bool - if x.NodeEvent == nil { - yyn6 = true - goto LABEL6 - } - LABEL6: - if yyr2 || yy2arr2 { - if yyn6 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.NodeEvent == nil { - r.EncodeNil() - } else { - x.NodeEvent.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeEvent\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeEvent`) - } - r.WriteMapElemValue() - if yyn6 { - r.EncodeNil() - } else { - if x.NodeEvent == nil { - r.EncodeNil() - } else { - x.NodeEvent.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeRegisterRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeRegisterRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Node": - if r.TryDecodeAsNil() { - if true && x.Node != nil { - x.Node = nil - } - } else { - if x.Node == nil { - x.Node = new(Node) - } - - x.Node.CodecDecodeSelf(d) - } - case "NodeEvent": - if r.TryDecodeAsNil() { - if true && x.NodeEvent != nil { - x.NodeEvent = nil - } - } else { - if x.NodeEvent == nil { - x.NodeEvent = new(NodeEvent) - } - - x.NodeEvent.CodecDecodeSelf(d) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeRegisterRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Node != nil { - x.Node = nil - } - } else { - if x.Node == nil { - x.Node = new(Node) - } - - x.Node.CodecDecodeSelf(d) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.NodeEvent != nil { - x.NodeEvent = nil - } - } else { - if x.NodeEvent == nil { - x.NodeEvent = new(NodeEvent) - } - - x.NodeEvent.CodecDecodeSelf(d) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeDeregisterRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeDeregisterRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeDeregisterRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "NodeID": - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeDeregisterRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeBatchDeregisterRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.NodeIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.NodeIDs, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeIDs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeIDs`) - } - r.WriteMapElemValue() - if x.NodeIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.NodeIDs, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeBatchDeregisterRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeBatchDeregisterRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "NodeIDs": - if r.TryDecodeAsNil() { - x.NodeIDs = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.NodeIDs, d) - } - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeBatchDeregisterRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeIDs = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.NodeIDs, d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeServerInfo) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.RPCAdvertiseAddr))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.RPCAdvertiseAddr)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RPCAdvertiseAddr\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RPCAdvertiseAddr`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.RPCAdvertiseAddr))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.RPCAdvertiseAddr)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.RPCMajorVersion)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RPCMajorVersion\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RPCMajorVersion`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.RPCMajorVersion)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.RPCMinorVersion)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RPCMinorVersion\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RPCMinorVersion`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.RPCMinorVersion)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Datacenter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Datacenter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Datacenter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Datacenter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Datacenter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Datacenter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeServerInfo) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeServerInfo) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "RPCAdvertiseAddr": - if r.TryDecodeAsNil() { - x.RPCAdvertiseAddr = "" - } else { - x.RPCAdvertiseAddr = (string)(r.DecodeString()) - } - case "RPCMajorVersion": - if r.TryDecodeAsNil() { - x.RPCMajorVersion = 0 - } else { - x.RPCMajorVersion = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "RPCMinorVersion": - if r.TryDecodeAsNil() { - x.RPCMinorVersion = 0 - } else { - x.RPCMinorVersion = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "Datacenter": - if r.TryDecodeAsNil() { - x.Datacenter = "" - } else { - x.Datacenter = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeServerInfo) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj8 int - var yyb8 bool - var yyhl8 bool = l >= 0 - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RPCAdvertiseAddr = "" - } else { - x.RPCAdvertiseAddr = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RPCMajorVersion = 0 - } else { - x.RPCMajorVersion = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RPCMinorVersion = 0 - } else { - x.RPCMinorVersion = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Datacenter = "" - } else { - x.Datacenter = (string)(r.DecodeString()) - } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj8-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeUpdateStatusRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(8) - } else { - r.WriteMapStart(8) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Status))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Status)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Status\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Status`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Status))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Status)) - } - } - } - var yyn9 bool - if x.NodeEvent == nil { - yyn9 = true - goto LABEL9 - } - LABEL9: - if yyr2 || yy2arr2 { - if yyn9 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.NodeEvent == nil { - r.EncodeNil() - } else { - x.NodeEvent.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeEvent\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeEvent`) - } - r.WriteMapElemValue() - if yyn9 { - r.EncodeNil() - } else { - if x.NodeEvent == nil { - r.EncodeNil() - } else { - x.NodeEvent.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.UpdatedAt)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"UpdatedAt\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `UpdatedAt`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.UpdatedAt)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeUpdateStatusRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeUpdateStatusRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "NodeID": - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - case "Status": - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - case "NodeEvent": - if r.TryDecodeAsNil() { - if true && x.NodeEvent != nil { - x.NodeEvent = nil - } - } else { - if x.NodeEvent == nil { - x.NodeEvent = new(NodeEvent) - } - - x.NodeEvent.CodecDecodeSelf(d) - } - case "UpdatedAt": - if r.TryDecodeAsNil() { - x.UpdatedAt = 0 - } else { - x.UpdatedAt = (int64)(r.DecodeInt64()) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeUpdateStatusRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.NodeEvent != nil { - x.NodeEvent = nil - } - } else { - if x.NodeEvent == nil { - x.NodeEvent = new(NodeEvent) - } - - x.NodeEvent.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.UpdatedAt = 0 - } else { - x.UpdatedAt = (int64)(r.DecodeInt64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj12-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeUpdateDrainRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(10) - } else { - r.WriteMapStart(10) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } - var yyn6 bool - if x.DrainStrategy == nil { - yyn6 = true - goto LABEL6 - } - LABEL6: - if yyr2 || yy2arr2 { - if yyn6 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.DrainStrategy == nil { - r.EncodeNil() - } else { - x.DrainStrategy.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DrainStrategy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DrainStrategy`) - } - r.WriteMapElemValue() - if yyn6 { - r.EncodeNil() - } else { - if x.DrainStrategy == nil { - r.EncodeNil() - } else { - x.DrainStrategy.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Drain)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Drain\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Drain`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Drain)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.MarkEligible)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MarkEligible\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MarkEligible`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.MarkEligible)) - } - } - var yyn15 bool - if x.NodeEvent == nil { - yyn15 = true - goto LABEL15 - } - LABEL15: - if yyr2 || yy2arr2 { - if yyn15 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.NodeEvent == nil { - r.EncodeNil() - } else { - x.NodeEvent.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeEvent\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeEvent`) - } - r.WriteMapElemValue() - if yyn15 { - r.EncodeNil() - } else { - if x.NodeEvent == nil { - r.EncodeNil() - } else { - x.NodeEvent.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.UpdatedAt)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"UpdatedAt\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `UpdatedAt`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.UpdatedAt)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeUpdateDrainRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeUpdateDrainRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "NodeID": - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - case "DrainStrategy": - if r.TryDecodeAsNil() { - if true && x.DrainStrategy != nil { - x.DrainStrategy = nil - } - } else { - if x.DrainStrategy == nil { - x.DrainStrategy = new(DrainStrategy) - } - - x.DrainStrategy.CodecDecodeSelf(d) - } - case "Drain": - if r.TryDecodeAsNil() { - x.Drain = false - } else { - x.Drain = (bool)(r.DecodeBool()) - } - case "MarkEligible": - if r.TryDecodeAsNil() { - x.MarkEligible = false - } else { - x.MarkEligible = (bool)(r.DecodeBool()) - } - case "NodeEvent": - if r.TryDecodeAsNil() { - if true && x.NodeEvent != nil { - x.NodeEvent = nil - } - } else { - if x.NodeEvent == nil { - x.NodeEvent = new(NodeEvent) - } - - x.NodeEvent.CodecDecodeSelf(d) - } - case "UpdatedAt": - if r.TryDecodeAsNil() { - x.UpdatedAt = 0 - } else { - x.UpdatedAt = (int64)(r.DecodeInt64()) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeUpdateDrainRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj14 int - var yyb14 bool - var yyhl14 bool = l >= 0 - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.DrainStrategy != nil { - x.DrainStrategy = nil - } - } else { - if x.DrainStrategy == nil { - x.DrainStrategy = new(DrainStrategy) - } - - x.DrainStrategy.CodecDecodeSelf(d) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Drain = false - } else { - x.Drain = (bool)(r.DecodeBool()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MarkEligible = false - } else { - x.MarkEligible = (bool)(r.DecodeBool()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.NodeEvent != nil { - x.NodeEvent = nil - } - } else { - if x.NodeEvent == nil { - x.NodeEvent = new(NodeEvent) - } - - x.NodeEvent.CodecDecodeSelf(d) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.UpdatedAt = 0 - } else { - x.UpdatedAt = (int64)(r.DecodeInt64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj14-1, "") - } - r.ReadArrayEnd() -} - -func (x *BatchNodeUpdateDrainRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(7) - } else { - r.WriteMapStart(7) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Updates == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoDrainUpdate((map[string]*DrainUpdate)(x.Updates), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Updates\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Updates`) - } - r.WriteMapElemValue() - if x.Updates == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoDrainUpdate((map[string]*DrainUpdate)(x.Updates), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.NodeEvents == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoNodeEvent((map[string]*NodeEvent)(x.NodeEvents), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeEvents\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeEvents`) - } - r.WriteMapElemValue() - if x.NodeEvents == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoNodeEvent((map[string]*NodeEvent)(x.NodeEvents), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.UpdatedAt)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"UpdatedAt\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `UpdatedAt`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.UpdatedAt)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *BatchNodeUpdateDrainRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *BatchNodeUpdateDrainRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Updates": - if r.TryDecodeAsNil() { - x.Updates = nil - } else { - if false { - } else { - h.decMapstringPtrtoDrainUpdate((*map[string]*DrainUpdate)(&x.Updates), d) - } - } - case "NodeEvents": - if r.TryDecodeAsNil() { - x.NodeEvents = nil - } else { - if false { - } else { - h.decMapstringPtrtoNodeEvent((*map[string]*NodeEvent)(&x.NodeEvents), d) - } - } - case "UpdatedAt": - if r.TryDecodeAsNil() { - x.UpdatedAt = 0 - } else { - x.UpdatedAt = (int64)(r.DecodeInt64()) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *BatchNodeUpdateDrainRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Updates = nil - } else { - if false { - } else { - h.decMapstringPtrtoDrainUpdate((*map[string]*DrainUpdate)(&x.Updates), d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeEvents = nil - } else { - if false { - } else { - h.decMapstringPtrtoNodeEvent((*map[string]*NodeEvent)(&x.NodeEvents), d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.UpdatedAt = 0 - } else { - x.UpdatedAt = (int64)(r.DecodeInt64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-1, "") - } - r.ReadArrayEnd() -} - -func (x *DrainUpdate) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(2) - } else { - r.WriteMapStart(2) - } - var yyn3 bool - if x.DrainStrategy == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.DrainStrategy == nil { - r.EncodeNil() - } else { - x.DrainStrategy.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DrainStrategy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DrainStrategy`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.DrainStrategy == nil { - r.EncodeNil() - } else { - x.DrainStrategy.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.MarkEligible)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MarkEligible\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MarkEligible`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.MarkEligible)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DrainUpdate) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *DrainUpdate) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "DrainStrategy": - if r.TryDecodeAsNil() { - if true && x.DrainStrategy != nil { - x.DrainStrategy = nil - } - } else { - if x.DrainStrategy == nil { - x.DrainStrategy = new(DrainStrategy) - } - - x.DrainStrategy.CodecDecodeSelf(d) - } - case "MarkEligible": - if r.TryDecodeAsNil() { - x.MarkEligible = false - } else { - x.MarkEligible = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DrainUpdate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.DrainStrategy != nil { - x.DrainStrategy = nil - } - } else { - if x.DrainStrategy == nil { - x.DrainStrategy = new(DrainStrategy) - } - - x.DrainStrategy.CodecDecodeSelf(d) - } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MarkEligible = false - } else { - x.MarkEligible = (bool)(r.DecodeBool()) - } - for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj6-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeUpdateEligibilityRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(8) - } else { - r.WriteMapStart(8) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Eligibility))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Eligibility)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Eligibility\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Eligibility`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Eligibility))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Eligibility)) - } - } - } - var yyn9 bool - if x.NodeEvent == nil { - yyn9 = true - goto LABEL9 - } - LABEL9: - if yyr2 || yy2arr2 { - if yyn9 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.NodeEvent == nil { - r.EncodeNil() - } else { - x.NodeEvent.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeEvent\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeEvent`) - } - r.WriteMapElemValue() - if yyn9 { - r.EncodeNil() - } else { - if x.NodeEvent == nil { - r.EncodeNil() - } else { - x.NodeEvent.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.UpdatedAt)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"UpdatedAt\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `UpdatedAt`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.UpdatedAt)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeUpdateEligibilityRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeUpdateEligibilityRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "NodeID": - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - case "Eligibility": - if r.TryDecodeAsNil() { - x.Eligibility = "" - } else { - x.Eligibility = (string)(r.DecodeString()) - } - case "NodeEvent": - if r.TryDecodeAsNil() { - if true && x.NodeEvent != nil { - x.NodeEvent = nil - } - } else { - if x.NodeEvent == nil { - x.NodeEvent = new(NodeEvent) - } - - x.NodeEvent.CodecDecodeSelf(d) - } - case "UpdatedAt": - if r.TryDecodeAsNil() { - x.UpdatedAt = 0 - } else { - x.UpdatedAt = (int64)(r.DecodeInt64()) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeUpdateEligibilityRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Eligibility = "" - } else { - x.Eligibility = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.NodeEvent != nil { - x.NodeEvent = nil - } - } else { - if x.NodeEvent == nil { - x.NodeEvent = new(NodeEvent) - } - - x.NodeEvent.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.UpdatedAt = 0 - } else { - x.UpdatedAt = (int64)(r.DecodeInt64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj12-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeEvaluateRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeEvaluateRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeEvaluateRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "NodeID": - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeEvaluateRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeSpecificRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(10) - } else { - r.WriteMapStart(10) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SecretID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SecretID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SecretID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SecretID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SecretID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SecretID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt19 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt19 != nil { - z.EncExtension(x.MaxQueryTime, yyxt19) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt20 != nil { - z.EncExtension(x.MaxQueryTime, yyxt20) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeSpecificRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeSpecificRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "NodeID": - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - case "SecretID": - if r.TryDecodeAsNil() { - x.SecretID = "" - } else { - x.SecretID = (string)(r.DecodeString()) - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt10 != nil { - z.DecExtension(x.MaxQueryTime, yyxt10) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeSpecificRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj15 int - var yyb15 bool - var yyhl15 bool = l >= 0 - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SecretID = "" - } else { - x.SecretID = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt22 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt22 != nil { - z.DecExtension(x.MaxQueryTime, yyxt22) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj15-1, "") - } - r.ReadArrayEnd() -} - -func (x *SearchResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Matches == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapContextSlicestring((map[Context][]string)(x.Matches), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Matches\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Matches`) - } - r.WriteMapElemValue() - if x.Matches == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapContextSlicestring((map[Context][]string)(x.Matches), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Truncations == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapContextbool((map[Context]bool)(x.Truncations), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Truncations\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Truncations`) - } - r.WriteMapElemValue() - if x.Truncations == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapContextbool((map[Context]bool)(x.Truncations), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.LastContact)); yyxt13 != nil { - z.EncExtension(x.LastContact, yyxt13) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.EncExtension(x.LastContact, yyxt14) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *SearchResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *SearchResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Matches": - if r.TryDecodeAsNil() { - x.Matches = nil - } else { - if false { - } else { - h.decMapContextSlicestring((*map[Context][]string)(&x.Matches), d) - } - } - case "Truncations": - if r.TryDecodeAsNil() { - x.Truncations = nil - } else { - if false { - } else { - h.decMapContextbool((*map[Context]bool)(&x.Truncations), d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.DecExtension(x.LastContact, yyxt10) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *SearchResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Matches = nil - } else { - if false { - } else { - h.decMapContextSlicestring((*map[Context][]string)(&x.Matches), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Truncations = nil - } else { - if false { - } else { - h.decMapContextbool((*map[Context]bool)(&x.Truncations), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt19 := z.Extension(z.I2Rtid(x.LastContact)); yyxt19 != nil { - z.DecExtension(x.LastContact, yyxt19) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj12-1, "") - } - r.ReadArrayEnd() -} - -func (x *SearchRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(9) - } else { - r.WriteMapStart(9) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.Context.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Context\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Context`) - } - r.WriteMapElemValue() - x.Context.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt19 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt19 != nil { - z.EncExtension(x.MaxQueryTime, yyxt19) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt20 != nil { - z.EncExtension(x.MaxQueryTime, yyxt20) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *SearchRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *SearchRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Prefix": - if r.TryDecodeAsNil() { - x.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "Context": - if r.TryDecodeAsNil() { - x.Context = "" - } else { - x.Context.CodecDecodeSelf(d) - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt10 != nil { - z.DecExtension(x.MaxQueryTime, yyxt10) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *SearchRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj14 int - var yyb14 bool - var yyhl14 bool = l >= 0 - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Context = "" - } else { - x.Context.CodecDecodeSelf(d) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt21 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt21 != nil { - z.DecExtension(x.MaxQueryTime, yyxt21) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj14-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobRegisterRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(8) - } else { - r.WriteMapStart(8) - } - var yyn3 bool - if x.Job == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Job == nil { - r.EncodeNil() - } else { - x.Job.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Job\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Job`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Job == nil { - r.EncodeNil() - } else { - x.Job.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.EnforceIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EnforceIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EnforceIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.EnforceIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.JobModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.JobModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.PolicyOverride)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PolicyOverride\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PolicyOverride`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.PolicyOverride)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobRegisterRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobRegisterRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Job": - if r.TryDecodeAsNil() { - if true && x.Job != nil { - x.Job = nil - } - } else { - if x.Job == nil { - x.Job = new(Job) - } - - x.Job.CodecDecodeSelf(d) - } - case "EnforceIndex": - if r.TryDecodeAsNil() { - x.EnforceIndex = false - } else { - x.EnforceIndex = (bool)(r.DecodeBool()) - } - case "JobModifyIndex": - if r.TryDecodeAsNil() { - x.JobModifyIndex = 0 - } else { - x.JobModifyIndex = (uint64)(r.DecodeUint64()) - } - case "PolicyOverride": - if r.TryDecodeAsNil() { - x.PolicyOverride = false - } else { - x.PolicyOverride = (bool)(r.DecodeBool()) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobRegisterRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Job != nil { - x.Job = nil - } - } else { - if x.Job == nil { - x.Job = new(Job) - } - - x.Job.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EnforceIndex = false - } else { - x.EnforceIndex = (bool)(r.DecodeBool()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobModifyIndex = 0 - } else { - x.JobModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PolicyOverride = false - } else { - x.PolicyOverride = (bool)(r.DecodeBool()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj12-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobDeregisterRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(6) - } else { - r.WriteMapStart(6) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Purge)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Purge\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Purge`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Purge)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobDeregisterRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobDeregisterRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "JobID": - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - case "Purge": - if r.TryDecodeAsNil() { - x.Purge = false - } else { - x.Purge = (bool)(r.DecodeBool()) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobDeregisterRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Purge = false - } else { - x.Purge = (bool)(r.DecodeBool()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobBatchDeregisterRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(6) - } else { - r.WriteMapStart(6) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Jobs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapNamespacedIDPtrtoJobDeregisterOptions((map[NamespacedID]*JobDeregisterOptions)(x.Jobs), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Jobs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Jobs`) - } - r.WriteMapElemValue() - if x.Jobs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapNamespacedIDPtrtoJobDeregisterOptions((map[NamespacedID]*JobDeregisterOptions)(x.Jobs), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Evals == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoEvaluation(([]*Evaluation)(x.Evals), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Evals\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Evals`) - } - r.WriteMapElemValue() - if x.Evals == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoEvaluation(([]*Evaluation)(x.Evals), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobBatchDeregisterRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobBatchDeregisterRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Jobs": - if r.TryDecodeAsNil() { - x.Jobs = nil - } else { - if false { - } else { - h.decMapNamespacedIDPtrtoJobDeregisterOptions((*map[NamespacedID]*JobDeregisterOptions)(&x.Jobs), d) - } - } - case "Evals": - if r.TryDecodeAsNil() { - x.Evals = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluation((*[]*Evaluation)(&x.Evals), d) - } - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobBatchDeregisterRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Jobs = nil - } else { - if false { - } else { - h.decMapNamespacedIDPtrtoJobDeregisterOptions((*map[NamespacedID]*JobDeregisterOptions)(&x.Jobs), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Evals = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluation((*[]*Evaluation)(&x.Evals), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj12-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobDeregisterOptions) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Purge)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Purge\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Purge`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Purge)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobDeregisterOptions) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobDeregisterOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Purge": - if r.TryDecodeAsNil() { - x.Purge = false - } else { - x.Purge = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobDeregisterOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj5 int - var yyb5 bool - var yyhl5 bool = l >= 0 - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Purge = false - } else { - x.Purge = (bool)(r.DecodeBool()) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobEvaluateRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(6) - } else { - r.WriteMapStart(6) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - yy7 := &x.EvalOptions - yy7.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalOptions\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalOptions`) - } - r.WriteMapElemValue() - yy9 := &x.EvalOptions - yy9.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobEvaluateRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobEvaluateRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "JobID": - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - case "EvalOptions": - if r.TryDecodeAsNil() { - x.EvalOptions = EvalOptions{} - } else { - x.EvalOptions.CodecDecodeSelf(d) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobEvaluateRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalOptions = EvalOptions{} - } else { - x.EvalOptions.CodecDecodeSelf(d) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *EvalOptions) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.ForceReschedule)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ForceReschedule\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ForceReschedule`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.ForceReschedule)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *EvalOptions) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *EvalOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "ForceReschedule": - if r.TryDecodeAsNil() { - x.ForceReschedule = false - } else { - x.ForceReschedule = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *EvalOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj5 int - var yyb5 bool - var yyhl5 bool = l >= 0 - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ForceReschedule = false - } else { - x.ForceReschedule = (bool)(r.DecodeBool()) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobSpecificRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(10) - } else { - r.WriteMapStart(10) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.All)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"All\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `All`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.All)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt19 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt19 != nil { - z.EncExtension(x.MaxQueryTime, yyxt19) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt20 != nil { - z.EncExtension(x.MaxQueryTime, yyxt20) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobSpecificRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobSpecificRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "JobID": - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - case "All": - if r.TryDecodeAsNil() { - x.All = false - } else { - x.All = (bool)(r.DecodeBool()) - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt10 != nil { - z.DecExtension(x.MaxQueryTime, yyxt10) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobSpecificRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj15 int - var yyb15 bool - var yyhl15 bool = l >= 0 - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.All = false - } else { - x.All = (bool)(r.DecodeBool()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt22 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt22 != nil { - z.DecExtension(x.MaxQueryTime, yyxt22) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj15-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobListRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(8) - } else { - r.WriteMapStart(8) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt13 != nil { - z.EncExtension(x.MaxQueryTime, yyxt13) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt14 != nil { - z.EncExtension(x.MaxQueryTime, yyxt14) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobListRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobListRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt8 != nil { - z.DecExtension(x.MaxQueryTime, yyxt8) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobListRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt18 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt18 != nil { - z.DecExtension(x.MaxQueryTime, yyxt18) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobPlanRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(7) - } else { - r.WriteMapStart(7) - } - var yyn3 bool - if x.Job == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Job == nil { - r.EncodeNil() - } else { - x.Job.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Job\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Job`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Job == nil { - r.EncodeNil() - } else { - x.Job.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Diff)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Diff\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Diff`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Diff)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.PolicyOverride)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PolicyOverride\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PolicyOverride`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.PolicyOverride)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobPlanRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobPlanRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Job": - if r.TryDecodeAsNil() { - if true && x.Job != nil { - x.Job = nil - } - } else { - if x.Job == nil { - x.Job = new(Job) - } - - x.Job.CodecDecodeSelf(d) - } - case "Diff": - if r.TryDecodeAsNil() { - x.Diff = false - } else { - x.Diff = (bool)(r.DecodeBool()) - } - case "PolicyOverride": - if r.TryDecodeAsNil() { - x.PolicyOverride = false - } else { - x.PolicyOverride = (bool)(r.DecodeBool()) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobPlanRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Job != nil { - x.Job = nil - } - } else { - if x.Job == nil { - x.Job = new(Job) - } - - x.Job.CodecDecodeSelf(d) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Diff = false - } else { - x.Diff = (bool)(r.DecodeBool()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PolicyOverride = false - } else { - x.PolicyOverride = (bool)(r.DecodeBool()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj11-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobSummaryRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(9) - } else { - r.WriteMapStart(9) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt16 != nil { - z.EncExtension(x.MaxQueryTime, yyxt16) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt17 != nil { - z.EncExtension(x.MaxQueryTime, yyxt17) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobSummaryRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobSummaryRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "JobID": - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt9 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt9 != nil { - z.DecExtension(x.MaxQueryTime, yyxt9) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobSummaryRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj14 int - var yyb14 bool - var yyhl14 bool = l >= 0 - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt20 != nil { - z.DecExtension(x.MaxQueryTime, yyxt20) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj14-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobDispatchRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(7) - } else { - r.WriteMapStart(7) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Payload == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.Payload)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Payload\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Payload`) - } - r.WriteMapElemValue() - if x.Payload == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.Payload)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Meta, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Meta\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Meta`) - } - r.WriteMapElemValue() - if x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Meta, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobDispatchRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobDispatchRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "JobID": - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - case "Payload": - if r.TryDecodeAsNil() { - x.Payload = nil - } else { - if false { - } else { - x.Payload = r.DecodeBytes(([]byte)(x.Payload), false) - } - } - case "Meta": - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Meta, d) - } - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobDispatchRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Payload = nil - } else { - if false { - } else { - x.Payload = r.DecodeBytes(([]byte)(x.Payload), false) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Meta, d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobValidateRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - var yyn3 bool - if x.Job == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Job == nil { - r.EncodeNil() - } else { - x.Job.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Job\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Job`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Job == nil { - r.EncodeNil() - } else { - x.Job.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobValidateRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobValidateRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Job": - if r.TryDecodeAsNil() { - if true && x.Job != nil { - x.Job = nil - } - } else { - if x.Job == nil { - x.Job = new(Job) - } - - x.Job.CodecDecodeSelf(d) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobValidateRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Job != nil { - x.Job = nil - } - } else { - if x.Job == nil { - x.Job = new(Job) - } - - x.Job.CodecDecodeSelf(d) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobRevertRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(8) - } else { - r.WriteMapStart(8) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.JobVersion)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobVersion\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobVersion`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.JobVersion)) - } - } - var yyn9 bool - if x.EnforcePriorVersion == nil { - yyn9 = true - goto LABEL9 - } - LABEL9: - if yyr2 || yy2arr2 { - if yyn9 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.EnforcePriorVersion == nil { - r.EncodeNil() - } else { - yy10 := *x.EnforcePriorVersion - if false { - } else { - r.EncodeUint(uint64(yy10)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EnforcePriorVersion\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EnforcePriorVersion`) - } - r.WriteMapElemValue() - if yyn9 { - r.EncodeNil() - } else { - if x.EnforcePriorVersion == nil { - r.EncodeNil() - } else { - yy12 := *x.EnforcePriorVersion - if false { - } else { - r.EncodeUint(uint64(yy12)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.VaultToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.VaultToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"VaultToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `VaultToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.VaultToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.VaultToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobRevertRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobRevertRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "JobID": - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - case "JobVersion": - if r.TryDecodeAsNil() { - x.JobVersion = 0 - } else { - x.JobVersion = (uint64)(r.DecodeUint64()) - } - case "EnforcePriorVersion": - if r.TryDecodeAsNil() { - if true && x.EnforcePriorVersion != nil { - x.EnforcePriorVersion = nil - } - } else { - if x.EnforcePriorVersion == nil { - x.EnforcePriorVersion = new(uint64) - } - - if false { - } else { - *x.EnforcePriorVersion = (uint64)(r.DecodeUint64()) - } - } - case "VaultToken": - if r.TryDecodeAsNil() { - x.VaultToken = "" - } else { - x.VaultToken = (string)(r.DecodeString()) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobRevertRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobVersion = 0 - } else { - x.JobVersion = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.EnforcePriorVersion != nil { - x.EnforcePriorVersion = nil - } - } else { - if x.EnforcePriorVersion == nil { - x.EnforcePriorVersion = new(uint64) - } - - if false { - } else { - *x.EnforcePriorVersion = (uint64)(r.DecodeUint64()) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VaultToken = "" - } else { - x.VaultToken = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobStabilityRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(7) - } else { - r.WriteMapStart(7) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.JobVersion)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobVersion\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobVersion`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.JobVersion)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Stable)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Stable\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Stable`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Stable)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobStabilityRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobStabilityRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "JobID": - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - case "JobVersion": - if r.TryDecodeAsNil() { - x.JobVersion = 0 - } else { - x.JobVersion = (uint64)(r.DecodeUint64()) - } - case "Stable": - if r.TryDecodeAsNil() { - x.Stable = false - } else { - x.Stable = (bool)(r.DecodeBool()) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobStabilityRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobVersion = 0 - } else { - x.JobVersion = (uint64)(r.DecodeUint64()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Stable = false - } else { - x.Stable = (bool)(r.DecodeBool()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj11-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobStabilityResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobStabilityResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobStabilityResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Index": - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobStabilityResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj5 int - var yyb5 bool - var yyhl5 bool = l >= 0 - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeListRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(8) - } else { - r.WriteMapStart(8) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt13 != nil { - z.EncExtension(x.MaxQueryTime, yyxt13) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt14 != nil { - z.EncExtension(x.MaxQueryTime, yyxt14) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeListRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeListRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt8 != nil { - z.DecExtension(x.MaxQueryTime, yyxt8) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeListRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt18 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt18 != nil { - z.DecExtension(x.MaxQueryTime, yyxt18) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-1, "") - } - r.ReadArrayEnd() -} - -func (x *EvalUpdateRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(6) - } else { - r.WriteMapStart(6) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Evals == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoEvaluation(([]*Evaluation)(x.Evals), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Evals\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Evals`) - } - r.WriteMapElemValue() - if x.Evals == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoEvaluation(([]*Evaluation)(x.Evals), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *EvalUpdateRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *EvalUpdateRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Evals": - if r.TryDecodeAsNil() { - x.Evals = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluation((*[]*Evaluation)(&x.Evals), d) - } - } - case "EvalToken": - if r.TryDecodeAsNil() { - x.EvalToken = "" - } else { - x.EvalToken = (string)(r.DecodeString()) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *EvalUpdateRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Evals = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluation((*[]*Evaluation)(&x.Evals), d) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalToken = "" - } else { - x.EvalToken = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj11-1, "") - } - r.ReadArrayEnd() -} - -func (x *EvalDeleteRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(6) - } else { - r.WriteMapStart(6) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Evals == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Evals, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Evals\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Evals`) - } - r.WriteMapElemValue() - if x.Evals == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Evals, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Allocs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Allocs, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Allocs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Allocs`) - } - r.WriteMapElemValue() - if x.Allocs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Allocs, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *EvalDeleteRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *EvalDeleteRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Evals": - if r.TryDecodeAsNil() { - x.Evals = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Evals, d) - } - } - case "Allocs": - if r.TryDecodeAsNil() { - x.Allocs = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Allocs, d) - } - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *EvalDeleteRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Evals = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Evals, d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Allocs = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Allocs, d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj12-1, "") - } - r.ReadArrayEnd() -} - -func (x *EvalSpecificRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(9) - } else { - r.WriteMapStart(9) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt16 != nil { - z.EncExtension(x.MaxQueryTime, yyxt16) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt17 != nil { - z.EncExtension(x.MaxQueryTime, yyxt17) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *EvalSpecificRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *EvalSpecificRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "EvalID": - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt9 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt9 != nil { - z.DecExtension(x.MaxQueryTime, yyxt9) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *EvalSpecificRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj14 int - var yyb14 bool - var yyhl14 bool = l >= 0 - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt20 != nil { - z.DecExtension(x.MaxQueryTime, yyxt20) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj14-1, "") - } - r.ReadArrayEnd() -} - -func (x *EvalAckRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(6) - } else { - r.WriteMapStart(6) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Token))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Token)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Token\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Token`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Token))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Token)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *EvalAckRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *EvalAckRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "EvalID": - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - case "Token": - if r.TryDecodeAsNil() { - x.Token = "" - } else { - x.Token = (string)(r.DecodeString()) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *EvalAckRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Token = "" - } else { - x.Token = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *EvalDequeueRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(7) - } else { - r.WriteMapStart(7) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Schedulers == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Schedulers, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Schedulers\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Schedulers`) - } - r.WriteMapElemValue() - if x.Schedulers == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Schedulers, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.Timeout)); yyxt7 != nil { - z.EncExtension(x.Timeout, yyxt7) - } else { - r.EncodeInt(int64(x.Timeout)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Timeout\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Timeout`) - } - r.WriteMapElemValue() - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.Timeout)); yyxt8 != nil { - z.EncExtension(x.Timeout, yyxt8) - } else { - r.EncodeInt(int64(x.Timeout)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.SchedulerVersion)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SchedulerVersion\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SchedulerVersion`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.SchedulerVersion)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *EvalDequeueRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *EvalDequeueRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Schedulers": - if r.TryDecodeAsNil() { - x.Schedulers = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Schedulers, d) - } - } - case "Timeout": - if r.TryDecodeAsNil() { - x.Timeout = 0 - } else { - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.Timeout)); yyxt7 != nil { - z.DecExtension(x.Timeout, yyxt7) - } else { - x.Timeout = (time.Duration)(r.DecodeInt64()) - } - } - case "SchedulerVersion": - if r.TryDecodeAsNil() { - x.SchedulerVersion = 0 - } else { - x.SchedulerVersion = (uint16)(z.C.UintV(r.DecodeUint64(), 16)) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *EvalDequeueRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Schedulers = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Schedulers, d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Timeout = 0 - } else { - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.Timeout)); yyxt17 != nil { - z.DecExtension(x.Timeout, yyxt17) - } else { - x.Timeout = (time.Duration)(r.DecodeInt64()) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SchedulerVersion = 0 - } else { - x.SchedulerVersion = (uint16)(z.C.UintV(r.DecodeUint64(), 16)) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-1, "") - } - r.ReadArrayEnd() -} - -func (x *EvalListRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(8) - } else { - r.WriteMapStart(8) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt13 != nil { - z.EncExtension(x.MaxQueryTime, yyxt13) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt14 != nil { - z.EncExtension(x.MaxQueryTime, yyxt14) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *EvalListRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *EvalListRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt8 != nil { - z.DecExtension(x.MaxQueryTime, yyxt8) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *EvalListRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt18 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt18 != nil { - z.DecExtension(x.MaxQueryTime, yyxt18) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-1, "") - } - r.ReadArrayEnd() -} - -func (x *PlanRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - var yyn3 bool - if x.Plan == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Plan == nil { - r.EncodeNil() - } else { - x.Plan.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Plan\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Plan`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Plan == nil { - r.EncodeNil() - } else { - x.Plan.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *PlanRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *PlanRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Plan": - if r.TryDecodeAsNil() { - if true && x.Plan != nil { - x.Plan = nil - } - } else { - if x.Plan == nil { - x.Plan = new(Plan) - } - - x.Plan.CodecDecodeSelf(d) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *PlanRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Plan != nil { - x.Plan = nil - } - } else { - if x.Plan == nil { - x.Plan = new(Plan) - } - - x.Plan.CodecDecodeSelf(d) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *ApplyPlanResultsRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(15) - } else { - r.WriteMapStart(15) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Alloc == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocation(([]*Allocation)(x.Alloc), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Alloc\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Alloc`) - } - r.WriteMapElemValue() - if x.Alloc == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocation(([]*Allocation)(x.Alloc), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.AllocsStopped == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocationDiff(([]*AllocationDiff)(x.AllocsStopped), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocsStopped\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllocsStopped`) - } - r.WriteMapElemValue() - if x.AllocsStopped == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocationDiff(([]*AllocationDiff)(x.AllocsStopped), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.AllocsUpdated == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocation(([]*Allocation)(x.AllocsUpdated), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocsUpdated\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllocsUpdated`) - } - r.WriteMapElemValue() - if x.AllocsUpdated == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocation(([]*Allocation)(x.AllocsUpdated), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Evals == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoEvaluation(([]*Evaluation)(x.Evals), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Evals\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Evals`) - } - r.WriteMapElemValue() - if x.Evals == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoEvaluation(([]*Evaluation)(x.Evals), e) - } - } - } - var yyn15 bool - if x.AllocUpdateRequest.Job == nil { - yyn15 = true - goto LABEL15 - } - LABEL15: - if yyr2 || yy2arr2 { - if yyn15 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Job == nil { - r.EncodeNil() - } else { - x.Job.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Job\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Job`) - } - r.WriteMapElemValue() - if yyn15 { - r.EncodeNil() - } else { - if x.Job == nil { - r.EncodeNil() - } else { - x.Job.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - var yyn30 bool - if x.Deployment == nil { - yyn30 = true - goto LABEL30 - } - LABEL30: - if yyr2 || yy2arr2 { - if yyn30 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Deployment == nil { - r.EncodeNil() - } else { - x.Deployment.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Deployment\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Deployment`) - } - r.WriteMapElemValue() - if yyn30 { - r.EncodeNil() - } else { - if x.Deployment == nil { - r.EncodeNil() - } else { - x.Deployment.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.DeploymentUpdates == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoDeploymentStatusUpdate(([]*DeploymentStatusUpdate)(x.DeploymentUpdates), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeploymentUpdates\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DeploymentUpdates`) - } - r.WriteMapElemValue() - if x.DeploymentUpdates == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoDeploymentStatusUpdate(([]*DeploymentStatusUpdate)(x.DeploymentUpdates), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.NodePreemptions == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocation(([]*Allocation)(x.NodePreemptions), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodePreemptions\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodePreemptions`) - } - r.WriteMapElemValue() - if x.NodePreemptions == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocation(([]*Allocation)(x.NodePreemptions), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.AllocsPreempted == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocationDiff(([]*AllocationDiff)(x.AllocsPreempted), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocsPreempted\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllocsPreempted`) - } - r.WriteMapElemValue() - if x.AllocsPreempted == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocationDiff(([]*AllocationDiff)(x.AllocsPreempted), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.PreemptionEvals == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoEvaluation(([]*Evaluation)(x.PreemptionEvals), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PreemptionEvals\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PreemptionEvals`) - } - r.WriteMapElemValue() - if x.PreemptionEvals == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoEvaluation(([]*Evaluation)(x.PreemptionEvals), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ApplyPlanResultsRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ApplyPlanResultsRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Alloc": - if r.TryDecodeAsNil() { - x.AllocUpdateRequest.Alloc = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocation((*[]*Allocation)(&x.Alloc), d) - } - } - case "AllocsStopped": - if r.TryDecodeAsNil() { - x.AllocUpdateRequest.AllocsStopped = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocationDiff((*[]*AllocationDiff)(&x.AllocsStopped), d) - } - } - case "AllocsUpdated": - if r.TryDecodeAsNil() { - x.AllocUpdateRequest.AllocsUpdated = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocation((*[]*Allocation)(&x.AllocsUpdated), d) - } - } - case "Evals": - if r.TryDecodeAsNil() { - x.AllocUpdateRequest.Evals = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluation((*[]*Evaluation)(&x.Evals), d) - } - } - case "Job": - if r.TryDecodeAsNil() { - if true && x.AllocUpdateRequest.Job != nil { - x.AllocUpdateRequest.Job = nil - } - } else { - if x.AllocUpdateRequest.Job == nil { - x.AllocUpdateRequest.Job = new(Job) - } - - x.Job.CodecDecodeSelf(d) - } - case "Region": - if r.TryDecodeAsNil() { - x.AllocUpdateRequest.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.AllocUpdateRequest.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.AllocUpdateRequest.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.AllocUpdateRequest.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - case "Deployment": - if r.TryDecodeAsNil() { - if true && x.Deployment != nil { - x.Deployment = nil - } - } else { - if x.Deployment == nil { - x.Deployment = new(Deployment) - } - - x.Deployment.CodecDecodeSelf(d) - } - case "DeploymentUpdates": - if r.TryDecodeAsNil() { - x.DeploymentUpdates = nil - } else { - if false { - } else { - h.decSlicePtrtoDeploymentStatusUpdate((*[]*DeploymentStatusUpdate)(&x.DeploymentUpdates), d) - } - } - case "EvalID": - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - case "NodePreemptions": - if r.TryDecodeAsNil() { - x.NodePreemptions = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocation((*[]*Allocation)(&x.NodePreemptions), d) - } - } - case "AllocsPreempted": - if r.TryDecodeAsNil() { - x.AllocsPreempted = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocationDiff((*[]*AllocationDiff)(&x.AllocsPreempted), d) - } - } - case "PreemptionEvals": - if r.TryDecodeAsNil() { - x.PreemptionEvals = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluation((*[]*Evaluation)(&x.PreemptionEvals), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ApplyPlanResultsRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj27 int - var yyb27 bool - var yyhl27 bool = l >= 0 - yyj27++ - if yyhl27 { - yyb27 = yyj27 > l - } else { - yyb27 = r.CheckBreak() - } - if yyb27 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocUpdateRequest.Alloc = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocation((*[]*Allocation)(&x.Alloc), d) - } - } - yyj27++ - if yyhl27 { - yyb27 = yyj27 > l - } else { - yyb27 = r.CheckBreak() - } - if yyb27 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocUpdateRequest.AllocsStopped = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocationDiff((*[]*AllocationDiff)(&x.AllocsStopped), d) - } - } - yyj27++ - if yyhl27 { - yyb27 = yyj27 > l - } else { - yyb27 = r.CheckBreak() - } - if yyb27 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocUpdateRequest.AllocsUpdated = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocation((*[]*Allocation)(&x.AllocsUpdated), d) - } - } - yyj27++ - if yyhl27 { - yyb27 = yyj27 > l - } else { - yyb27 = r.CheckBreak() - } - if yyb27 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocUpdateRequest.Evals = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluation((*[]*Evaluation)(&x.Evals), d) - } - } - yyj27++ - if yyhl27 { - yyb27 = yyj27 > l - } else { - yyb27 = r.CheckBreak() - } - if yyb27 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.AllocUpdateRequest.Job != nil { - x.AllocUpdateRequest.Job = nil - } - } else { - if x.AllocUpdateRequest.Job == nil { - x.AllocUpdateRequest.Job = new(Job) - } - - x.Job.CodecDecodeSelf(d) - } - yyj27++ - if yyhl27 { - yyb27 = yyj27 > l - } else { - yyb27 = r.CheckBreak() - } - if yyb27 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocUpdateRequest.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj27++ - if yyhl27 { - yyb27 = yyj27 > l - } else { - yyb27 = r.CheckBreak() - } - if yyb27 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocUpdateRequest.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj27++ - if yyhl27 { - yyb27 = yyj27 > l - } else { - yyb27 = r.CheckBreak() - } - if yyb27 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocUpdateRequest.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj27++ - if yyhl27 { - yyb27 = yyj27 > l - } else { - yyb27 = r.CheckBreak() - } - if yyb27 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocUpdateRequest.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - yyj27++ - if yyhl27 { - yyb27 = yyj27 > l - } else { - yyb27 = r.CheckBreak() - } - if yyb27 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Deployment != nil { - x.Deployment = nil - } - } else { - if x.Deployment == nil { - x.Deployment = new(Deployment) - } - - x.Deployment.CodecDecodeSelf(d) - } - yyj27++ - if yyhl27 { - yyb27 = yyj27 > l - } else { - yyb27 = r.CheckBreak() - } - if yyb27 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentUpdates = nil - } else { - if false { - } else { - h.decSlicePtrtoDeploymentStatusUpdate((*[]*DeploymentStatusUpdate)(&x.DeploymentUpdates), d) - } - } - yyj27++ - if yyhl27 { - yyb27 = yyj27 > l - } else { - yyb27 = r.CheckBreak() - } - if yyb27 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - yyj27++ - if yyhl27 { - yyb27 = yyj27 > l - } else { - yyb27 = r.CheckBreak() - } - if yyb27 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodePreemptions = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocation((*[]*Allocation)(&x.NodePreemptions), d) - } - } - yyj27++ - if yyhl27 { - yyb27 = yyj27 > l - } else { - yyb27 = r.CheckBreak() - } - if yyb27 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocsPreempted = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocationDiff((*[]*AllocationDiff)(&x.AllocsPreempted), d) - } - } - yyj27++ - if yyhl27 { - yyb27 = yyj27 > l - } else { - yyb27 = r.CheckBreak() - } - if yyb27 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreemptionEvals = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluation((*[]*Evaluation)(&x.PreemptionEvals), d) - } - } - for { - yyj27++ - if yyhl27 { - yyb27 = yyj27 > l - } else { - yyb27 = r.CheckBreak() - } - if yyb27 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj27-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocUpdateRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(9) - } else { - r.WriteMapStart(9) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Alloc == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocation(([]*Allocation)(x.Alloc), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Alloc\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Alloc`) - } - r.WriteMapElemValue() - if x.Alloc == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocation(([]*Allocation)(x.Alloc), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.AllocsStopped == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocationDiff(([]*AllocationDiff)(x.AllocsStopped), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocsStopped\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllocsStopped`) - } - r.WriteMapElemValue() - if x.AllocsStopped == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocationDiff(([]*AllocationDiff)(x.AllocsStopped), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.AllocsUpdated == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocation(([]*Allocation)(x.AllocsUpdated), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocsUpdated\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllocsUpdated`) - } - r.WriteMapElemValue() - if x.AllocsUpdated == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocation(([]*Allocation)(x.AllocsUpdated), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Evals == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoEvaluation(([]*Evaluation)(x.Evals), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Evals\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Evals`) - } - r.WriteMapElemValue() - if x.Evals == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoEvaluation(([]*Evaluation)(x.Evals), e) - } - } - } - var yyn15 bool - if x.Job == nil { - yyn15 = true - goto LABEL15 - } - LABEL15: - if yyr2 || yy2arr2 { - if yyn15 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Job == nil { - r.EncodeNil() - } else { - x.Job.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Job\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Job`) - } - r.WriteMapElemValue() - if yyn15 { - r.EncodeNil() - } else { - if x.Job == nil { - r.EncodeNil() - } else { - x.Job.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocUpdateRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *AllocUpdateRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Alloc": - if r.TryDecodeAsNil() { - x.Alloc = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocation((*[]*Allocation)(&x.Alloc), d) - } - } - case "AllocsStopped": - if r.TryDecodeAsNil() { - x.AllocsStopped = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocationDiff((*[]*AllocationDiff)(&x.AllocsStopped), d) - } - } - case "AllocsUpdated": - if r.TryDecodeAsNil() { - x.AllocsUpdated = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocation((*[]*Allocation)(&x.AllocsUpdated), d) - } - } - case "Evals": - if r.TryDecodeAsNil() { - x.Evals = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluation((*[]*Evaluation)(&x.Evals), d) - } - } - case "Job": - if r.TryDecodeAsNil() { - if true && x.Job != nil { - x.Job = nil - } - } else { - if x.Job == nil { - x.Job = new(Job) - } - - x.Job.CodecDecodeSelf(d) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocUpdateRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj17 int - var yyb17 bool - var yyhl17 bool = l >= 0 - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Alloc = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocation((*[]*Allocation)(&x.Alloc), d) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocsStopped = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocationDiff((*[]*AllocationDiff)(&x.AllocsStopped), d) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocsUpdated = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocation((*[]*Allocation)(&x.AllocsUpdated), d) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Evals = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluation((*[]*Evaluation)(&x.Evals), d) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Job != nil { - x.Job = nil - } - } else { - if x.Job == nil { - x.Job = new(Job) - } - - x.Job.CodecDecodeSelf(d) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj17-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocUpdateDesiredTransitionRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(6) - } else { - r.WriteMapStart(6) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Allocs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoDesiredTransition((map[string]*DesiredTransition)(x.Allocs), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Allocs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Allocs`) - } - r.WriteMapElemValue() - if x.Allocs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoDesiredTransition((map[string]*DesiredTransition)(x.Allocs), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Evals == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoEvaluation(([]*Evaluation)(x.Evals), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Evals\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Evals`) - } - r.WriteMapElemValue() - if x.Evals == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoEvaluation(([]*Evaluation)(x.Evals), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocUpdateDesiredTransitionRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *AllocUpdateDesiredTransitionRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Allocs": - if r.TryDecodeAsNil() { - x.Allocs = nil - } else { - if false { - } else { - h.decMapstringPtrtoDesiredTransition((*map[string]*DesiredTransition)(&x.Allocs), d) - } - } - case "Evals": - if r.TryDecodeAsNil() { - x.Evals = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluation((*[]*Evaluation)(&x.Evals), d) - } - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocUpdateDesiredTransitionRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Allocs = nil - } else { - if false { - } else { - h.decMapstringPtrtoDesiredTransition((*map[string]*DesiredTransition)(&x.Allocs), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Evals = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluation((*[]*Evaluation)(&x.Evals), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj12-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocStopRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AllocID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllocID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AllocID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocStopRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *AllocStopRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "AllocID": - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocStopRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocStopResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(2) - } else { - r.WriteMapStart(2) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocStopResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *AllocStopResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "EvalID": - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - case "Index": - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocStopResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj6-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocListRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(8) - } else { - r.WriteMapStart(8) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt13 != nil { - z.EncExtension(x.MaxQueryTime, yyxt13) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt14 != nil { - z.EncExtension(x.MaxQueryTime, yyxt14) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocListRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *AllocListRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt8 != nil { - z.DecExtension(x.MaxQueryTime, yyxt8) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocListRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt18 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt18 != nil { - z.DecExtension(x.MaxQueryTime, yyxt18) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocSpecificRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(9) - } else { - r.WriteMapStart(9) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AllocID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllocID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AllocID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt16 != nil { - z.EncExtension(x.MaxQueryTime, yyxt16) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt17 != nil { - z.EncExtension(x.MaxQueryTime, yyxt17) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocSpecificRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *AllocSpecificRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "AllocID": - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt9 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt9 != nil { - z.DecExtension(x.MaxQueryTime, yyxt9) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocSpecificRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj14 int - var yyb14 bool - var yyhl14 bool = l >= 0 - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt20 != nil { - z.DecExtension(x.MaxQueryTime, yyxt20) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj14-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocSignalRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(11) - } else { - r.WriteMapStart(11) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AllocID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllocID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AllocID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Task))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Task)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Task\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Task`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Task))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Task)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Signal))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Signal)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Signal\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Signal`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Signal))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Signal)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt22 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt22 != nil { - z.EncExtension(x.MaxQueryTime, yyxt22) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt23 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt23 != nil { - z.EncExtension(x.MaxQueryTime, yyxt23) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocSignalRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *AllocSignalRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "AllocID": - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - case "Task": - if r.TryDecodeAsNil() { - x.Task = "" - } else { - x.Task = (string)(r.DecodeString()) - } - case "Signal": - if r.TryDecodeAsNil() { - x.Signal = "" - } else { - x.Signal = (string)(r.DecodeString()) - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt11 != nil { - z.DecExtension(x.MaxQueryTime, yyxt11) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocSignalRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj16 int - var yyb16 bool - var yyhl16 bool = l >= 0 - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Task = "" - } else { - x.Task = (string)(r.DecodeString()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Signal = "" - } else { - x.Signal = (string)(r.DecodeString()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt24 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt24 != nil { - z.DecExtension(x.MaxQueryTime, yyxt24) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj16-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocsGetRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(9) - } else { - r.WriteMapStart(9) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.AllocIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.AllocIDs, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocIDs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllocIDs`) - } - r.WriteMapElemValue() - if x.AllocIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.AllocIDs, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt16 != nil { - z.EncExtension(x.MaxQueryTime, yyxt16) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt17 != nil { - z.EncExtension(x.MaxQueryTime, yyxt17) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocsGetRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *AllocsGetRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "AllocIDs": - if r.TryDecodeAsNil() { - x.AllocIDs = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.AllocIDs, d) - } - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt10 != nil { - z.DecExtension(x.MaxQueryTime, yyxt10) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocsGetRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj15 int - var yyb15 bool - var yyhl15 bool = l >= 0 - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocIDs = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.AllocIDs, d) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt22 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt22 != nil { - z.DecExtension(x.MaxQueryTime, yyxt22) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj15-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocRestartRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(10) - } else { - r.WriteMapStart(10) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AllocID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllocID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AllocID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TaskName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TaskName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TaskName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TaskName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TaskName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TaskName)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt19 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt19 != nil { - z.EncExtension(x.MaxQueryTime, yyxt19) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt20 != nil { - z.EncExtension(x.MaxQueryTime, yyxt20) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocRestartRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *AllocRestartRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "AllocID": - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - case "TaskName": - if r.TryDecodeAsNil() { - x.TaskName = "" - } else { - x.TaskName = (string)(r.DecodeString()) - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt10 != nil { - z.DecExtension(x.MaxQueryTime, yyxt10) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocRestartRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj15 int - var yyb15 bool - var yyhl15 bool = l >= 0 - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskName = "" - } else { - x.TaskName = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt22 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt22 != nil { - z.DecExtension(x.MaxQueryTime, yyxt22) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj15-1, "") - } - r.ReadArrayEnd() -} - -func (x *PeriodicForceRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *PeriodicForceRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *PeriodicForceRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "JobID": - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *PeriodicForceRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *ServerMembersResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ServerName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ServerName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ServerName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ServerName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ServerName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ServerName)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ServerRegion))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ServerRegion)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ServerRegion\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ServerRegion`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ServerRegion))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ServerRegion)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ServerDC))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ServerDC)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ServerDC\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ServerDC`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ServerDC))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ServerDC)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Members == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoServerMember(([]*ServerMember)(x.Members), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Members\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Members`) - } - r.WriteMapElemValue() - if x.Members == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoServerMember(([]*ServerMember)(x.Members), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ServerMembersResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ServerMembersResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "ServerName": - if r.TryDecodeAsNil() { - x.ServerName = "" - } else { - x.ServerName = (string)(r.DecodeString()) - } - case "ServerRegion": - if r.TryDecodeAsNil() { - x.ServerRegion = "" - } else { - x.ServerRegion = (string)(r.DecodeString()) - } - case "ServerDC": - if r.TryDecodeAsNil() { - x.ServerDC = "" - } else { - x.ServerDC = (string)(r.DecodeString()) - } - case "Members": - if r.TryDecodeAsNil() { - x.Members = nil - } else { - if false { - } else { - h.decSlicePtrtoServerMember((*[]*ServerMember)(&x.Members), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ServerMembersResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ServerName = "" - } else { - x.ServerName = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ServerRegion = "" - } else { - x.ServerRegion = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ServerDC = "" - } else { - x.ServerDC = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Members = nil - } else { - if false { - } else { - h.decSlicePtrtoServerMember((*[]*ServerMember)(&x.Members), d) - } - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *ServerMember) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(11) - } else { - r.WriteMapStart(11) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Addr == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.Addr)); yyxt7 != nil { - z.EncExtension(x.Addr, yyxt7) - } else if !z.EncBinary() { - z.EncTextMarshal(x.Addr) - } else { - h.encnet_IP((net.IP)(x.Addr), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Addr\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Addr`) - } - r.WriteMapElemValue() - if x.Addr == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.Addr)); yyxt8 != nil { - z.EncExtension(x.Addr, yyxt8) - } else if !z.EncBinary() { - z.EncTextMarshal(x.Addr) - } else { - h.encnet_IP((net.IP)(x.Addr), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Port)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Port\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Port`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Port)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Tags == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Tags, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Tags\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Tags`) - } - r.WriteMapElemValue() - if x.Tags == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Tags, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Status))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Status)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Status\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Status`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Status))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Status)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.ProtocolMin)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ProtocolMin\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ProtocolMin`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.ProtocolMin)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.ProtocolMax)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ProtocolMax\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ProtocolMax`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.ProtocolMax)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.ProtocolCur)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ProtocolCur\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ProtocolCur`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.ProtocolCur)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.DelegateMin)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DelegateMin\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DelegateMin`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.DelegateMin)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.DelegateMax)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DelegateMax\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DelegateMax`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.DelegateMax)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.DelegateCur)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DelegateCur\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DelegateCur`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.DelegateCur)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ServerMember) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ServerMember) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Addr": - if r.TryDecodeAsNil() { - x.Addr = nil - } else { - if false { - } else if yyxt6 := z.Extension(z.I2Rtid(x.Addr)); yyxt6 != nil { - z.DecExtension(x.Addr, yyxt6) - } else if !z.DecBinary() { - z.DecTextUnmarshal(&x.Addr) - } else { - h.decnet_IP((*net.IP)(&x.Addr), d) - } - } - case "Port": - if r.TryDecodeAsNil() { - x.Port = 0 - } else { - x.Port = (uint16)(z.C.UintV(r.DecodeUint64(), 16)) - } - case "Tags": - if r.TryDecodeAsNil() { - x.Tags = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Tags, d) - } - } - case "Status": - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - case "ProtocolMin": - if r.TryDecodeAsNil() { - x.ProtocolMin = 0 - } else { - x.ProtocolMin = (uint8)(z.C.UintV(r.DecodeUint64(), 8)) - } - case "ProtocolMax": - if r.TryDecodeAsNil() { - x.ProtocolMax = 0 - } else { - x.ProtocolMax = (uint8)(z.C.UintV(r.DecodeUint64(), 8)) - } - case "ProtocolCur": - if r.TryDecodeAsNil() { - x.ProtocolCur = 0 - } else { - x.ProtocolCur = (uint8)(z.C.UintV(r.DecodeUint64(), 8)) - } - case "DelegateMin": - if r.TryDecodeAsNil() { - x.DelegateMin = 0 - } else { - x.DelegateMin = (uint8)(z.C.UintV(r.DecodeUint64(), 8)) - } - case "DelegateMax": - if r.TryDecodeAsNil() { - x.DelegateMax = 0 - } else { - x.DelegateMax = (uint8)(z.C.UintV(r.DecodeUint64(), 8)) - } - case "DelegateCur": - if r.TryDecodeAsNil() { - x.DelegateCur = 0 - } else { - x.DelegateCur = (uint8)(z.C.UintV(r.DecodeUint64(), 8)) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ServerMember) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj17 int - var yyb17 bool - var yyhl17 bool = l >= 0 - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Addr = nil - } else { - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.Addr)); yyxt20 != nil { - z.DecExtension(x.Addr, yyxt20) - } else if !z.DecBinary() { - z.DecTextUnmarshal(&x.Addr) - } else { - h.decnet_IP((*net.IP)(&x.Addr), d) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Port = 0 - } else { - x.Port = (uint16)(z.C.UintV(r.DecodeUint64(), 16)) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Tags = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Tags, d) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ProtocolMin = 0 - } else { - x.ProtocolMin = (uint8)(z.C.UintV(r.DecodeUint64(), 8)) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ProtocolMax = 0 - } else { - x.ProtocolMax = (uint8)(z.C.UintV(r.DecodeUint64(), 8)) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ProtocolCur = 0 - } else { - x.ProtocolCur = (uint8)(z.C.UintV(r.DecodeUint64(), 8)) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DelegateMin = 0 - } else { - x.DelegateMin = (uint8)(z.C.UintV(r.DecodeUint64(), 8)) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DelegateMax = 0 - } else { - x.DelegateMax = (uint8)(z.C.UintV(r.DecodeUint64(), 8)) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DelegateCur = 0 - } else { - x.DelegateCur = (uint8)(z.C.UintV(r.DecodeUint64(), 8)) - } - for { - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj17-1, "") - } - r.ReadArrayEnd() -} - -func (x *DeriveVaultTokenRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(12) - } else { - r.WriteMapStart(12) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SecretID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SecretID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SecretID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SecretID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SecretID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SecretID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AllocID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllocID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AllocID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Tasks == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Tasks, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Tasks\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Tasks`) - } - r.WriteMapElemValue() - if x.Tasks == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Tasks, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt25 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt25 != nil { - z.EncExtension(x.MaxQueryTime, yyxt25) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt26 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt26 != nil { - z.EncExtension(x.MaxQueryTime, yyxt26) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DeriveVaultTokenRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *DeriveVaultTokenRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "NodeID": - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - case "SecretID": - if r.TryDecodeAsNil() { - x.SecretID = "" - } else { - x.SecretID = (string)(r.DecodeString()) - } - case "AllocID": - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - case "Tasks": - if r.TryDecodeAsNil() { - x.Tasks = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Tasks, d) - } - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt13 != nil { - z.DecExtension(x.MaxQueryTime, yyxt13) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DeriveVaultTokenRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj18 int - var yyb18 bool - var yyhl18 bool = l >= 0 - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SecretID = "" - } else { - x.SecretID = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Tasks = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Tasks, d) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt28 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt28 != nil { - z.DecExtension(x.MaxQueryTime, yyxt28) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj18-1, "") - } - r.ReadArrayEnd() -} - -func (x *VaultAccessorsRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Accessors == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoVaultAccessor(([]*VaultAccessor)(x.Accessors), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Accessors\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Accessors`) - } - r.WriteMapElemValue() - if x.Accessors == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoVaultAccessor(([]*VaultAccessor)(x.Accessors), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *VaultAccessorsRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *VaultAccessorsRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Accessors": - if r.TryDecodeAsNil() { - x.Accessors = nil - } else { - if false { - } else { - h.decSlicePtrtoVaultAccessor((*[]*VaultAccessor)(&x.Accessors), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *VaultAccessorsRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Accessors = nil - } else { - if false { - } else { - h.decSlicePtrtoVaultAccessor((*[]*VaultAccessor)(&x.Accessors), d) - } - } - for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj6-1, "") - } - r.ReadArrayEnd() -} - -func (x *VaultAccessor) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(6) - } else { - r.WriteMapStart(6) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AllocID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllocID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AllocID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Task))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Task)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Task\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Task`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Task))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Task)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Accessor))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Accessor)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Accessor\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Accessor`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Accessor))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Accessor)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.CreationTTL)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreationTTL\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreationTTL`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.CreationTTL)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *VaultAccessor) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *VaultAccessor) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "AllocID": - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - case "Task": - if r.TryDecodeAsNil() { - x.Task = "" - } else { - x.Task = (string)(r.DecodeString()) - } - case "NodeID": - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - case "Accessor": - if r.TryDecodeAsNil() { - x.Accessor = "" - } else { - x.Accessor = (string)(r.DecodeString()) - } - case "CreationTTL": - if r.TryDecodeAsNil() { - x.CreationTTL = 0 - } else { - x.CreationTTL = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "CreateIndex": - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *VaultAccessor) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocID = "" - } else { - x.AllocID = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Task = "" - } else { - x.Task = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Accessor = "" - } else { - x.Accessor = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreationTTL = 0 - } else { - x.CreationTTL = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *DeriveVaultTokenResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Tasks == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Tasks, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Tasks\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Tasks`) - } - r.WriteMapElemValue() - if x.Tasks == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Tasks, e) - } - } - } - var yyn6 bool - if x.Error == nil { - yyn6 = true - goto LABEL6 - } - LABEL6: - if yyr2 || yy2arr2 { - if yyn6 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Error == nil { - r.EncodeNil() - } else { - x.Error.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Error\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Error`) - } - r.WriteMapElemValue() - if yyn6 { - r.EncodeNil() - } else { - if x.Error == nil { - r.EncodeNil() - } else { - x.Error.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.LastContact)); yyxt13 != nil { - z.EncExtension(x.LastContact, yyxt13) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.EncExtension(x.LastContact, yyxt14) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DeriveVaultTokenResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *DeriveVaultTokenResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Tasks": - if r.TryDecodeAsNil() { - x.Tasks = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Tasks, d) - } - } - case "Error": - if r.TryDecodeAsNil() { - if true && x.Error != nil { - x.Error = nil - } - } else { - if x.Error == nil { - x.Error = new(RecoverableError) - } - - x.Error.CodecDecodeSelf(d) - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt9 := z.Extension(z.I2Rtid(x.LastContact)); yyxt9 != nil { - z.DecExtension(x.LastContact, yyxt9) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DeriveVaultTokenResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Tasks = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Tasks, d) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Error != nil { - x.Error = nil - } - } else { - if x.Error == nil { - x.Error = new(RecoverableError) - } - - x.Error.CodecDecodeSelf(d) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.LastContact)); yyxt17 != nil { - z.DecExtension(x.LastContact, yyxt17) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj11-1, "") - } - r.ReadArrayEnd() -} - -func (x *GenericRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(8) - } else { - r.WriteMapStart(8) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt13 != nil { - z.EncExtension(x.MaxQueryTime, yyxt13) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt14 != nil { - z.EncExtension(x.MaxQueryTime, yyxt14) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *GenericRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *GenericRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt8 != nil { - z.DecExtension(x.MaxQueryTime, yyxt8) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *GenericRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt18 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt18 != nil { - z.DecExtension(x.MaxQueryTime, yyxt18) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-1, "") - } - r.ReadArrayEnd() -} - -func (x *DeploymentListRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(8) - } else { - r.WriteMapStart(8) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt13 != nil { - z.EncExtension(x.MaxQueryTime, yyxt13) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt14 != nil { - z.EncExtension(x.MaxQueryTime, yyxt14) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DeploymentListRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *DeploymentListRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt8 != nil { - z.DecExtension(x.MaxQueryTime, yyxt8) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DeploymentListRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt18 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt18 != nil { - z.DecExtension(x.MaxQueryTime, yyxt18) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-1, "") - } - r.ReadArrayEnd() -} - -func (x *DeploymentDeleteRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Deployments == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Deployments, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Deployments\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Deployments`) - } - r.WriteMapElemValue() - if x.Deployments == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Deployments, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DeploymentDeleteRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *DeploymentDeleteRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Deployments": - if r.TryDecodeAsNil() { - x.Deployments = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Deployments, d) - } - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DeploymentDeleteRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Deployments = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Deployments, d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *DeploymentStatusUpdateRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(3) - } else { - r.WriteMapStart(3) - } - var yyn3 bool - if x.Eval == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Eval == nil { - r.EncodeNil() - } else { - x.Eval.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Eval\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Eval`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Eval == nil { - r.EncodeNil() - } else { - x.Eval.CodecEncodeSelf(e) - } - } - } - var yyn6 bool - if x.DeploymentUpdate == nil { - yyn6 = true - goto LABEL6 - } - LABEL6: - if yyr2 || yy2arr2 { - if yyn6 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.DeploymentUpdate == nil { - r.EncodeNil() - } else { - x.DeploymentUpdate.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeploymentUpdate\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DeploymentUpdate`) - } - r.WriteMapElemValue() - if yyn6 { - r.EncodeNil() - } else { - if x.DeploymentUpdate == nil { - r.EncodeNil() - } else { - x.DeploymentUpdate.CodecEncodeSelf(e) - } - } - } - var yyn9 bool - if x.Job == nil { - yyn9 = true - goto LABEL9 - } - LABEL9: - if yyr2 || yy2arr2 { - if yyn9 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Job == nil { - r.EncodeNil() - } else { - x.Job.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Job\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Job`) - } - r.WriteMapElemValue() - if yyn9 { - r.EncodeNil() - } else { - if x.Job == nil { - r.EncodeNil() - } else { - x.Job.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DeploymentStatusUpdateRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *DeploymentStatusUpdateRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Eval": - if r.TryDecodeAsNil() { - if true && x.Eval != nil { - x.Eval = nil - } - } else { - if x.Eval == nil { - x.Eval = new(Evaluation) - } - - x.Eval.CodecDecodeSelf(d) - } - case "DeploymentUpdate": - if r.TryDecodeAsNil() { - if true && x.DeploymentUpdate != nil { - x.DeploymentUpdate = nil - } - } else { - if x.DeploymentUpdate == nil { - x.DeploymentUpdate = new(DeploymentStatusUpdate) - } - - x.DeploymentUpdate.CodecDecodeSelf(d) - } - case "Job": - if r.TryDecodeAsNil() { - if true && x.Job != nil { - x.Job = nil - } - } else { - if x.Job == nil { - x.Job = new(Job) - } - - x.Job.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DeploymentStatusUpdateRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj7 int - var yyb7 bool - var yyhl7 bool = l >= 0 - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Eval != nil { - x.Eval = nil - } - } else { - if x.Eval == nil { - x.Eval = new(Evaluation) - } - - x.Eval.CodecDecodeSelf(d) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.DeploymentUpdate != nil { - x.DeploymentUpdate = nil - } - } else { - if x.DeploymentUpdate == nil { - x.DeploymentUpdate = new(DeploymentStatusUpdate) - } - - x.DeploymentUpdate.CodecDecodeSelf(d) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Job != nil { - x.Job = nil - } - } else { - if x.Job == nil { - x.Job = new(Job) - } - - x.Job.CodecDecodeSelf(d) - } - for { - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj7-1, "") - } - r.ReadArrayEnd() -} - -func (x *DeploymentAllocHealthRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(7) - } else { - r.WriteMapStart(7) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DeploymentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DeploymentID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeploymentID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DeploymentID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DeploymentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DeploymentID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.HealthyAllocationIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.HealthyAllocationIDs, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"HealthyAllocationIDs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `HealthyAllocationIDs`) - } - r.WriteMapElemValue() - if x.HealthyAllocationIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.HealthyAllocationIDs, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.UnhealthyAllocationIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.UnhealthyAllocationIDs, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"UnhealthyAllocationIDs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `UnhealthyAllocationIDs`) - } - r.WriteMapElemValue() - if x.UnhealthyAllocationIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.UnhealthyAllocationIDs, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DeploymentAllocHealthRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *DeploymentAllocHealthRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "DeploymentID": - if r.TryDecodeAsNil() { - x.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - case "HealthyAllocationIDs": - if r.TryDecodeAsNil() { - x.HealthyAllocationIDs = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.HealthyAllocationIDs, d) - } - } - case "UnhealthyAllocationIDs": - if r.TryDecodeAsNil() { - x.UnhealthyAllocationIDs = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.UnhealthyAllocationIDs, d) - } - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DeploymentAllocHealthRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.HealthyAllocationIDs = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.HealthyAllocationIDs, d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.UnhealthyAllocationIDs = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.UnhealthyAllocationIDs, d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-1, "") - } - r.ReadArrayEnd() -} - -func (x *ApplyDeploymentAllocHealthRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(11) - } else { - r.WriteMapStart(11) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DeploymentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DeploymentID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeploymentID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DeploymentID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DeploymentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DeploymentID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.HealthyAllocationIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.HealthyAllocationIDs, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"HealthyAllocationIDs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `HealthyAllocationIDs`) - } - r.WriteMapElemValue() - if x.HealthyAllocationIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.HealthyAllocationIDs, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.UnhealthyAllocationIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.UnhealthyAllocationIDs, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"UnhealthyAllocationIDs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `UnhealthyAllocationIDs`) - } - r.WriteMapElemValue() - if x.UnhealthyAllocationIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.UnhealthyAllocationIDs, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.Timestamp) - } else if yyxt25 := z.Extension(z.I2Rtid(x.Timestamp)); yyxt25 != nil { - z.EncExtension(x.Timestamp, yyxt25) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.Timestamp) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.Timestamp) - } else { - z.EncFallback(x.Timestamp) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Timestamp\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Timestamp`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.Timestamp) - } else if yyxt26 := z.Extension(z.I2Rtid(x.Timestamp)); yyxt26 != nil { - z.EncExtension(x.Timestamp, yyxt26) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.Timestamp) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.Timestamp) - } else { - z.EncFallback(x.Timestamp) - } - } - var yyn27 bool - if x.DeploymentUpdate == nil { - yyn27 = true - goto LABEL27 - } - LABEL27: - if yyr2 || yy2arr2 { - if yyn27 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.DeploymentUpdate == nil { - r.EncodeNil() - } else { - x.DeploymentUpdate.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeploymentUpdate\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DeploymentUpdate`) - } - r.WriteMapElemValue() - if yyn27 { - r.EncodeNil() - } else { - if x.DeploymentUpdate == nil { - r.EncodeNil() - } else { - x.DeploymentUpdate.CodecEncodeSelf(e) - } - } - } - var yyn30 bool - if x.Job == nil { - yyn30 = true - goto LABEL30 - } - LABEL30: - if yyr2 || yy2arr2 { - if yyn30 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Job == nil { - r.EncodeNil() - } else { - x.Job.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Job\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Job`) - } - r.WriteMapElemValue() - if yyn30 { - r.EncodeNil() - } else { - if x.Job == nil { - r.EncodeNil() - } else { - x.Job.CodecEncodeSelf(e) - } - } - } - var yyn33 bool - if x.Eval == nil { - yyn33 = true - goto LABEL33 - } - LABEL33: - if yyr2 || yy2arr2 { - if yyn33 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Eval == nil { - r.EncodeNil() - } else { - x.Eval.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Eval\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Eval`) - } - r.WriteMapElemValue() - if yyn33 { - r.EncodeNil() - } else { - if x.Eval == nil { - r.EncodeNil() - } else { - x.Eval.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ApplyDeploymentAllocHealthRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ApplyDeploymentAllocHealthRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "DeploymentID": - if r.TryDecodeAsNil() { - x.DeploymentAllocHealthRequest.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - case "HealthyAllocationIDs": - if r.TryDecodeAsNil() { - x.DeploymentAllocHealthRequest.HealthyAllocationIDs = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.HealthyAllocationIDs, d) - } - } - case "UnhealthyAllocationIDs": - if r.TryDecodeAsNil() { - x.DeploymentAllocHealthRequest.UnhealthyAllocationIDs = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.UnhealthyAllocationIDs, d) - } - } - case "Region": - if r.TryDecodeAsNil() { - x.DeploymentAllocHealthRequest.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.DeploymentAllocHealthRequest.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.DeploymentAllocHealthRequest.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.DeploymentAllocHealthRequest.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - case "Timestamp": - if r.TryDecodeAsNil() { - x.Timestamp = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.Timestamp = r.DecodeTime() - } else if yyxt14 := z.Extension(z.I2Rtid(x.Timestamp)); yyxt14 != nil { - z.DecExtension(x.Timestamp, yyxt14) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.Timestamp) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.Timestamp) - } else { - z.DecFallback(&x.Timestamp, false) - } - } - case "DeploymentUpdate": - if r.TryDecodeAsNil() { - if true && x.DeploymentUpdate != nil { - x.DeploymentUpdate = nil - } - } else { - if x.DeploymentUpdate == nil { - x.DeploymentUpdate = new(DeploymentStatusUpdate) - } - - x.DeploymentUpdate.CodecDecodeSelf(d) - } - case "Job": - if r.TryDecodeAsNil() { - if true && x.Job != nil { - x.Job = nil - } - } else { - if x.Job == nil { - x.Job = new(Job) - } - - x.Job.CodecDecodeSelf(d) - } - case "Eval": - if r.TryDecodeAsNil() { - if true && x.Eval != nil { - x.Eval = nil - } - } else { - if x.Eval == nil { - x.Eval = new(Evaluation) - } - - x.Eval.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ApplyDeploymentAllocHealthRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj18 int - var yyb18 bool - var yyhl18 bool = l >= 0 - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentAllocHealthRequest.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentAllocHealthRequest.HealthyAllocationIDs = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.HealthyAllocationIDs, d) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentAllocHealthRequest.UnhealthyAllocationIDs = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.UnhealthyAllocationIDs, d) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentAllocHealthRequest.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentAllocHealthRequest.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentAllocHealthRequest.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentAllocHealthRequest.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Timestamp = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.Timestamp = r.DecodeTime() - } else if yyxt29 := z.Extension(z.I2Rtid(x.Timestamp)); yyxt29 != nil { - z.DecExtension(x.Timestamp, yyxt29) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.Timestamp) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.Timestamp) - } else { - z.DecFallback(&x.Timestamp, false) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.DeploymentUpdate != nil { - x.DeploymentUpdate = nil - } - } else { - if x.DeploymentUpdate == nil { - x.DeploymentUpdate = new(DeploymentStatusUpdate) - } - - x.DeploymentUpdate.CodecDecodeSelf(d) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Job != nil { - x.Job = nil - } - } else { - if x.Job == nil { - x.Job = new(Job) - } - - x.Job.CodecDecodeSelf(d) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Eval != nil { - x.Eval = nil - } - } else { - if x.Eval == nil { - x.Eval = new(Evaluation) - } - - x.Eval.CodecDecodeSelf(d) - } - for { - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj18-1, "") - } - r.ReadArrayEnd() -} - -func (x *DeploymentPromoteRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(7) - } else { - r.WriteMapStart(7) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DeploymentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DeploymentID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeploymentID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DeploymentID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DeploymentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DeploymentID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.All)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"All\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `All`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.All)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Groups == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Groups, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Groups\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Groups`) - } - r.WriteMapElemValue() - if x.Groups == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Groups, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DeploymentPromoteRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *DeploymentPromoteRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "DeploymentID": - if r.TryDecodeAsNil() { - x.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - case "All": - if r.TryDecodeAsNil() { - x.All = false - } else { - x.All = (bool)(r.DecodeBool()) - } - case "Groups": - if r.TryDecodeAsNil() { - x.Groups = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Groups, d) - } - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DeploymentPromoteRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.All = false - } else { - x.All = (bool)(r.DecodeBool()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Groups = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Groups, d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj12-1, "") - } - r.ReadArrayEnd() -} - -func (x *ApplyDeploymentPromoteRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(8) - } else { - r.WriteMapStart(8) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DeploymentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DeploymentID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeploymentID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DeploymentID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DeploymentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DeploymentID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.All)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"All\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `All`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.All)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Groups == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Groups, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Groups\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Groups`) - } - r.WriteMapElemValue() - if x.Groups == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Groups, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - var yyn24 bool - if x.Eval == nil { - yyn24 = true - goto LABEL24 - } - LABEL24: - if yyr2 || yy2arr2 { - if yyn24 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Eval == nil { - r.EncodeNil() - } else { - x.Eval.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Eval\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Eval`) - } - r.WriteMapElemValue() - if yyn24 { - r.EncodeNil() - } else { - if x.Eval == nil { - r.EncodeNil() - } else { - x.Eval.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ApplyDeploymentPromoteRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ApplyDeploymentPromoteRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "DeploymentID": - if r.TryDecodeAsNil() { - x.DeploymentPromoteRequest.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - case "All": - if r.TryDecodeAsNil() { - x.DeploymentPromoteRequest.All = false - } else { - x.All = (bool)(r.DecodeBool()) - } - case "Groups": - if r.TryDecodeAsNil() { - x.DeploymentPromoteRequest.Groups = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Groups, d) - } - } - case "Region": - if r.TryDecodeAsNil() { - x.DeploymentPromoteRequest.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.DeploymentPromoteRequest.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.DeploymentPromoteRequest.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.DeploymentPromoteRequest.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - case "Eval": - if r.TryDecodeAsNil() { - if true && x.Eval != nil { - x.Eval = nil - } - } else { - if x.Eval == nil { - x.Eval = new(Evaluation) - } - - x.Eval.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ApplyDeploymentPromoteRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentPromoteRequest.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentPromoteRequest.All = false - } else { - x.All = (bool)(r.DecodeBool()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentPromoteRequest.Groups = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Groups, d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentPromoteRequest.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentPromoteRequest.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentPromoteRequest.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentPromoteRequest.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Eval != nil { - x.Eval = nil - } - } else { - if x.Eval == nil { - x.Eval = new(Evaluation) - } - - x.Eval.CodecDecodeSelf(d) - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-1, "") - } - r.ReadArrayEnd() -} - -func (x *DeploymentPauseRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(6) - } else { - r.WriteMapStart(6) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DeploymentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DeploymentID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeploymentID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DeploymentID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DeploymentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DeploymentID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Pause)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Pause\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Pause`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Pause)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DeploymentPauseRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *DeploymentPauseRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "DeploymentID": - if r.TryDecodeAsNil() { - x.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - case "Pause": - if r.TryDecodeAsNil() { - x.Pause = false - } else { - x.Pause = (bool)(r.DecodeBool()) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DeploymentPauseRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Pause = false - } else { - x.Pause = (bool)(r.DecodeBool()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *DeploymentSpecificRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(9) - } else { - r.WriteMapStart(9) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DeploymentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DeploymentID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeploymentID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DeploymentID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DeploymentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DeploymentID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt16 != nil { - z.EncExtension(x.MaxQueryTime, yyxt16) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt17 != nil { - z.EncExtension(x.MaxQueryTime, yyxt17) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DeploymentSpecificRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *DeploymentSpecificRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "DeploymentID": - if r.TryDecodeAsNil() { - x.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt9 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt9 != nil { - z.DecExtension(x.MaxQueryTime, yyxt9) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DeploymentSpecificRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj14 int - var yyb14 bool - var yyhl14 bool = l >= 0 - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt20 != nil { - z.DecExtension(x.MaxQueryTime, yyxt20) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj14-1, "") - } - r.ReadArrayEnd() -} - -func (x *DeploymentFailRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DeploymentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DeploymentID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeploymentID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DeploymentID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DeploymentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DeploymentID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DeploymentFailRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *DeploymentFailRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "DeploymentID": - if r.TryDecodeAsNil() { - x.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DeploymentFailRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *SingleDeploymentResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - var yyn3 bool - if x.Deployment == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Deployment == nil { - r.EncodeNil() - } else { - x.Deployment.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Deployment\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Deployment`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Deployment == nil { - r.EncodeNil() - } else { - x.Deployment.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *SingleDeploymentResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *SingleDeploymentResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Deployment": - if r.TryDecodeAsNil() { - if true && x.Deployment != nil { - x.Deployment = nil - } - } else { - if x.Deployment == nil { - x.Deployment = new(Deployment) - } - - x.Deployment.CodecDecodeSelf(d) - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.LastContact)); yyxt7 != nil { - z.DecExtension(x.LastContact, yyxt7) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *SingleDeploymentResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Deployment != nil { - x.Deployment = nil - } - } else { - if x.Deployment == nil { - x.Deployment = new(Deployment) - } - - x.Deployment.CodecDecodeSelf(d) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.LastContact)); yyxt13 != nil { - z.DecExtension(x.LastContact, yyxt13) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *GenericResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *GenericResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *GenericResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Index": - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *GenericResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj5 int - var yyb5 bool - var yyhl5 bool = l >= 0 - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *VersionResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Build))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Build)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Build\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Build`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Build))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Build)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Versions == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntV(x.Versions, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Versions\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Versions`) - } - r.WriteMapElemValue() - if x.Versions == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntV(x.Versions, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.LastContact)); yyxt13 != nil { - z.EncExtension(x.LastContact, yyxt13) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.EncExtension(x.LastContact, yyxt14) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *VersionResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *VersionResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Build": - if r.TryDecodeAsNil() { - x.Build = "" - } else { - x.Build = (string)(r.DecodeString()) - } - case "Versions": - if r.TryDecodeAsNil() { - x.Versions = nil - } else { - if false { - } else { - z.F.DecMapStringIntX(&x.Versions, d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt9 := z.Extension(z.I2Rtid(x.LastContact)); yyxt9 != nil { - z.DecExtension(x.LastContact, yyxt9) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *VersionResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Build = "" - } else { - x.Build = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Versions = nil - } else { - if false { - } else { - z.F.DecMapStringIntX(&x.Versions, d) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.LastContact)); yyxt17 != nil { - z.DecExtension(x.LastContact, yyxt17) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj11-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobRegisterResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(7) - } else { - r.WriteMapStart(7) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.EvalCreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalCreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalCreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.EvalCreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.JobModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.JobModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Warnings))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Warnings)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Warnings\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Warnings`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Warnings))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Warnings)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt19 := z.Extension(z.I2Rtid(x.LastContact)); yyxt19 != nil { - z.EncExtension(x.LastContact, yyxt19) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.LastContact)); yyxt20 != nil { - z.EncExtension(x.LastContact, yyxt20) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobRegisterResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobRegisterResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "EvalID": - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - case "EvalCreateIndex": - if r.TryDecodeAsNil() { - x.EvalCreateIndex = 0 - } else { - x.EvalCreateIndex = (uint64)(r.DecodeUint64()) - } - case "JobModifyIndex": - if r.TryDecodeAsNil() { - x.JobModifyIndex = 0 - } else { - x.JobModifyIndex = (uint64)(r.DecodeUint64()) - } - case "Warnings": - if r.TryDecodeAsNil() { - x.Warnings = "" - } else { - x.Warnings = (string)(r.DecodeString()) - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.DecExtension(x.LastContact, yyxt10) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobRegisterResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalCreateIndex = 0 - } else { - x.EvalCreateIndex = (uint64)(r.DecodeUint64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobModifyIndex = 0 - } else { - x.JobModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Warnings = "" - } else { - x.Warnings = (string)(r.DecodeString()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt19 := z.Extension(z.I2Rtid(x.LastContact)); yyxt19 != nil { - z.DecExtension(x.LastContact, yyxt19) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj12-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobDeregisterResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(6) - } else { - r.WriteMapStart(6) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.EvalCreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalCreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalCreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.EvalCreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.JobModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.JobModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.EncExtension(x.LastContact, yyxt16) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.LastContact)); yyxt17 != nil { - z.EncExtension(x.LastContact, yyxt17) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobDeregisterResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobDeregisterResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "EvalID": - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - case "EvalCreateIndex": - if r.TryDecodeAsNil() { - x.EvalCreateIndex = 0 - } else { - x.EvalCreateIndex = (uint64)(r.DecodeUint64()) - } - case "JobModifyIndex": - if r.TryDecodeAsNil() { - x.JobModifyIndex = 0 - } else { - x.JobModifyIndex = (uint64)(r.DecodeUint64()) - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt9 := z.Extension(z.I2Rtid(x.LastContact)); yyxt9 != nil { - z.DecExtension(x.LastContact, yyxt9) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobDeregisterResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalCreateIndex = 0 - } else { - x.EvalCreateIndex = (uint64)(r.DecodeUint64()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobModifyIndex = 0 - } else { - x.JobModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.LastContact)); yyxt17 != nil { - z.DecExtension(x.LastContact, yyxt17) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj11-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobBatchDeregisterResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.JobEvals == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapNamespacedIDstring((map[NamespacedID]string)(x.JobEvals), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobEvals\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobEvals`) - } - r.WriteMapElemValue() - if x.JobEvals == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapNamespacedIDstring((map[NamespacedID]string)(x.JobEvals), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobBatchDeregisterResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobBatchDeregisterResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "JobEvals": - if r.TryDecodeAsNil() { - x.JobEvals = nil - } else { - if false { - } else { - h.decMapNamespacedIDstring((*map[NamespacedID]string)(&x.JobEvals), d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.LastContact)); yyxt8 != nil { - z.DecExtension(x.LastContact, yyxt8) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobBatchDeregisterResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobEvals = nil - } else { - if false { - } else { - h.decMapNamespacedIDstring((*map[NamespacedID]string)(&x.JobEvals), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.LastContact)); yyxt15 != nil { - z.DecExtension(x.LastContact, yyxt15) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobValidateResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.DriverConfigValidated)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DriverConfigValidated\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DriverConfigValidated`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.DriverConfigValidated)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.ValidationErrors == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.ValidationErrors, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ValidationErrors\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ValidationErrors`) - } - r.WriteMapElemValue() - if x.ValidationErrors == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.ValidationErrors, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Error))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Error)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Error\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Error`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Error))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Error)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Warnings))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Warnings)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Warnings\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Warnings`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Warnings))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Warnings)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobValidateResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobValidateResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "DriverConfigValidated": - if r.TryDecodeAsNil() { - x.DriverConfigValidated = false - } else { - x.DriverConfigValidated = (bool)(r.DecodeBool()) - } - case "ValidationErrors": - if r.TryDecodeAsNil() { - x.ValidationErrors = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.ValidationErrors, d) - } - } - case "Error": - if r.TryDecodeAsNil() { - x.Error = "" - } else { - x.Error = (string)(r.DecodeString()) - } - case "Warnings": - if r.TryDecodeAsNil() { - x.Warnings = "" - } else { - x.Warnings = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobValidateResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DriverConfigValidated = false - } else { - x.DriverConfigValidated = (bool)(r.DecodeBool()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ValidationErrors = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.ValidationErrors, d) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Error = "" - } else { - x.Error = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Warnings = "" - } else { - x.Warnings = (string)(r.DecodeString()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeUpdateResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(10) - } else { - r.WriteMapStart(10) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt4 := z.Extension(z.I2Rtid(x.HeartbeatTTL)); yyxt4 != nil { - z.EncExtension(x.HeartbeatTTL, yyxt4) - } else { - r.EncodeInt(int64(x.HeartbeatTTL)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"HeartbeatTTL\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `HeartbeatTTL`) - } - r.WriteMapElemValue() - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.HeartbeatTTL)); yyxt5 != nil { - z.EncExtension(x.HeartbeatTTL, yyxt5) - } else { - r.EncodeInt(int64(x.HeartbeatTTL)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.EvalIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.EvalIDs, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalIDs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalIDs`) - } - r.WriteMapElemValue() - if x.EvalIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.EvalIDs, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.EvalCreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalCreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalCreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.EvalCreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.NodeModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.NodeModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LeaderRPCAddr))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.LeaderRPCAddr)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LeaderRPCAddr\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LeaderRPCAddr`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LeaderRPCAddr))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.LeaderRPCAddr)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.NumNodes)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NumNodes\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NumNodes`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.NumNodes)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Servers == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNodeServerInfo(([]*NodeServerInfo)(x.Servers), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Servers\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Servers`) - } - r.WriteMapElemValue() - if x.Servers == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNodeServerInfo(([]*NodeServerInfo)(x.Servers), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt28 := z.Extension(z.I2Rtid(x.LastContact)); yyxt28 != nil { - z.EncExtension(x.LastContact, yyxt28) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt29 := z.Extension(z.I2Rtid(x.LastContact)); yyxt29 != nil { - z.EncExtension(x.LastContact, yyxt29) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeUpdateResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeUpdateResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "HeartbeatTTL": - if r.TryDecodeAsNil() { - x.HeartbeatTTL = 0 - } else { - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.HeartbeatTTL)); yyxt5 != nil { - z.DecExtension(x.HeartbeatTTL, yyxt5) - } else { - x.HeartbeatTTL = (time.Duration)(r.DecodeInt64()) - } - } - case "EvalIDs": - if r.TryDecodeAsNil() { - x.EvalIDs = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.EvalIDs, d) - } - } - case "EvalCreateIndex": - if r.TryDecodeAsNil() { - x.EvalCreateIndex = 0 - } else { - x.EvalCreateIndex = (uint64)(r.DecodeUint64()) - } - case "NodeModifyIndex": - if r.TryDecodeAsNil() { - x.NodeModifyIndex = 0 - } else { - x.NodeModifyIndex = (uint64)(r.DecodeUint64()) - } - case "LeaderRPCAddr": - if r.TryDecodeAsNil() { - x.LeaderRPCAddr = "" - } else { - x.LeaderRPCAddr = (string)(r.DecodeString()) - } - case "NumNodes": - if r.TryDecodeAsNil() { - x.NumNodes = 0 - } else { - x.NumNodes = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - case "Servers": - if r.TryDecodeAsNil() { - x.Servers = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeServerInfo((*[]*NodeServerInfo)(&x.Servers), d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.DecExtension(x.LastContact, yyxt16) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeUpdateResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj18 int - var yyb18 bool - var yyhl18 bool = l >= 0 - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.HeartbeatTTL = 0 - } else { - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.HeartbeatTTL)); yyxt20 != nil { - z.DecExtension(x.HeartbeatTTL, yyxt20) - } else { - x.HeartbeatTTL = (time.Duration)(r.DecodeInt64()) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalIDs = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.EvalIDs, d) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalCreateIndex = 0 - } else { - x.EvalCreateIndex = (uint64)(r.DecodeUint64()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeModifyIndex = 0 - } else { - x.NodeModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LeaderRPCAddr = "" - } else { - x.LeaderRPCAddr = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NumNodes = 0 - } else { - x.NumNodes = (int32)(z.C.IntV(r.DecodeInt64(), 32)) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Servers = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeServerInfo((*[]*NodeServerInfo)(&x.Servers), d) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt31 := z.Extension(z.I2Rtid(x.LastContact)); yyxt31 != nil { - z.DecExtension(x.LastContact, yyxt31) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj18-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeDrainUpdateResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.NodeModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.NodeModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.EvalIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.EvalIDs, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalIDs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalIDs`) - } - r.WriteMapElemValue() - if x.EvalIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.EvalIDs, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.EvalCreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalCreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalCreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.EvalCreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeDrainUpdateResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeDrainUpdateResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "NodeModifyIndex": - if r.TryDecodeAsNil() { - x.NodeModifyIndex = 0 - } else { - x.NodeModifyIndex = (uint64)(r.DecodeUint64()) - } - case "EvalIDs": - if r.TryDecodeAsNil() { - x.EvalIDs = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.EvalIDs, d) - } - } - case "EvalCreateIndex": - if r.TryDecodeAsNil() { - x.EvalCreateIndex = 0 - } else { - x.EvalCreateIndex = (uint64)(r.DecodeUint64()) - } - case "Index": - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeDrainUpdateResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeModifyIndex = 0 - } else { - x.NodeModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalIDs = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.EvalIDs, d) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalCreateIndex = 0 - } else { - x.EvalCreateIndex = (uint64)(r.DecodeUint64()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeEligibilityUpdateResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.NodeModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.NodeModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.EvalIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.EvalIDs, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalIDs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalIDs`) - } - r.WriteMapElemValue() - if x.EvalIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.EvalIDs, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.EvalCreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalCreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalCreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.EvalCreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeEligibilityUpdateResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeEligibilityUpdateResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "NodeModifyIndex": - if r.TryDecodeAsNil() { - x.NodeModifyIndex = 0 - } else { - x.NodeModifyIndex = (uint64)(r.DecodeUint64()) - } - case "EvalIDs": - if r.TryDecodeAsNil() { - x.EvalIDs = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.EvalIDs, d) - } - } - case "EvalCreateIndex": - if r.TryDecodeAsNil() { - x.EvalCreateIndex = 0 - } else { - x.EvalCreateIndex = (uint64)(r.DecodeUint64()) - } - case "Index": - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeEligibilityUpdateResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeModifyIndex = 0 - } else { - x.NodeModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalIDs = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.EvalIDs, d) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalCreateIndex = 0 - } else { - x.EvalCreateIndex = (uint64)(r.DecodeUint64()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeAllocsResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Allocs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocation(([]*Allocation)(x.Allocs), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Allocs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Allocs`) - } - r.WriteMapElemValue() - if x.Allocs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocation(([]*Allocation)(x.Allocs), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeAllocsResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeAllocsResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Allocs": - if r.TryDecodeAsNil() { - x.Allocs = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocation((*[]*Allocation)(&x.Allocs), d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.LastContact)); yyxt8 != nil { - z.DecExtension(x.LastContact, yyxt8) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeAllocsResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Allocs = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocation((*[]*Allocation)(&x.Allocs), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.LastContact)); yyxt15 != nil { - z.DecExtension(x.LastContact, yyxt15) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeClientAllocsResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Allocs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringUint64V(x.Allocs, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Allocs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Allocs`) - } - r.WriteMapElemValue() - if x.Allocs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringUint64V(x.Allocs, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.MigrateTokens == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.MigrateTokens, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MigrateTokens\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MigrateTokens`) - } - r.WriteMapElemValue() - if x.MigrateTokens == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.MigrateTokens, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.LastContact)); yyxt13 != nil { - z.EncExtension(x.LastContact, yyxt13) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.EncExtension(x.LastContact, yyxt14) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeClientAllocsResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeClientAllocsResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Allocs": - if r.TryDecodeAsNil() { - x.Allocs = nil - } else { - if false { - } else { - z.F.DecMapStringUint64X(&x.Allocs, d) - } - } - case "MigrateTokens": - if r.TryDecodeAsNil() { - x.MigrateTokens = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.MigrateTokens, d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.DecExtension(x.LastContact, yyxt10) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeClientAllocsResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Allocs = nil - } else { - if false { - } else { - z.F.DecMapStringUint64X(&x.Allocs, d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MigrateTokens = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.MigrateTokens, d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt19 := z.Extension(z.I2Rtid(x.LastContact)); yyxt19 != nil { - z.DecExtension(x.LastContact, yyxt19) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj12-1, "") - } - r.ReadArrayEnd() -} - -func (x *SingleNodeResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - var yyn3 bool - if x.Node == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Node == nil { - r.EncodeNil() - } else { - x.Node.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Node\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Node`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Node == nil { - r.EncodeNil() - } else { - x.Node.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *SingleNodeResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *SingleNodeResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Node": - if r.TryDecodeAsNil() { - if true && x.Node != nil { - x.Node = nil - } - } else { - if x.Node == nil { - x.Node = new(Node) - } - - x.Node.CodecDecodeSelf(d) - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.LastContact)); yyxt7 != nil { - z.DecExtension(x.LastContact, yyxt7) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *SingleNodeResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Node != nil { - x.Node = nil - } - } else { - if x.Node == nil { - x.Node = new(Node) - } - - x.Node.CodecDecodeSelf(d) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.LastContact)); yyxt13 != nil { - z.DecExtension(x.LastContact, yyxt13) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeListResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Nodes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNodeListStub(([]*NodeListStub)(x.Nodes), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Nodes\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Nodes`) - } - r.WriteMapElemValue() - if x.Nodes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNodeListStub(([]*NodeListStub)(x.Nodes), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeListResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeListResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Nodes": - if r.TryDecodeAsNil() { - x.Nodes = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeListStub((*[]*NodeListStub)(&x.Nodes), d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.LastContact)); yyxt8 != nil { - z.DecExtension(x.LastContact, yyxt8) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeListResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Nodes = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeListStub((*[]*NodeListStub)(&x.Nodes), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.LastContact)); yyxt15 != nil { - z.DecExtension(x.LastContact, yyxt15) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *SingleJobResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - var yyn3 bool - if x.Job == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Job == nil { - r.EncodeNil() - } else { - x.Job.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Job\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Job`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Job == nil { - r.EncodeNil() - } else { - x.Job.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *SingleJobResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *SingleJobResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Job": - if r.TryDecodeAsNil() { - if true && x.Job != nil { - x.Job = nil - } - } else { - if x.Job == nil { - x.Job = new(Job) - } - - x.Job.CodecDecodeSelf(d) - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.LastContact)); yyxt7 != nil { - z.DecExtension(x.LastContact, yyxt7) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *SingleJobResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Job != nil { - x.Job = nil - } - } else { - if x.Job == nil { - x.Job = new(Job) - } - - x.Job.CodecDecodeSelf(d) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.LastContact)); yyxt13 != nil { - z.DecExtension(x.LastContact, yyxt13) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobSummaryResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - var yyn3 bool - if x.JobSummary == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.JobSummary == nil { - r.EncodeNil() - } else { - x.JobSummary.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobSummary\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobSummary`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.JobSummary == nil { - r.EncodeNil() - } else { - x.JobSummary.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobSummaryResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobSummaryResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "JobSummary": - if r.TryDecodeAsNil() { - if true && x.JobSummary != nil { - x.JobSummary = nil - } - } else { - if x.JobSummary == nil { - x.JobSummary = new(JobSummary) - } - - x.JobSummary.CodecDecodeSelf(d) - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.LastContact)); yyxt7 != nil { - z.DecExtension(x.LastContact, yyxt7) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobSummaryResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.JobSummary != nil { - x.JobSummary = nil - } - } else { - if x.JobSummary == nil { - x.JobSummary = new(JobSummary) - } - - x.JobSummary.CodecDecodeSelf(d) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.LastContact)); yyxt13 != nil { - z.DecExtension(x.LastContact, yyxt13) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobDispatchResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DispatchedJobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DispatchedJobID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DispatchedJobID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DispatchedJobID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DispatchedJobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DispatchedJobID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.EvalCreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalCreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalCreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.EvalCreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.JobCreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobCreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobCreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.JobCreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobDispatchResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobDispatchResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "DispatchedJobID": - if r.TryDecodeAsNil() { - x.DispatchedJobID = "" - } else { - x.DispatchedJobID = (string)(r.DecodeString()) - } - case "EvalID": - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - case "EvalCreateIndex": - if r.TryDecodeAsNil() { - x.EvalCreateIndex = 0 - } else { - x.EvalCreateIndex = (uint64)(r.DecodeUint64()) - } - case "JobCreateIndex": - if r.TryDecodeAsNil() { - x.JobCreateIndex = 0 - } else { - x.JobCreateIndex = (uint64)(r.DecodeUint64()) - } - case "Index": - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobDispatchResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DispatchedJobID = "" - } else { - x.DispatchedJobID = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalCreateIndex = 0 - } else { - x.EvalCreateIndex = (uint64)(r.DecodeUint64()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobCreateIndex = 0 - } else { - x.JobCreateIndex = (uint64)(r.DecodeUint64()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobListResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Jobs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoJobListStub(([]*JobListStub)(x.Jobs), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Jobs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Jobs`) - } - r.WriteMapElemValue() - if x.Jobs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoJobListStub(([]*JobListStub)(x.Jobs), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobListResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobListResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Jobs": - if r.TryDecodeAsNil() { - x.Jobs = nil - } else { - if false { - } else { - h.decSlicePtrtoJobListStub((*[]*JobListStub)(&x.Jobs), d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.LastContact)); yyxt8 != nil { - z.DecExtension(x.LastContact, yyxt8) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobListResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Jobs = nil - } else { - if false { - } else { - h.decSlicePtrtoJobListStub((*[]*JobListStub)(&x.Jobs), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.LastContact)); yyxt15 != nil { - z.DecExtension(x.LastContact, yyxt15) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobVersionsRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(10) - } else { - r.WriteMapStart(10) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Diffs)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Diffs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Diffs`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Diffs)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt19 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt19 != nil { - z.EncExtension(x.MaxQueryTime, yyxt19) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt20 != nil { - z.EncExtension(x.MaxQueryTime, yyxt20) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobVersionsRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobVersionsRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "JobID": - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - case "Diffs": - if r.TryDecodeAsNil() { - x.Diffs = false - } else { - x.Diffs = (bool)(r.DecodeBool()) - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt10 != nil { - z.DecExtension(x.MaxQueryTime, yyxt10) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobVersionsRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj15 int - var yyb15 bool - var yyhl15 bool = l >= 0 - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Diffs = false - } else { - x.Diffs = (bool)(r.DecodeBool()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt22 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt22 != nil { - z.DecExtension(x.MaxQueryTime, yyxt22) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj15-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobVersionsResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Versions == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoJob(([]*Job)(x.Versions), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Versions\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Versions`) - } - r.WriteMapElemValue() - if x.Versions == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoJob(([]*Job)(x.Versions), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Diffs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoJobDiff(([]*JobDiff)(x.Diffs), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Diffs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Diffs`) - } - r.WriteMapElemValue() - if x.Diffs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoJobDiff(([]*JobDiff)(x.Diffs), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.LastContact)); yyxt13 != nil { - z.EncExtension(x.LastContact, yyxt13) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.EncExtension(x.LastContact, yyxt14) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobVersionsResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobVersionsResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Versions": - if r.TryDecodeAsNil() { - x.Versions = nil - } else { - if false { - } else { - h.decSlicePtrtoJob((*[]*Job)(&x.Versions), d) - } - } - case "Diffs": - if r.TryDecodeAsNil() { - x.Diffs = nil - } else { - if false { - } else { - h.decSlicePtrtoJobDiff((*[]*JobDiff)(&x.Diffs), d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.DecExtension(x.LastContact, yyxt10) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobVersionsResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Versions = nil - } else { - if false { - } else { - h.decSlicePtrtoJob((*[]*Job)(&x.Versions), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Diffs = nil - } else { - if false { - } else { - h.decSlicePtrtoJobDiff((*[]*JobDiff)(&x.Diffs), d) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt19 := z.Extension(z.I2Rtid(x.LastContact)); yyxt19 != nil { - z.DecExtension(x.LastContact, yyxt19) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj12-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobPlanResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(8) - } else { - r.WriteMapStart(8) - } - var yyn3 bool - if x.Annotations == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Annotations == nil { - r.EncodeNil() - } else { - x.Annotations.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Annotations\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Annotations`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Annotations == nil { - r.EncodeNil() - } else { - x.Annotations.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.FailedTGAllocs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoAllocMetric((map[string]*AllocMetric)(x.FailedTGAllocs), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"FailedTGAllocs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `FailedTGAllocs`) - } - r.WriteMapElemValue() - if x.FailedTGAllocs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoAllocMetric((map[string]*AllocMetric)(x.FailedTGAllocs), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.JobModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.JobModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.CreatedEvals == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoEvaluation(([]*Evaluation)(x.CreatedEvals), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreatedEvals\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreatedEvals`) - } - r.WriteMapElemValue() - if x.CreatedEvals == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoEvaluation(([]*Evaluation)(x.CreatedEvals), e) - } - } - } - var yyn15 bool - if x.Diff == nil { - yyn15 = true - goto LABEL15 - } - LABEL15: - if yyr2 || yy2arr2 { - if yyn15 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Diff == nil { - r.EncodeNil() - } else { - x.Diff.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Diff\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Diff`) - } - r.WriteMapElemValue() - if yyn15 { - r.EncodeNil() - } else { - if x.Diff == nil { - r.EncodeNil() - } else { - x.Diff.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.NextPeriodicLaunch) - } else if yyxt19 := z.Extension(z.I2Rtid(x.NextPeriodicLaunch)); yyxt19 != nil { - z.EncExtension(x.NextPeriodicLaunch, yyxt19) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.NextPeriodicLaunch) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.NextPeriodicLaunch) - } else { - z.EncFallback(x.NextPeriodicLaunch) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextPeriodicLaunch\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextPeriodicLaunch`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.NextPeriodicLaunch) - } else if yyxt20 := z.Extension(z.I2Rtid(x.NextPeriodicLaunch)); yyxt20 != nil { - z.EncExtension(x.NextPeriodicLaunch, yyxt20) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.NextPeriodicLaunch) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.NextPeriodicLaunch) - } else { - z.EncFallback(x.NextPeriodicLaunch) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Warnings))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Warnings)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Warnings\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Warnings`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Warnings))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Warnings)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobPlanResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobPlanResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Annotations": - if r.TryDecodeAsNil() { - if true && x.Annotations != nil { - x.Annotations = nil - } - } else { - if x.Annotations == nil { - x.Annotations = new(PlanAnnotations) - } - - x.Annotations.CodecDecodeSelf(d) - } - case "FailedTGAllocs": - if r.TryDecodeAsNil() { - x.FailedTGAllocs = nil - } else { - if false { - } else { - h.decMapstringPtrtoAllocMetric((*map[string]*AllocMetric)(&x.FailedTGAllocs), d) - } - } - case "JobModifyIndex": - if r.TryDecodeAsNil() { - x.JobModifyIndex = 0 - } else { - x.JobModifyIndex = (uint64)(r.DecodeUint64()) - } - case "CreatedEvals": - if r.TryDecodeAsNil() { - x.CreatedEvals = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluation((*[]*Evaluation)(&x.CreatedEvals), d) - } - } - case "Diff": - if r.TryDecodeAsNil() { - if true && x.Diff != nil { - x.Diff = nil - } - } else { - if x.Diff == nil { - x.Diff = new(JobDiff) - } - - x.Diff.CodecDecodeSelf(d) - } - case "NextPeriodicLaunch": - if r.TryDecodeAsNil() { - x.NextPeriodicLaunch = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.NextPeriodicLaunch = r.DecodeTime() - } else if yyxt12 := z.Extension(z.I2Rtid(x.NextPeriodicLaunch)); yyxt12 != nil { - z.DecExtension(x.NextPeriodicLaunch, yyxt12) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.NextPeriodicLaunch) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.NextPeriodicLaunch) - } else { - z.DecFallback(&x.NextPeriodicLaunch, false) - } - } - case "Warnings": - if r.TryDecodeAsNil() { - x.Warnings = "" - } else { - x.Warnings = (string)(r.DecodeString()) - } - case "Index": - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobPlanResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj15 int - var yyb15 bool - var yyhl15 bool = l >= 0 - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Annotations != nil { - x.Annotations = nil - } - } else { - if x.Annotations == nil { - x.Annotations = new(PlanAnnotations) - } - - x.Annotations.CodecDecodeSelf(d) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.FailedTGAllocs = nil - } else { - if false { - } else { - h.decMapstringPtrtoAllocMetric((*map[string]*AllocMetric)(&x.FailedTGAllocs), d) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobModifyIndex = 0 - } else { - x.JobModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreatedEvals = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluation((*[]*Evaluation)(&x.CreatedEvals), d) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Diff != nil { - x.Diff = nil - } - } else { - if x.Diff == nil { - x.Diff = new(JobDiff) - } - - x.Diff.CodecDecodeSelf(d) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NextPeriodicLaunch = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.NextPeriodicLaunch = r.DecodeTime() - } else if yyxt24 := z.Extension(z.I2Rtid(x.NextPeriodicLaunch)); yyxt24 != nil { - z.DecExtension(x.NextPeriodicLaunch, yyxt24) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.NextPeriodicLaunch) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.NextPeriodicLaunch) - } else { - z.DecFallback(&x.NextPeriodicLaunch, false) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Warnings = "" - } else { - x.Warnings = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - for { - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj15-1, "") - } - r.ReadArrayEnd() -} - -func (x *SingleAllocResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - var yyn3 bool - if x.Alloc == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Alloc == nil { - r.EncodeNil() - } else { - x.Alloc.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Alloc\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Alloc`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Alloc == nil { - r.EncodeNil() - } else { - x.Alloc.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *SingleAllocResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *SingleAllocResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Alloc": - if r.TryDecodeAsNil() { - if true && x.Alloc != nil { - x.Alloc = nil - } - } else { - if x.Alloc == nil { - x.Alloc = new(Allocation) - } - - x.Alloc.CodecDecodeSelf(d) - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.LastContact)); yyxt7 != nil { - z.DecExtension(x.LastContact, yyxt7) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *SingleAllocResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Alloc != nil { - x.Alloc = nil - } - } else { - if x.Alloc == nil { - x.Alloc = new(Allocation) - } - - x.Alloc.CodecDecodeSelf(d) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.LastContact)); yyxt13 != nil { - z.DecExtension(x.LastContact, yyxt13) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocsGetResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Allocs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocation(([]*Allocation)(x.Allocs), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Allocs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Allocs`) - } - r.WriteMapElemValue() - if x.Allocs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocation(([]*Allocation)(x.Allocs), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocsGetResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *AllocsGetResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Allocs": - if r.TryDecodeAsNil() { - x.Allocs = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocation((*[]*Allocation)(&x.Allocs), d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.LastContact)); yyxt8 != nil { - z.DecExtension(x.LastContact, yyxt8) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocsGetResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Allocs = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocation((*[]*Allocation)(&x.Allocs), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.LastContact)); yyxt15 != nil { - z.DecExtension(x.LastContact, yyxt15) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobAllocationsResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Allocations == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocListStub(([]*AllocListStub)(x.Allocations), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Allocations\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Allocations`) - } - r.WriteMapElemValue() - if x.Allocations == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocListStub(([]*AllocListStub)(x.Allocations), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobAllocationsResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobAllocationsResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Allocations": - if r.TryDecodeAsNil() { - x.Allocations = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocListStub((*[]*AllocListStub)(&x.Allocations), d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.LastContact)); yyxt8 != nil { - z.DecExtension(x.LastContact, yyxt8) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobAllocationsResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Allocations = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocListStub((*[]*AllocListStub)(&x.Allocations), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.LastContact)); yyxt15 != nil { - z.DecExtension(x.LastContact, yyxt15) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobEvaluationsResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Evaluations == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoEvaluation(([]*Evaluation)(x.Evaluations), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Evaluations\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Evaluations`) - } - r.WriteMapElemValue() - if x.Evaluations == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoEvaluation(([]*Evaluation)(x.Evaluations), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobEvaluationsResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobEvaluationsResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Evaluations": - if r.TryDecodeAsNil() { - x.Evaluations = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluation((*[]*Evaluation)(&x.Evaluations), d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.LastContact)); yyxt8 != nil { - z.DecExtension(x.LastContact, yyxt8) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobEvaluationsResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Evaluations = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluation((*[]*Evaluation)(&x.Evaluations), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.LastContact)); yyxt15 != nil { - z.DecExtension(x.LastContact, yyxt15) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *SingleEvalResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - var yyn3 bool - if x.Eval == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Eval == nil { - r.EncodeNil() - } else { - x.Eval.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Eval\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Eval`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Eval == nil { - r.EncodeNil() - } else { - x.Eval.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *SingleEvalResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *SingleEvalResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Eval": - if r.TryDecodeAsNil() { - if true && x.Eval != nil { - x.Eval = nil - } - } else { - if x.Eval == nil { - x.Eval = new(Evaluation) - } - - x.Eval.CodecDecodeSelf(d) - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.LastContact)); yyxt7 != nil { - z.DecExtension(x.LastContact, yyxt7) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *SingleEvalResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Eval != nil { - x.Eval = nil - } - } else { - if x.Eval == nil { - x.Eval = new(Evaluation) - } - - x.Eval.CodecDecodeSelf(d) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.LastContact)); yyxt13 != nil { - z.DecExtension(x.LastContact, yyxt13) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *EvalDequeueResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(6) - } else { - r.WriteMapStart(6) - } - var yyn3 bool - if x.Eval == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Eval == nil { - r.EncodeNil() - } else { - x.Eval.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Eval\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Eval`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Eval == nil { - r.EncodeNil() - } else { - x.Eval.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Token))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Token)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Token\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Token`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Token))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Token)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.WaitIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"WaitIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `WaitIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.WaitIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.LastContact)); yyxt16 != nil { - z.EncExtension(x.LastContact, yyxt16) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.LastContact)); yyxt17 != nil { - z.EncExtension(x.LastContact, yyxt17) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *EvalDequeueResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *EvalDequeueResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Eval": - if r.TryDecodeAsNil() { - if true && x.Eval != nil { - x.Eval = nil - } - } else { - if x.Eval == nil { - x.Eval = new(Evaluation) - } - - x.Eval.CodecDecodeSelf(d) - } - case "Token": - if r.TryDecodeAsNil() { - x.Token = "" - } else { - x.Token = (string)(r.DecodeString()) - } - case "WaitIndex": - if r.TryDecodeAsNil() { - x.WaitIndex = 0 - } else { - x.WaitIndex = (uint64)(r.DecodeUint64()) - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt9 := z.Extension(z.I2Rtid(x.LastContact)); yyxt9 != nil { - z.DecExtension(x.LastContact, yyxt9) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *EvalDequeueResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Eval != nil { - x.Eval = nil - } - } else { - if x.Eval == nil { - x.Eval = new(Evaluation) - } - - x.Eval.CodecDecodeSelf(d) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Token = "" - } else { - x.Token = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WaitIndex = 0 - } else { - x.WaitIndex = (uint64)(r.DecodeUint64()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.LastContact)); yyxt17 != nil { - z.DecExtension(x.LastContact, yyxt17) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj11-1, "") - } - r.ReadArrayEnd() -} - -func (x *PlanResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(2) - } else { - r.WriteMapStart(2) - } - var yyn3 bool - if x.Result == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Result == nil { - r.EncodeNil() - } else { - x.Result.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Result\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Result`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Result == nil { - r.EncodeNil() - } else { - x.Result.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *PlanResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *PlanResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Result": - if r.TryDecodeAsNil() { - if true && x.Result != nil { - x.Result = nil - } - } else { - if x.Result == nil { - x.Result = new(PlanResult) - } - - x.Result.CodecDecodeSelf(d) - } - case "Index": - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *PlanResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Result != nil { - x.Result = nil - } - } else { - if x.Result == nil { - x.Result = new(PlanResult) - } - - x.Result.CodecDecodeSelf(d) - } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj6-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocListResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Allocations == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocListStub(([]*AllocListStub)(x.Allocations), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Allocations\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Allocations`) - } - r.WriteMapElemValue() - if x.Allocations == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocListStub(([]*AllocListStub)(x.Allocations), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocListResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *AllocListResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Allocations": - if r.TryDecodeAsNil() { - x.Allocations = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocListStub((*[]*AllocListStub)(&x.Allocations), d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.LastContact)); yyxt8 != nil { - z.DecExtension(x.LastContact, yyxt8) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocListResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Allocations = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocListStub((*[]*AllocListStub)(&x.Allocations), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.LastContact)); yyxt15 != nil { - z.DecExtension(x.LastContact, yyxt15) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *DeploymentListResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Deployments == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoDeployment(([]*Deployment)(x.Deployments), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Deployments\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Deployments`) - } - r.WriteMapElemValue() - if x.Deployments == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoDeployment(([]*Deployment)(x.Deployments), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DeploymentListResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *DeploymentListResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Deployments": - if r.TryDecodeAsNil() { - x.Deployments = nil - } else { - if false { - } else { - h.decSlicePtrtoDeployment((*[]*Deployment)(&x.Deployments), d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.LastContact)); yyxt8 != nil { - z.DecExtension(x.LastContact, yyxt8) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DeploymentListResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Deployments = nil - } else { - if false { - } else { - h.decSlicePtrtoDeployment((*[]*Deployment)(&x.Deployments), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.LastContact)); yyxt15 != nil { - z.DecExtension(x.LastContact, yyxt15) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *EvalListResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Evaluations == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoEvaluation(([]*Evaluation)(x.Evaluations), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Evaluations\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Evaluations`) - } - r.WriteMapElemValue() - if x.Evaluations == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoEvaluation(([]*Evaluation)(x.Evaluations), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *EvalListResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *EvalListResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Evaluations": - if r.TryDecodeAsNil() { - x.Evaluations = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluation((*[]*Evaluation)(&x.Evaluations), d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.LastContact)); yyxt8 != nil { - z.DecExtension(x.LastContact, yyxt8) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *EvalListResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Evaluations = nil - } else { - if false { - } else { - h.decSlicePtrtoEvaluation((*[]*Evaluation)(&x.Evaluations), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.LastContact)); yyxt15 != nil { - z.DecExtension(x.LastContact, yyxt15) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *EvalAllocationsResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Allocations == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocListStub(([]*AllocListStub)(x.Allocations), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Allocations\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Allocations`) - } - r.WriteMapElemValue() - if x.Allocations == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocListStub(([]*AllocListStub)(x.Allocations), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *EvalAllocationsResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *EvalAllocationsResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Allocations": - if r.TryDecodeAsNil() { - x.Allocations = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocListStub((*[]*AllocListStub)(&x.Allocations), d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.LastContact)); yyxt8 != nil { - z.DecExtension(x.LastContact, yyxt8) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *EvalAllocationsResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Allocations = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocListStub((*[]*AllocListStub)(&x.Allocations), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.LastContact)); yyxt15 != nil { - z.DecExtension(x.LastContact, yyxt15) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *PeriodicForceResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(3) - } else { - r.WriteMapStart(3) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.EvalCreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalCreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalCreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.EvalCreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *PeriodicForceResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *PeriodicForceResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "EvalID": - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - case "EvalCreateIndex": - if r.TryDecodeAsNil() { - x.EvalCreateIndex = 0 - } else { - x.EvalCreateIndex = (uint64)(r.DecodeUint64()) - } - case "Index": - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *PeriodicForceResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj7 int - var yyb7 bool - var yyhl7 bool = l >= 0 - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalCreateIndex = 0 - } else { - x.EvalCreateIndex = (uint64)(r.DecodeUint64()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - for { - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj7-1, "") - } - r.ReadArrayEnd() -} - -func (x *DeploymentUpdateResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.EvalCreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalCreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalCreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.EvalCreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.DeploymentModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeploymentModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DeploymentModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.DeploymentModifyIndex)) - } - } - var yyn12 bool - if x.RevertedJobVersion == nil { - yyn12 = true - goto LABEL12 - } - LABEL12: - if yyr2 || yy2arr2 { - if yyn12 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.RevertedJobVersion == nil { - r.EncodeNil() - } else { - yy13 := *x.RevertedJobVersion - if false { - } else { - r.EncodeUint(uint64(yy13)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RevertedJobVersion\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RevertedJobVersion`) - } - r.WriteMapElemValue() - if yyn12 { - r.EncodeNil() - } else { - if x.RevertedJobVersion == nil { - r.EncodeNil() - } else { - yy15 := *x.RevertedJobVersion - if false { - } else { - r.EncodeUint(uint64(yy15)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DeploymentUpdateResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *DeploymentUpdateResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "EvalID": - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - case "EvalCreateIndex": - if r.TryDecodeAsNil() { - x.EvalCreateIndex = 0 - } else { - x.EvalCreateIndex = (uint64)(r.DecodeUint64()) - } - case "DeploymentModifyIndex": - if r.TryDecodeAsNil() { - x.DeploymentModifyIndex = 0 - } else { - x.DeploymentModifyIndex = (uint64)(r.DecodeUint64()) - } - case "RevertedJobVersion": - if r.TryDecodeAsNil() { - if true && x.RevertedJobVersion != nil { - x.RevertedJobVersion = nil - } - } else { - if x.RevertedJobVersion == nil { - x.RevertedJobVersion = new(uint64) - } - - if false { - } else { - *x.RevertedJobVersion = (uint64)(r.DecodeUint64()) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DeploymentUpdateResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalCreateIndex = 0 - } else { - x.EvalCreateIndex = (uint64)(r.DecodeUint64()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentModifyIndex = 0 - } else { - x.DeploymentModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.RevertedJobVersion != nil { - x.RevertedJobVersion = nil - } - } else { - if x.RevertedJobVersion == nil { - x.RevertedJobVersion = new(uint64) - } - - if false { - } else { - *x.RevertedJobVersion = (uint64)(r.DecodeUint64()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeConnQueryResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Connected)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Connected\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Connected`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Connected)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.Established) - } else if yyxt7 := z.Extension(z.I2Rtid(x.Established)); yyxt7 != nil { - z.EncExtension(x.Established, yyxt7) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.Established) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.Established) - } else { - z.EncFallback(x.Established) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Established\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Established`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.Established) - } else if yyxt8 := z.Extension(z.I2Rtid(x.Established)); yyxt8 != nil { - z.EncExtension(x.Established, yyxt8) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.Established) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.Established) - } else { - z.EncFallback(x.Established) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.LastContact)); yyxt13 != nil { - z.EncExtension(x.LastContact, yyxt13) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.LastContact)); yyxt14 != nil { - z.EncExtension(x.LastContact, yyxt14) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeConnQueryResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeConnQueryResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Connected": - if r.TryDecodeAsNil() { - x.Connected = false - } else { - x.Connected = (bool)(r.DecodeBool()) - } - case "Established": - if r.TryDecodeAsNil() { - x.Established = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.Established = r.DecodeTime() - } else if yyxt6 := z.Extension(z.I2Rtid(x.Established)); yyxt6 != nil { - z.DecExtension(x.Established, yyxt6) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.Established) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.Established) - } else { - z.DecFallback(&x.Established, false) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt9 := z.Extension(z.I2Rtid(x.LastContact)); yyxt9 != nil { - z.DecExtension(x.LastContact, yyxt9) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeConnQueryResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Connected = false - } else { - x.Connected = (bool)(r.DecodeBool()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Established = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.Established = r.DecodeTime() - } else if yyxt14 := z.Extension(z.I2Rtid(x.Established)); yyxt14 != nil { - z.DecExtension(x.Established, yyxt14) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.Established) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.Established) - } else { - z.DecFallback(&x.Established, false) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.LastContact)); yyxt17 != nil { - z.DecExtension(x.LastContact, yyxt17) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj11-1, "") - } - r.ReadArrayEnd() -} - -func (x *EmitNodeEventsRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.NodeEvents == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringSlicePtrtoNodeEvent((map[string][]*NodeEvent)(x.NodeEvents), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeEvents\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeEvents`) - } - r.WriteMapElemValue() - if x.NodeEvents == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringSlicePtrtoNodeEvent((map[string][]*NodeEvent)(x.NodeEvents), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *EmitNodeEventsRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *EmitNodeEventsRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "NodeEvents": - if r.TryDecodeAsNil() { - x.NodeEvents = nil - } else { - if false { - } else { - h.decMapstringSlicePtrtoNodeEvent((*map[string][]*NodeEvent)(&x.NodeEvents), d) - } - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *EmitNodeEventsRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeEvents = nil - } else { - if false { - } else { - h.decMapstringSlicePtrtoNodeEvent((*map[string][]*NodeEvent)(&x.NodeEvents), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *EmitNodeEventsResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *EmitNodeEventsResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *EmitNodeEventsResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Index": - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *EmitNodeEventsResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj5 int - var yyb5 bool - var yyhl5 bool = l >= 0 - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeEvent) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Message))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Message)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Message\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Message`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Message))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Message)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Subsystem))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Subsystem)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Subsystem\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Subsystem`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Subsystem))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Subsystem)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Details == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Details, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Details\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Details`) - } - r.WriteMapElemValue() - if x.Details == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Details, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.Timestamp) - } else if yyxt13 := z.Extension(z.I2Rtid(x.Timestamp)); yyxt13 != nil { - z.EncExtension(x.Timestamp, yyxt13) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.Timestamp) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.Timestamp) - } else { - z.EncFallback(x.Timestamp) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Timestamp\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Timestamp`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.Timestamp) - } else if yyxt14 := z.Extension(z.I2Rtid(x.Timestamp)); yyxt14 != nil { - z.EncExtension(x.Timestamp, yyxt14) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.Timestamp) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.Timestamp) - } else { - z.EncFallback(x.Timestamp) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeEvent) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeEvent) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Message": - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = (string)(r.DecodeString()) - } - case "Subsystem": - if r.TryDecodeAsNil() { - x.Subsystem = "" - } else { - x.Subsystem = (string)(r.DecodeString()) - } - case "Details": - if r.TryDecodeAsNil() { - x.Details = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Details, d) - } - } - case "Timestamp": - if r.TryDecodeAsNil() { - x.Timestamp = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.Timestamp = r.DecodeTime() - } else if yyxt9 := z.Extension(z.I2Rtid(x.Timestamp)); yyxt9 != nil { - z.DecExtension(x.Timestamp, yyxt9) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.Timestamp) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.Timestamp) - } else { - z.DecFallback(&x.Timestamp, false) - } - } - case "CreateIndex": - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeEvent) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Subsystem = "" - } else { - x.Subsystem = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Details = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Details, d) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Timestamp = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.Timestamp = r.DecodeTime() - } else if yyxt17 := z.Extension(z.I2Rtid(x.Timestamp)); yyxt17 != nil { - z.DecExtension(x.Timestamp, yyxt17) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.Timestamp) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.Timestamp) - } else { - z.DecFallback(&x.Timestamp, false) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj11-1, "") - } - r.ReadArrayEnd() -} - -func (x *DrainSpec) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(2) - } else { - r.WriteMapStart(2) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt4 := z.Extension(z.I2Rtid(x.Deadline)); yyxt4 != nil { - z.EncExtension(x.Deadline, yyxt4) - } else { - r.EncodeInt(int64(x.Deadline)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Deadline\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Deadline`) - } - r.WriteMapElemValue() - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.Deadline)); yyxt5 != nil { - z.EncExtension(x.Deadline, yyxt5) - } else { - r.EncodeInt(int64(x.Deadline)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.IgnoreSystemJobs)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IgnoreSystemJobs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IgnoreSystemJobs`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.IgnoreSystemJobs)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DrainSpec) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *DrainSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Deadline": - if r.TryDecodeAsNil() { - x.Deadline = 0 - } else { - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.Deadline)); yyxt5 != nil { - z.DecExtension(x.Deadline, yyxt5) - } else { - x.Deadline = (time.Duration)(r.DecodeInt64()) - } - } - case "IgnoreSystemJobs": - if r.TryDecodeAsNil() { - x.IgnoreSystemJobs = false - } else { - x.IgnoreSystemJobs = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DrainSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj7 int - var yyb7 bool - var yyhl7 bool = l >= 0 - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Deadline = 0 - } else { - if false { - } else if yyxt9 := z.Extension(z.I2Rtid(x.Deadline)); yyxt9 != nil { - z.DecExtension(x.Deadline, yyxt9) - } else { - x.Deadline = (time.Duration)(r.DecodeInt64()) - } - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.IgnoreSystemJobs = false - } else { - x.IgnoreSystemJobs = (bool)(r.DecodeBool()) - } - for { - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj7-1, "") - } - r.ReadArrayEnd() -} - -func (x *DrainStrategy) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt4 := z.Extension(z.I2Rtid(x.Deadline)); yyxt4 != nil { - z.EncExtension(x.Deadline, yyxt4) - } else { - r.EncodeInt(int64(x.Deadline)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Deadline\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Deadline`) - } - r.WriteMapElemValue() - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.Deadline)); yyxt5 != nil { - z.EncExtension(x.Deadline, yyxt5) - } else { - r.EncodeInt(int64(x.Deadline)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.IgnoreSystemJobs)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IgnoreSystemJobs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IgnoreSystemJobs`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.IgnoreSystemJobs)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.ForceDeadline) - } else if yyxt10 := z.Extension(z.I2Rtid(x.ForceDeadline)); yyxt10 != nil { - z.EncExtension(x.ForceDeadline, yyxt10) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.ForceDeadline) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.ForceDeadline) - } else { - z.EncFallback(x.ForceDeadline) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ForceDeadline\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ForceDeadline`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.ForceDeadline) - } else if yyxt11 := z.Extension(z.I2Rtid(x.ForceDeadline)); yyxt11 != nil { - z.EncExtension(x.ForceDeadline, yyxt11) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.ForceDeadline) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.ForceDeadline) - } else { - z.EncFallback(x.ForceDeadline) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.StartedAt) - } else if yyxt13 := z.Extension(z.I2Rtid(x.StartedAt)); yyxt13 != nil { - z.EncExtension(x.StartedAt, yyxt13) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.StartedAt) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.StartedAt) - } else { - z.EncFallback(x.StartedAt) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"StartedAt\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `StartedAt`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.StartedAt) - } else if yyxt14 := z.Extension(z.I2Rtid(x.StartedAt)); yyxt14 != nil { - z.EncExtension(x.StartedAt, yyxt14) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.StartedAt) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.StartedAt) - } else { - z.EncFallback(x.StartedAt) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DrainStrategy) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *DrainStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Deadline": - if r.TryDecodeAsNil() { - x.DrainSpec.Deadline = 0 - } else { - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.Deadline)); yyxt5 != nil { - z.DecExtension(x.Deadline, yyxt5) - } else { - x.Deadline = (time.Duration)(r.DecodeInt64()) - } - } - case "IgnoreSystemJobs": - if r.TryDecodeAsNil() { - x.DrainSpec.IgnoreSystemJobs = false - } else { - x.IgnoreSystemJobs = (bool)(r.DecodeBool()) - } - case "ForceDeadline": - if r.TryDecodeAsNil() { - x.ForceDeadline = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.ForceDeadline = r.DecodeTime() - } else if yyxt8 := z.Extension(z.I2Rtid(x.ForceDeadline)); yyxt8 != nil { - z.DecExtension(x.ForceDeadline, yyxt8) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.ForceDeadline) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.ForceDeadline) - } else { - z.DecFallback(&x.ForceDeadline, false) - } - } - case "StartedAt": - if r.TryDecodeAsNil() { - x.StartedAt = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.StartedAt = r.DecodeTime() - } else if yyxt10 := z.Extension(z.I2Rtid(x.StartedAt)); yyxt10 != nil { - z.DecExtension(x.StartedAt, yyxt10) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.StartedAt) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.StartedAt) - } else { - z.DecFallback(&x.StartedAt, false) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DrainStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DrainSpec.Deadline = 0 - } else { - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.Deadline)); yyxt13 != nil { - z.DecExtension(x.Deadline, yyxt13) - } else { - x.Deadline = (time.Duration)(r.DecodeInt64()) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DrainSpec.IgnoreSystemJobs = false - } else { - x.IgnoreSystemJobs = (bool)(r.DecodeBool()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ForceDeadline = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.ForceDeadline = r.DecodeTime() - } else if yyxt16 := z.Extension(z.I2Rtid(x.ForceDeadline)); yyxt16 != nil { - z.DecExtension(x.ForceDeadline, yyxt16) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.ForceDeadline) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.ForceDeadline) - } else { - z.DecFallback(&x.ForceDeadline, false) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.StartedAt = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.StartedAt = r.DecodeTime() - } else if yyxt18 := z.Extension(z.I2Rtid(x.StartedAt)); yyxt18 != nil { - z.DecExtension(x.StartedAt, yyxt18) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.StartedAt) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.StartedAt) - } else { - z.DecFallback(&x.StartedAt, false) - } - } - for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj11-1, "") - } - r.ReadArrayEnd() -} - -func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(26) - } else { - r.WriteMapStart(26) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SecretID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SecretID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SecretID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SecretID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SecretID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SecretID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Datacenter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Datacenter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Datacenter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Datacenter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Datacenter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Datacenter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.HTTPAddr))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.HTTPAddr)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"HTTPAddr\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `HTTPAddr`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.HTTPAddr))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.HTTPAddr)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.TLSEnabled)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TLSEnabled\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TLSEnabled`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.TLSEnabled)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Attributes == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Attributes, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Attributes\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Attributes`) - } - r.WriteMapElemValue() - if x.Attributes == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Attributes, e) - } - } - } - var yyn24 bool - if x.NodeResources == nil { - yyn24 = true - goto LABEL24 - } - LABEL24: - if yyr2 || yy2arr2 { - if yyn24 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.NodeResources == nil { - r.EncodeNil() - } else { - x.NodeResources.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeResources\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeResources`) - } - r.WriteMapElemValue() - if yyn24 { - r.EncodeNil() - } else { - if x.NodeResources == nil { - r.EncodeNil() - } else { - x.NodeResources.CodecEncodeSelf(e) - } - } - } - var yyn27 bool - if x.ReservedResources == nil { - yyn27 = true - goto LABEL27 - } - LABEL27: - if yyr2 || yy2arr2 { - if yyn27 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ReservedResources == nil { - r.EncodeNil() - } else { - x.ReservedResources.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ReservedResources\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ReservedResources`) - } - r.WriteMapElemValue() - if yyn27 { - r.EncodeNil() - } else { - if x.ReservedResources == nil { - r.EncodeNil() - } else { - x.ReservedResources.CodecEncodeSelf(e) - } - } - } - var yyn30 bool - if x.Resources == nil { - yyn30 = true - goto LABEL30 - } - LABEL30: - if yyr2 || yy2arr2 { - if yyn30 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Resources == nil { - r.EncodeNil() - } else { - x.Resources.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Resources\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Resources`) - } - r.WriteMapElemValue() - if yyn30 { - r.EncodeNil() - } else { - if x.Resources == nil { - r.EncodeNil() - } else { - x.Resources.CodecEncodeSelf(e) - } - } - } - var yyn33 bool - if x.Reserved == nil { - yyn33 = true - goto LABEL33 - } - LABEL33: - if yyr2 || yy2arr2 { - if yyn33 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Reserved == nil { - r.EncodeNil() - } else { - x.Reserved.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reserved\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reserved`) - } - r.WriteMapElemValue() - if yyn33 { - r.EncodeNil() - } else { - if x.Reserved == nil { - r.EncodeNil() - } else { - x.Reserved.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Links == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Links, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Links\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Links`) - } - r.WriteMapElemValue() - if x.Links == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Links, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Meta, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Meta\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Meta`) - } - r.WriteMapElemValue() - if x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Meta, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeClass))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeClass)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeClass\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeClass`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeClass))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeClass)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ComputedClass))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ComputedClass)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ComputedClass\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ComputedClass`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ComputedClass))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ComputedClass)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Drain)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Drain\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Drain`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Drain)) - } - } - var yyn51 bool - if x.DrainStrategy == nil { - yyn51 = true - goto LABEL51 - } - LABEL51: - if yyr2 || yy2arr2 { - if yyn51 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.DrainStrategy == nil { - r.EncodeNil() - } else { - x.DrainStrategy.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DrainStrategy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DrainStrategy`) - } - r.WriteMapElemValue() - if yyn51 { - r.EncodeNil() - } else { - if x.DrainStrategy == nil { - r.EncodeNil() - } else { - x.DrainStrategy.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SchedulingEligibility))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SchedulingEligibility)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SchedulingEligibility\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SchedulingEligibility`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SchedulingEligibility))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SchedulingEligibility)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Status))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Status)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Status\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Status`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Status))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Status)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.StatusDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.StatusDescription)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"StatusDescription\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `StatusDescription`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.StatusDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.StatusDescription)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.StatusUpdatedAt)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"StatusUpdatedAt\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `StatusUpdatedAt`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.StatusUpdatedAt)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Events == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNodeEvent(([]*NodeEvent)(x.Events), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Events\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Events`) - } - r.WriteMapElemValue() - if x.Events == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNodeEvent(([]*NodeEvent)(x.Events), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Drivers == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoDriverInfo((map[string]*DriverInfo)(x.Drivers), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Drivers\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Drivers`) - } - r.WriteMapElemValue() - if x.Drivers == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoDriverInfo((map[string]*DriverInfo)(x.Drivers), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.HostVolumes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoClientHostVolumeConfig((map[string]*ClientHostVolumeConfig)(x.HostVolumes), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"HostVolumes\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `HostVolumes`) - } - r.WriteMapElemValue() - if x.HostVolumes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoClientHostVolumeConfig((map[string]*ClientHostVolumeConfig)(x.HostVolumes), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *Node) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "ID": - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - case "SecretID": - if r.TryDecodeAsNil() { - x.SecretID = "" - } else { - x.SecretID = (string)(r.DecodeString()) - } - case "Datacenter": - if r.TryDecodeAsNil() { - x.Datacenter = "" - } else { - x.Datacenter = (string)(r.DecodeString()) - } - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "HTTPAddr": - if r.TryDecodeAsNil() { - x.HTTPAddr = "" - } else { - x.HTTPAddr = (string)(r.DecodeString()) - } - case "TLSEnabled": - if r.TryDecodeAsNil() { - x.TLSEnabled = false - } else { - x.TLSEnabled = (bool)(r.DecodeBool()) - } - case "Attributes": - if r.TryDecodeAsNil() { - x.Attributes = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Attributes, d) - } - } - case "NodeResources": - if r.TryDecodeAsNil() { - if true && x.NodeResources != nil { - x.NodeResources = nil - } - } else { - if x.NodeResources == nil { - x.NodeResources = new(NodeResources) - } - - x.NodeResources.CodecDecodeSelf(d) - } - case "ReservedResources": - if r.TryDecodeAsNil() { - if true && x.ReservedResources != nil { - x.ReservedResources = nil - } - } else { - if x.ReservedResources == nil { - x.ReservedResources = new(NodeReservedResources) - } - - x.ReservedResources.CodecDecodeSelf(d) - } - case "Resources": - if r.TryDecodeAsNil() { - if true && x.Resources != nil { - x.Resources = nil - } - } else { - if x.Resources == nil { - x.Resources = new(Resources) - } - - x.Resources.CodecDecodeSelf(d) - } - case "Reserved": - if r.TryDecodeAsNil() { - if true && x.Reserved != nil { - x.Reserved = nil - } - } else { - if x.Reserved == nil { - x.Reserved = new(Resources) - } - - x.Reserved.CodecDecodeSelf(d) - } - case "Links": - if r.TryDecodeAsNil() { - x.Links = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Links, d) - } - } - case "Meta": - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Meta, d) - } - } - case "NodeClass": - if r.TryDecodeAsNil() { - x.NodeClass = "" - } else { - x.NodeClass = (string)(r.DecodeString()) - } - case "ComputedClass": - if r.TryDecodeAsNil() { - x.ComputedClass = "" - } else { - x.ComputedClass = (string)(r.DecodeString()) - } - case "Drain": - if r.TryDecodeAsNil() { - x.Drain = false - } else { - x.Drain = (bool)(r.DecodeBool()) - } - case "DrainStrategy": - if r.TryDecodeAsNil() { - if true && x.DrainStrategy != nil { - x.DrainStrategy = nil - } - } else { - if x.DrainStrategy == nil { - x.DrainStrategy = new(DrainStrategy) - } - - x.DrainStrategy.CodecDecodeSelf(d) - } - case "SchedulingEligibility": - if r.TryDecodeAsNil() { - x.SchedulingEligibility = "" - } else { - x.SchedulingEligibility = (string)(r.DecodeString()) - } - case "Status": - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - case "StatusDescription": - if r.TryDecodeAsNil() { - x.StatusDescription = "" - } else { - x.StatusDescription = (string)(r.DecodeString()) - } - case "StatusUpdatedAt": - if r.TryDecodeAsNil() { - x.StatusUpdatedAt = 0 - } else { - x.StatusUpdatedAt = (int64)(r.DecodeInt64()) - } - case "Events": - if r.TryDecodeAsNil() { - x.Events = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeEvent((*[]*NodeEvent)(&x.Events), d) - } - } - case "Drivers": - if r.TryDecodeAsNil() { - x.Drivers = nil - } else { - if false { - } else { - h.decMapstringPtrtoDriverInfo((*map[string]*DriverInfo)(&x.Drivers), d) - } - } - case "HostVolumes": - if r.TryDecodeAsNil() { - x.HostVolumes = nil - } else { - if false { - } else { - h.decMapstringPtrtoClientHostVolumeConfig((*map[string]*ClientHostVolumeConfig)(&x.HostVolumes), d) - } - } - case "CreateIndex": - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - case "ModifyIndex": - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj36 int - var yyb36 bool - var yyhl36 bool = l >= 0 - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SecretID = "" - } else { - x.SecretID = (string)(r.DecodeString()) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Datacenter = "" - } else { - x.Datacenter = (string)(r.DecodeString()) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.HTTPAddr = "" - } else { - x.HTTPAddr = (string)(r.DecodeString()) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TLSEnabled = false - } else { - x.TLSEnabled = (bool)(r.DecodeBool()) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Attributes = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Attributes, d) - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.NodeResources != nil { - x.NodeResources = nil - } - } else { - if x.NodeResources == nil { - x.NodeResources = new(NodeResources) - } - - x.NodeResources.CodecDecodeSelf(d) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.ReservedResources != nil { - x.ReservedResources = nil - } - } else { - if x.ReservedResources == nil { - x.ReservedResources = new(NodeReservedResources) - } - - x.ReservedResources.CodecDecodeSelf(d) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Resources != nil { - x.Resources = nil - } - } else { - if x.Resources == nil { - x.Resources = new(Resources) - } - - x.Resources.CodecDecodeSelf(d) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Reserved != nil { - x.Reserved = nil - } - } else { - if x.Reserved == nil { - x.Reserved = new(Resources) - } - - x.Reserved.CodecDecodeSelf(d) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Links = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Links, d) - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Meta, d) - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeClass = "" - } else { - x.NodeClass = (string)(r.DecodeString()) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ComputedClass = "" - } else { - x.ComputedClass = (string)(r.DecodeString()) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Drain = false - } else { - x.Drain = (bool)(r.DecodeBool()) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.DrainStrategy != nil { - x.DrainStrategy = nil - } - } else { - if x.DrainStrategy == nil { - x.DrainStrategy = new(DrainStrategy) - } - - x.DrainStrategy.CodecDecodeSelf(d) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SchedulingEligibility = "" - } else { - x.SchedulingEligibility = (string)(r.DecodeString()) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.StatusDescription = "" - } else { - x.StatusDescription = (string)(r.DecodeString()) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.StatusUpdatedAt = 0 - } else { - x.StatusUpdatedAt = (int64)(r.DecodeInt64()) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Events = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeEvent((*[]*NodeEvent)(&x.Events), d) - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Drivers = nil - } else { - if false { - } else { - h.decMapstringPtrtoDriverInfo((*map[string]*DriverInfo)(&x.Drivers), d) - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.HostVolumes = nil - } else { - if false { - } else { - h.decMapstringPtrtoClientHostVolumeConfig((*map[string]*ClientHostVolumeConfig)(&x.HostVolumes), d) - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - for { - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj36-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeListStub) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(13) - } else { - r.WriteMapStart(13) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Address))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Address)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Address\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Address`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Address))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Address)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Datacenter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Datacenter)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Datacenter\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Datacenter`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Datacenter))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Datacenter)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeClass))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeClass)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeClass\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeClass`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeClass))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeClass)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Version))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Version)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Version\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Version`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Version))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Version)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Drain)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Drain\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Drain`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Drain)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SchedulingEligibility))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SchedulingEligibility)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SchedulingEligibility\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SchedulingEligibility`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SchedulingEligibility))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SchedulingEligibility)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Status))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Status)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Status\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Status`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Status))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Status)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.StatusDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.StatusDescription)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"StatusDescription\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `StatusDescription`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.StatusDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.StatusDescription)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Drivers == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoDriverInfo((map[string]*DriverInfo)(x.Drivers), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Drivers\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Drivers`) - } - r.WriteMapElemValue() - if x.Drivers == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoDriverInfo((map[string]*DriverInfo)(x.Drivers), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeListStub) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeListStub) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Address": - if r.TryDecodeAsNil() { - x.Address = "" - } else { - x.Address = (string)(r.DecodeString()) - } - case "ID": - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - case "Datacenter": - if r.TryDecodeAsNil() { - x.Datacenter = "" - } else { - x.Datacenter = (string)(r.DecodeString()) - } - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "NodeClass": - if r.TryDecodeAsNil() { - x.NodeClass = "" - } else { - x.NodeClass = (string)(r.DecodeString()) - } - case "Version": - if r.TryDecodeAsNil() { - x.Version = "" - } else { - x.Version = (string)(r.DecodeString()) - } - case "Drain": - if r.TryDecodeAsNil() { - x.Drain = false - } else { - x.Drain = (bool)(r.DecodeBool()) - } - case "SchedulingEligibility": - if r.TryDecodeAsNil() { - x.SchedulingEligibility = "" - } else { - x.SchedulingEligibility = (string)(r.DecodeString()) - } - case "Status": - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - case "StatusDescription": - if r.TryDecodeAsNil() { - x.StatusDescription = "" - } else { - x.StatusDescription = (string)(r.DecodeString()) - } - case "Drivers": - if r.TryDecodeAsNil() { - x.Drivers = nil - } else { - if false { - } else { - h.decMapstringPtrtoDriverInfo((*map[string]*DriverInfo)(&x.Drivers), d) - } - } - case "CreateIndex": - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - case "ModifyIndex": - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeListStub) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj18 int - var yyb18 bool - var yyhl18 bool = l >= 0 - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Address = "" - } else { - x.Address = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Datacenter = "" - } else { - x.Datacenter = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeClass = "" - } else { - x.NodeClass = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Version = "" - } else { - x.Version = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Drain = false - } else { - x.Drain = (bool)(r.DecodeBool()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SchedulingEligibility = "" - } else { - x.SchedulingEligibility = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.StatusDescription = "" - } else { - x.StatusDescription = (string)(r.DecodeString()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Drivers = nil - } else { - if false { - } else { - h.decMapstringPtrtoDriverInfo((*map[string]*DriverInfo)(&x.Drivers), d) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - for { - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj18-1, "") - } - r.ReadArrayEnd() -} - -func (x *Resources) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(6) - } else { - r.WriteMapStart(6) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.CPU)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CPU\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CPU`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.CPU)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.MemoryMB)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MemoryMB\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MemoryMB`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.MemoryMB)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.DiskMB)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DiskMB\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DiskMB`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.DiskMB)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.IOPS)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IOPS\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IOPS`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.IOPS)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Networks == nil { - r.EncodeNil() - } else { - x.Networks.CodecEncodeSelf(e) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Networks\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Networks`) - } - r.WriteMapElemValue() - if x.Networks == nil { - r.EncodeNil() - } else { - x.Networks.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Devices == nil { - r.EncodeNil() - } else { - x.Devices.CodecEncodeSelf(e) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Devices\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Devices`) - } - r.WriteMapElemValue() - if x.Devices == nil { - r.EncodeNil() - } else { - x.Devices.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *Resources) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *Resources) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "CPU": - if r.TryDecodeAsNil() { - x.CPU = 0 - } else { - x.CPU = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "MemoryMB": - if r.TryDecodeAsNil() { - x.MemoryMB = 0 - } else { - x.MemoryMB = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "DiskMB": - if r.TryDecodeAsNil() { - x.DiskMB = 0 - } else { - x.DiskMB = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "IOPS": - if r.TryDecodeAsNil() { - x.IOPS = 0 - } else { - x.IOPS = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Networks": - if r.TryDecodeAsNil() { - x.Networks = nil - } else { - x.Networks.CodecDecodeSelf(d) - } - case "Devices": - if r.TryDecodeAsNil() { - x.Devices = nil - } else { - x.Devices.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *Resources) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CPU = 0 - } else { - x.CPU = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MemoryMB = 0 - } else { - x.MemoryMB = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DiskMB = 0 - } else { - x.DiskMB = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.IOPS = 0 - } else { - x.IOPS = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Networks = nil - } else { - x.Networks.CodecDecodeSelf(d) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Devices = nil - } else { - x.Devices.CodecDecodeSelf(d) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x ResourceDevices) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - h.encResourceDevices((ResourceDevices)(x), e) - } - } -} - -func (x *ResourceDevices) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - h.decResourceDevices((*ResourceDevices)(x), d) - } -} - -func (x *Port) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(3) - } else { - r.WriteMapStart(3) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Label))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Label)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Label\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Label`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Label))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Label)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Value)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Value\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Value`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Value)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.To)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"To\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `To`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.To)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *Port) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *Port) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Label": - if r.TryDecodeAsNil() { - x.Label = "" - } else { - x.Label = (string)(r.DecodeString()) - } - case "Value": - if r.TryDecodeAsNil() { - x.Value = 0 - } else { - x.Value = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "To": - if r.TryDecodeAsNil() { - x.To = 0 - } else { - x.To = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *Port) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj7 int - var yyb7 bool - var yyhl7 bool = l >= 0 - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Label = "" - } else { - x.Label = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Value = 0 - } else { - x.Value = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.To = 0 - } else { - x.To = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - for { - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj7-1, "") - } - r.ReadArrayEnd() -} - -func (x *NetworkResource) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(7) - } else { - r.WriteMapStart(7) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Mode))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Mode)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Mode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Mode`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Mode))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Mode)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Device))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Device)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Device\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Device`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Device))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Device)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.CIDR))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.CIDR)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CIDR\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CIDR`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.CIDR))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.CIDR)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IP))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IP)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IP\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IP`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.IP))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.IP)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.MBits)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MBits\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MBits`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.MBits)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.ReservedPorts == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePort(([]Port)(x.ReservedPorts), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ReservedPorts\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ReservedPorts`) - } - r.WriteMapElemValue() - if x.ReservedPorts == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePort(([]Port)(x.ReservedPorts), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.DynamicPorts == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePort(([]Port)(x.DynamicPorts), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DynamicPorts\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DynamicPorts`) - } - r.WriteMapElemValue() - if x.DynamicPorts == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePort(([]Port)(x.DynamicPorts), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NetworkResource) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NetworkResource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Mode": - if r.TryDecodeAsNil() { - x.Mode = "" - } else { - x.Mode = (string)(r.DecodeString()) - } - case "Device": - if r.TryDecodeAsNil() { - x.Device = "" - } else { - x.Device = (string)(r.DecodeString()) - } - case "CIDR": - if r.TryDecodeAsNil() { - x.CIDR = "" - } else { - x.CIDR = (string)(r.DecodeString()) - } - case "IP": - if r.TryDecodeAsNil() { - x.IP = "" - } else { - x.IP = (string)(r.DecodeString()) - } - case "MBits": - if r.TryDecodeAsNil() { - x.MBits = 0 - } else { - x.MBits = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "ReservedPorts": - if r.TryDecodeAsNil() { - x.ReservedPorts = nil - } else { - if false { - } else { - h.decSlicePort((*[]Port)(&x.ReservedPorts), d) - } - } - case "DynamicPorts": - if r.TryDecodeAsNil() { - x.DynamicPorts = nil - } else { - if false { - } else { - h.decSlicePort((*[]Port)(&x.DynamicPorts), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NetworkResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Mode = "" - } else { - x.Mode = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Device = "" - } else { - x.Device = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CIDR = "" - } else { - x.CIDR = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.IP = "" - } else { - x.IP = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MBits = 0 - } else { - x.MBits = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ReservedPorts = nil - } else { - if false { - } else { - h.decSlicePort((*[]Port)(&x.ReservedPorts), d) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DynamicPorts = nil - } else { - if false { - } else { - h.decSlicePort((*[]Port)(&x.DynamicPorts), d) - } - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-1, "") - } - r.ReadArrayEnd() -} - -func (x Networks) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - h.encNetworks((Networks)(x), e) - } - } -} - -func (x *Networks) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - h.decNetworks((*Networks)(x), d) - } -} - -func (x *RequestedDevice) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Count)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Count\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Count`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Count)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Constraints == nil { - r.EncodeNil() - } else { - x.Constraints.CodecEncodeSelf(e) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Constraints\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Constraints`) - } - r.WriteMapElemValue() - if x.Constraints == nil { - r.EncodeNil() - } else { - x.Constraints.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Affinities == nil { - r.EncodeNil() - } else { - x.Affinities.CodecEncodeSelf(e) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Affinities\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Affinities`) - } - r.WriteMapElemValue() - if x.Affinities == nil { - r.EncodeNil() - } else { - x.Affinities.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *RequestedDevice) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *RequestedDevice) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Count": - if r.TryDecodeAsNil() { - x.Count = 0 - } else { - x.Count = (uint64)(r.DecodeUint64()) - } - case "Constraints": - if r.TryDecodeAsNil() { - x.Constraints = nil - } else { - x.Constraints.CodecDecodeSelf(d) - } - case "Affinities": - if r.TryDecodeAsNil() { - x.Affinities = nil - } else { - x.Affinities.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *RequestedDevice) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj8 int - var yyb8 bool - var yyhl8 bool = l >= 0 - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Count = 0 - } else { - x.Count = (uint64)(r.DecodeUint64()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Constraints = nil - } else { - x.Constraints.CodecDecodeSelf(d) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Affinities = nil - } else { - x.Affinities.CodecDecodeSelf(d) - } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj8-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeResources) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - yy4 := &x.Cpu - yy4.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Cpu\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Cpu`) - } - r.WriteMapElemValue() - yy6 := &x.Cpu - yy6.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - yy9 := &x.Memory - yy9.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Memory\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Memory`) - } - r.WriteMapElemValue() - yy11 := &x.Memory - yy11.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - yy14 := &x.Disk - yy14.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Disk\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Disk`) - } - r.WriteMapElemValue() - yy16 := &x.Disk - yy16.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Networks == nil { - r.EncodeNil() - } else { - x.Networks.CodecEncodeSelf(e) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Networks\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Networks`) - } - r.WriteMapElemValue() - if x.Networks == nil { - r.EncodeNil() - } else { - x.Networks.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Devices == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNodeDeviceResource(([]*NodeDeviceResource)(x.Devices), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Devices\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Devices`) - } - r.WriteMapElemValue() - if x.Devices == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNodeDeviceResource(([]*NodeDeviceResource)(x.Devices), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeResources) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeResources) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Cpu": - if r.TryDecodeAsNil() { - x.Cpu = NodeCpuResources{} - } else { - x.Cpu.CodecDecodeSelf(d) - } - case "Memory": - if r.TryDecodeAsNil() { - x.Memory = NodeMemoryResources{} - } else { - x.Memory.CodecDecodeSelf(d) - } - case "Disk": - if r.TryDecodeAsNil() { - x.Disk = NodeDiskResources{} - } else { - x.Disk.CodecDecodeSelf(d) - } - case "Networks": - if r.TryDecodeAsNil() { - x.Networks = nil - } else { - x.Networks.CodecDecodeSelf(d) - } - case "Devices": - if r.TryDecodeAsNil() { - x.Devices = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeDeviceResource((*[]*NodeDeviceResource)(&x.Devices), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeResources) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Cpu = NodeCpuResources{} - } else { - x.Cpu.CodecDecodeSelf(d) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Memory = NodeMemoryResources{} - } else { - x.Memory.CodecDecodeSelf(d) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Disk = NodeDiskResources{} - } else { - x.Disk.CodecDecodeSelf(d) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Networks = nil - } else { - x.Networks.CodecDecodeSelf(d) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Devices = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeDeviceResource((*[]*NodeDeviceResource)(&x.Devices), d) - } - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeCpuResources) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.CpuShares)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CpuShares\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CpuShares`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.CpuShares)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeCpuResources) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeCpuResources) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "CpuShares": - if r.TryDecodeAsNil() { - x.CpuShares = 0 - } else { - x.CpuShares = (int64)(r.DecodeInt64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeCpuResources) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj5 int - var yyb5 bool - var yyhl5 bool = l >= 0 - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CpuShares = 0 - } else { - x.CpuShares = (int64)(r.DecodeInt64()) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeMemoryResources) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.MemoryMB)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MemoryMB\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MemoryMB`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.MemoryMB)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeMemoryResources) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeMemoryResources) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "MemoryMB": - if r.TryDecodeAsNil() { - x.MemoryMB = 0 - } else { - x.MemoryMB = (int64)(r.DecodeInt64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeMemoryResources) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj5 int - var yyb5 bool - var yyhl5 bool = l >= 0 - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MemoryMB = 0 - } else { - x.MemoryMB = (int64)(r.DecodeInt64()) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeDiskResources) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.DiskMB)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DiskMB\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DiskMB`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.DiskMB)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeDiskResources) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeDiskResources) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "DiskMB": - if r.TryDecodeAsNil() { - x.DiskMB = 0 - } else { - x.DiskMB = (int64)(r.DecodeInt64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeDiskResources) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj5 int - var yyb5 bool - var yyhl5 bool = l >= 0 - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DiskMB = 0 - } else { - x.DiskMB = (int64)(r.DecodeInt64()) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *DeviceIdTuple) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(3) - } else { - r.WriteMapStart(3) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Vendor))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Vendor)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Vendor\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Vendor`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Vendor))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Vendor)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Type))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Type)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Type\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Type`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Type))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Type)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DeviceIdTuple) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *DeviceIdTuple) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Vendor": - if r.TryDecodeAsNil() { - x.Vendor = "" - } else { - x.Vendor = (string)(r.DecodeString()) - } - case "Type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DeviceIdTuple) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj7 int - var yyb7 bool - var yyhl7 bool = l >= 0 - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Vendor = "" - } else { - x.Vendor = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - for { - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj7-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeDeviceResource) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Vendor))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Vendor)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Vendor\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Vendor`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Vendor))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Vendor)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Type))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Type)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Type\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Type`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Type))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Type)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Instances == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNodeDevice(([]*NodeDevice)(x.Instances), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Instances\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Instances`) - } - r.WriteMapElemValue() - if x.Instances == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNodeDevice(([]*NodeDevice)(x.Instances), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Attributes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtostructs_Attribute((map[string]*pkg1_structs.Attribute)(x.Attributes), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Attributes\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Attributes`) - } - r.WriteMapElemValue() - if x.Attributes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtostructs_Attribute((map[string]*pkg1_structs.Attribute)(x.Attributes), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeDeviceResource) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeDeviceResource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Vendor": - if r.TryDecodeAsNil() { - x.Vendor = "" - } else { - x.Vendor = (string)(r.DecodeString()) - } - case "Type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Instances": - if r.TryDecodeAsNil() { - x.Instances = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeDevice((*[]*NodeDevice)(&x.Instances), d) - } - } - case "Attributes": - if r.TryDecodeAsNil() { - x.Attributes = nil - } else { - if false { - } else { - h.decMapstringPtrtostructs_Attribute((*map[string]*pkg1_structs.Attribute)(&x.Attributes), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeDeviceResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Vendor = "" - } else { - x.Vendor = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Instances = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeDevice((*[]*NodeDevice)(&x.Instances), d) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Attributes = nil - } else { - if false { - } else { - h.decMapstringPtrtostructs_Attribute((*map[string]*pkg1_structs.Attribute)(&x.Attributes), d) - } - } - for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj11-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeDevice) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Healthy)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Healthy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Healthy`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Healthy)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.HealthDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.HealthDescription)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"HealthDescription\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `HealthDescription`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.HealthDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.HealthDescription)) - } - } - } - var yyn12 bool - if x.Locality == nil { - yyn12 = true - goto LABEL12 - } - LABEL12: - if yyr2 || yy2arr2 { - if yyn12 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Locality == nil { - r.EncodeNil() - } else { - x.Locality.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Locality\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Locality`) - } - r.WriteMapElemValue() - if yyn12 { - r.EncodeNil() - } else { - if x.Locality == nil { - r.EncodeNil() - } else { - x.Locality.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeDevice) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeDevice) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "ID": - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - case "Healthy": - if r.TryDecodeAsNil() { - x.Healthy = false - } else { - x.Healthy = (bool)(r.DecodeBool()) - } - case "HealthDescription": - if r.TryDecodeAsNil() { - x.HealthDescription = "" - } else { - x.HealthDescription = (string)(r.DecodeString()) - } - case "Locality": - if r.TryDecodeAsNil() { - if true && x.Locality != nil { - x.Locality = nil - } - } else { - if x.Locality == nil { - x.Locality = new(NodeDeviceLocality) - } - - x.Locality.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeDevice) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj8 int - var yyb8 bool - var yyhl8 bool = l >= 0 - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Healthy = false - } else { - x.Healthy = (bool)(r.DecodeBool()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.HealthDescription = "" - } else { - x.HealthDescription = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Locality != nil { - x.Locality = nil - } - } else { - if x.Locality == nil { - x.Locality = new(NodeDeviceLocality) - } - - x.Locality.CodecDecodeSelf(d) - } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj8-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeDeviceLocality) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PciBusID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PciBusID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PciBusID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PciBusID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PciBusID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PciBusID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeDeviceLocality) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeDeviceLocality) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "PciBusID": - if r.TryDecodeAsNil() { - x.PciBusID = "" - } else { - x.PciBusID = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeDeviceLocality) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj5 int - var yyb5 bool - var yyhl5 bool = l >= 0 - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PciBusID = "" - } else { - x.PciBusID = (string)(r.DecodeString()) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeReservedResources) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - yy4 := &x.Cpu - yy4.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Cpu\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Cpu`) - } - r.WriteMapElemValue() - yy6 := &x.Cpu - yy6.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - yy9 := &x.Memory - yy9.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Memory\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Memory`) - } - r.WriteMapElemValue() - yy11 := &x.Memory - yy11.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - yy14 := &x.Disk - yy14.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Disk\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Disk`) - } - r.WriteMapElemValue() - yy16 := &x.Disk - yy16.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - yy19 := &x.Networks - yy19.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Networks\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Networks`) - } - r.WriteMapElemValue() - yy21 := &x.Networks - yy21.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeReservedResources) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeReservedResources) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Cpu": - if r.TryDecodeAsNil() { - x.Cpu = NodeReservedCpuResources{} - } else { - x.Cpu.CodecDecodeSelf(d) - } - case "Memory": - if r.TryDecodeAsNil() { - x.Memory = NodeReservedMemoryResources{} - } else { - x.Memory.CodecDecodeSelf(d) - } - case "Disk": - if r.TryDecodeAsNil() { - x.Disk = NodeReservedDiskResources{} - } else { - x.Disk.CodecDecodeSelf(d) - } - case "Networks": - if r.TryDecodeAsNil() { - x.Networks = NodeReservedNetworkResources{} - } else { - x.Networks.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeReservedResources) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj8 int - var yyb8 bool - var yyhl8 bool = l >= 0 - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Cpu = NodeReservedCpuResources{} - } else { - x.Cpu.CodecDecodeSelf(d) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Memory = NodeReservedMemoryResources{} - } else { - x.Memory.CodecDecodeSelf(d) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Disk = NodeReservedDiskResources{} - } else { - x.Disk.CodecDecodeSelf(d) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Networks = NodeReservedNetworkResources{} - } else { - x.Networks.CodecDecodeSelf(d) - } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj8-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeReservedCpuResources) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.CpuShares)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CpuShares\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CpuShares`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.CpuShares)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeReservedCpuResources) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeReservedCpuResources) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "CpuShares": - if r.TryDecodeAsNil() { - x.CpuShares = 0 - } else { - x.CpuShares = (int64)(r.DecodeInt64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeReservedCpuResources) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj5 int - var yyb5 bool - var yyhl5 bool = l >= 0 - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CpuShares = 0 - } else { - x.CpuShares = (int64)(r.DecodeInt64()) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeReservedMemoryResources) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.MemoryMB)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MemoryMB\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MemoryMB`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.MemoryMB)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeReservedMemoryResources) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeReservedMemoryResources) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "MemoryMB": - if r.TryDecodeAsNil() { - x.MemoryMB = 0 - } else { - x.MemoryMB = (int64)(r.DecodeInt64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeReservedMemoryResources) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj5 int - var yyb5 bool - var yyhl5 bool = l >= 0 - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MemoryMB = 0 - } else { - x.MemoryMB = (int64)(r.DecodeInt64()) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeReservedDiskResources) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.DiskMB)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DiskMB\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DiskMB`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.DiskMB)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeReservedDiskResources) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeReservedDiskResources) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "DiskMB": - if r.TryDecodeAsNil() { - x.DiskMB = 0 - } else { - x.DiskMB = (int64)(r.DecodeInt64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeReservedDiskResources) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj5 int - var yyb5 bool - var yyhl5 bool = l >= 0 - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DiskMB = 0 - } else { - x.DiskMB = (int64)(r.DecodeInt64()) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeReservedNetworkResources) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ReservedHostPorts))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ReservedHostPorts)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ReservedHostPorts\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ReservedHostPorts`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ReservedHostPorts))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ReservedHostPorts)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeReservedNetworkResources) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeReservedNetworkResources) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "ReservedHostPorts": - if r.TryDecodeAsNil() { - x.ReservedHostPorts = "" - } else { - x.ReservedHostPorts = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeReservedNetworkResources) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj5 int - var yyb5 bool - var yyhl5 bool = l >= 0 - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ReservedHostPorts = "" - } else { - x.ReservedHostPorts = (string)(r.DecodeString()) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocatedResources) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(2) - } else { - r.WriteMapStart(2) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Tasks == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoAllocatedTaskResources((map[string]*AllocatedTaskResources)(x.Tasks), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Tasks\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Tasks`) - } - r.WriteMapElemValue() - if x.Tasks == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoAllocatedTaskResources((map[string]*AllocatedTaskResources)(x.Tasks), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - yy7 := &x.Shared - yy7.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Shared\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Shared`) - } - r.WriteMapElemValue() - yy9 := &x.Shared - yy9.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocatedResources) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *AllocatedResources) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Tasks": - if r.TryDecodeAsNil() { - x.Tasks = nil - } else { - if false { - } else { - h.decMapstringPtrtoAllocatedTaskResources((*map[string]*AllocatedTaskResources)(&x.Tasks), d) - } - } - case "Shared": - if r.TryDecodeAsNil() { - x.Shared = AllocatedSharedResources{} - } else { - x.Shared.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocatedResources) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj7 int - var yyb7 bool - var yyhl7 bool = l >= 0 - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Tasks = nil - } else { - if false { - } else { - h.decMapstringPtrtoAllocatedTaskResources((*map[string]*AllocatedTaskResources)(&x.Tasks), d) - } - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Shared = AllocatedSharedResources{} - } else { - x.Shared.CodecDecodeSelf(d) - } - for { - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj7-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocatedTaskResources) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - yy4 := &x.Cpu - yy4.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Cpu\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Cpu`) - } - r.WriteMapElemValue() - yy6 := &x.Cpu - yy6.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - yy9 := &x.Memory - yy9.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Memory\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Memory`) - } - r.WriteMapElemValue() - yy11 := &x.Memory - yy11.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Networks == nil { - r.EncodeNil() - } else { - x.Networks.CodecEncodeSelf(e) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Networks\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Networks`) - } - r.WriteMapElemValue() - if x.Networks == nil { - r.EncodeNil() - } else { - x.Networks.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Devices == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocatedDeviceResource(([]*AllocatedDeviceResource)(x.Devices), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Devices\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Devices`) - } - r.WriteMapElemValue() - if x.Devices == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocatedDeviceResource(([]*AllocatedDeviceResource)(x.Devices), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocatedTaskResources) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *AllocatedTaskResources) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Cpu": - if r.TryDecodeAsNil() { - x.Cpu = AllocatedCpuResources{} - } else { - x.Cpu.CodecDecodeSelf(d) - } - case "Memory": - if r.TryDecodeAsNil() { - x.Memory = AllocatedMemoryResources{} - } else { - x.Memory.CodecDecodeSelf(d) - } - case "Networks": - if r.TryDecodeAsNil() { - x.Networks = nil - } else { - x.Networks.CodecDecodeSelf(d) - } - case "Devices": - if r.TryDecodeAsNil() { - x.Devices = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocatedDeviceResource((*[]*AllocatedDeviceResource)(&x.Devices), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocatedTaskResources) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Cpu = AllocatedCpuResources{} - } else { - x.Cpu.CodecDecodeSelf(d) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Memory = AllocatedMemoryResources{} - } else { - x.Memory.CodecDecodeSelf(d) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Networks = nil - } else { - x.Networks.CodecDecodeSelf(d) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Devices = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocatedDeviceResource((*[]*AllocatedDeviceResource)(&x.Devices), d) - } - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocatedSharedResources) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(2) - } else { - r.WriteMapStart(2) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Networks == nil { - r.EncodeNil() - } else { - x.Networks.CodecEncodeSelf(e) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Networks\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Networks`) - } - r.WriteMapElemValue() - if x.Networks == nil { - r.EncodeNil() - } else { - x.Networks.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.DiskMB)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DiskMB\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DiskMB`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.DiskMB)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocatedSharedResources) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *AllocatedSharedResources) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Networks": - if r.TryDecodeAsNil() { - x.Networks = nil - } else { - x.Networks.CodecDecodeSelf(d) - } - case "DiskMB": - if r.TryDecodeAsNil() { - x.DiskMB = 0 - } else { - x.DiskMB = (int64)(r.DecodeInt64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocatedSharedResources) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Networks = nil - } else { - x.Networks.CodecDecodeSelf(d) - } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DiskMB = 0 - } else { - x.DiskMB = (int64)(r.DecodeInt64()) - } - for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj6-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocatedCpuResources) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.CpuShares)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CpuShares\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CpuShares`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.CpuShares)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocatedCpuResources) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *AllocatedCpuResources) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "CpuShares": - if r.TryDecodeAsNil() { - x.CpuShares = 0 - } else { - x.CpuShares = (int64)(r.DecodeInt64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocatedCpuResources) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj5 int - var yyb5 bool - var yyhl5 bool = l >= 0 - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CpuShares = 0 - } else { - x.CpuShares = (int64)(r.DecodeInt64()) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocatedMemoryResources) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.MemoryMB)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MemoryMB\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MemoryMB`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.MemoryMB)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocatedMemoryResources) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *AllocatedMemoryResources) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "MemoryMB": - if r.TryDecodeAsNil() { - x.MemoryMB = 0 - } else { - x.MemoryMB = (int64)(r.DecodeInt64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocatedMemoryResources) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj5 int - var yyb5 bool - var yyhl5 bool = l >= 0 - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MemoryMB = 0 - } else { - x.MemoryMB = (int64)(r.DecodeInt64()) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x AllocatedDevices) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - h.encAllocatedDevices((AllocatedDevices)(x), e) - } - } -} - -func (x *AllocatedDevices) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - h.decAllocatedDevices((*AllocatedDevices)(x), d) - } -} - -func (x *AllocatedDeviceResource) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Vendor))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Vendor)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Vendor\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Vendor`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Vendor))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Vendor)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Type))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Type)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Type\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Type`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Type))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Type)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.DeviceIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.DeviceIDs, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeviceIDs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DeviceIDs`) - } - r.WriteMapElemValue() - if x.DeviceIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.DeviceIDs, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocatedDeviceResource) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *AllocatedDeviceResource) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Vendor": - if r.TryDecodeAsNil() { - x.Vendor = "" - } else { - x.Vendor = (string)(r.DecodeString()) - } - case "Type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "DeviceIDs": - if r.TryDecodeAsNil() { - x.DeviceIDs = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.DeviceIDs, d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocatedDeviceResource) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Vendor = "" - } else { - x.Vendor = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeviceIDs = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.DeviceIDs, d) - } - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *ComparableResources) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(2) - } else { - r.WriteMapStart(2) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - yy4 := &x.Flattened - yy4.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Flattened\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Flattened`) - } - r.WriteMapElemValue() - yy6 := &x.Flattened - yy6.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - yy9 := &x.Shared - yy9.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Shared\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Shared`) - } - r.WriteMapElemValue() - yy11 := &x.Shared - yy11.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ComparableResources) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ComparableResources) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Flattened": - if r.TryDecodeAsNil() { - x.Flattened = AllocatedTaskResources{} - } else { - x.Flattened.CodecDecodeSelf(d) - } - case "Shared": - if r.TryDecodeAsNil() { - x.Shared = AllocatedSharedResources{} - } else { - x.Shared.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ComparableResources) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Flattened = AllocatedTaskResources{} - } else { - x.Flattened.CodecDecodeSelf(d) - } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Shared = AllocatedSharedResources{} - } else { - x.Shared.CodecDecodeSelf(d) - } - for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj6-1, "") - } - r.ReadArrayEnd() -} - -func (x *Job) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(29) - } else { - r.WriteMapStart(29) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Stop)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Stop\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Stop`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Stop)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ParentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ParentID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ParentID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ParentID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ParentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ParentID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Type))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Type)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Type\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Type`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Type))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Type)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Priority)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Priority\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Priority`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Priority)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllAtOnce)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllAtOnce\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllAtOnce`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllAtOnce)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Datacenters == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Datacenters, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Datacenters\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Datacenters`) - } - r.WriteMapElemValue() - if x.Datacenters == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Datacenters, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Constraints == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoConstraint(([]*Constraint)(x.Constraints), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Constraints\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Constraints`) - } - r.WriteMapElemValue() - if x.Constraints == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoConstraint(([]*Constraint)(x.Constraints), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Affinities == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAffinity(([]*Affinity)(x.Affinities), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Affinities\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Affinities`) - } - r.WriteMapElemValue() - if x.Affinities == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAffinity(([]*Affinity)(x.Affinities), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Spreads == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoSpread(([]*Spread)(x.Spreads), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Spreads\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Spreads`) - } - r.WriteMapElemValue() - if x.Spreads == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoSpread(([]*Spread)(x.Spreads), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.TaskGroups == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoTaskGroup(([]*TaskGroup)(x.TaskGroups), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TaskGroups\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TaskGroups`) - } - r.WriteMapElemValue() - if x.TaskGroups == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoTaskGroup(([]*TaskGroup)(x.TaskGroups), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - yy46 := &x.Update - yy46.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Update\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Update`) - } - r.WriteMapElemValue() - yy48 := &x.Update - yy48.CodecEncodeSelf(e) - } - var yyn50 bool - if x.Periodic == nil { - yyn50 = true - goto LABEL50 - } - LABEL50: - if yyr2 || yy2arr2 { - if yyn50 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Periodic == nil { - r.EncodeNil() - } else { - x.Periodic.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Periodic\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Periodic`) - } - r.WriteMapElemValue() - if yyn50 { - r.EncodeNil() - } else { - if x.Periodic == nil { - r.EncodeNil() - } else { - x.Periodic.CodecEncodeSelf(e) - } - } - } - var yyn53 bool - if x.ParameterizedJob == nil { - yyn53 = true - goto LABEL53 - } - LABEL53: - if yyr2 || yy2arr2 { - if yyn53 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ParameterizedJob == nil { - r.EncodeNil() - } else { - x.ParameterizedJob.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ParameterizedJob\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ParameterizedJob`) - } - r.WriteMapElemValue() - if yyn53 { - r.EncodeNil() - } else { - if x.ParameterizedJob == nil { - r.EncodeNil() - } else { - x.ParameterizedJob.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Dispatched)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Dispatched\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Dispatched`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Dispatched)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Payload == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.Payload)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Payload\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Payload`) - } - r.WriteMapElemValue() - if x.Payload == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.Payload)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Meta, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Meta\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Meta`) - } - r.WriteMapElemValue() - if x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Meta, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.VaultToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.VaultToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"VaultToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `VaultToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.VaultToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.VaultToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Status))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Status)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Status\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Status`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Status))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Status)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.StatusDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.StatusDescription)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"StatusDescription\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `StatusDescription`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.StatusDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.StatusDescription)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Stable)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Stable\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Stable`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Stable)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Version)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Version\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Version`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Version)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.SubmitTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SubmitTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SubmitTime`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.SubmitTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.JobModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.JobModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *Job) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *Job) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Stop": - if r.TryDecodeAsNil() { - x.Stop = false - } else { - x.Stop = (bool)(r.DecodeBool()) - } - case "Region": - if r.TryDecodeAsNil() { - x.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "ID": - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - case "ParentID": - if r.TryDecodeAsNil() { - x.ParentID = "" - } else { - x.ParentID = (string)(r.DecodeString()) - } - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - case "Priority": - if r.TryDecodeAsNil() { - x.Priority = 0 - } else { - x.Priority = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "AllAtOnce": - if r.TryDecodeAsNil() { - x.AllAtOnce = false - } else { - x.AllAtOnce = (bool)(r.DecodeBool()) - } - case "Datacenters": - if r.TryDecodeAsNil() { - x.Datacenters = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Datacenters, d) - } - } - case "Constraints": - if r.TryDecodeAsNil() { - x.Constraints = nil - } else { - if false { - } else { - h.decSlicePtrtoConstraint((*[]*Constraint)(&x.Constraints), d) - } - } - case "Affinities": - if r.TryDecodeAsNil() { - x.Affinities = nil - } else { - if false { - } else { - h.decSlicePtrtoAffinity((*[]*Affinity)(&x.Affinities), d) - } - } - case "Spreads": - if r.TryDecodeAsNil() { - x.Spreads = nil - } else { - if false { - } else { - h.decSlicePtrtoSpread((*[]*Spread)(&x.Spreads), d) - } - } - case "TaskGroups": - if r.TryDecodeAsNil() { - x.TaskGroups = nil - } else { - if false { - } else { - h.decSlicePtrtoTaskGroup((*[]*TaskGroup)(&x.TaskGroups), d) - } - } - case "Update": - if r.TryDecodeAsNil() { - x.Update = UpdateStrategy{} - } else { - x.Update.CodecDecodeSelf(d) - } - case "Periodic": - if r.TryDecodeAsNil() { - if true && x.Periodic != nil { - x.Periodic = nil - } - } else { - if x.Periodic == nil { - x.Periodic = new(PeriodicConfig) - } - - x.Periodic.CodecDecodeSelf(d) - } - case "ParameterizedJob": - if r.TryDecodeAsNil() { - if true && x.ParameterizedJob != nil { - x.ParameterizedJob = nil - } - } else { - if x.ParameterizedJob == nil { - x.ParameterizedJob = new(ParameterizedJobConfig) - } - - x.ParameterizedJob.CodecDecodeSelf(d) - } - case "Dispatched": - if r.TryDecodeAsNil() { - x.Dispatched = false - } else { - x.Dispatched = (bool)(r.DecodeBool()) - } - case "Payload": - if r.TryDecodeAsNil() { - x.Payload = nil - } else { - if false { - } else { - x.Payload = r.DecodeBytes(([]byte)(x.Payload), false) - } - } - case "Meta": - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Meta, d) - } - } - case "VaultToken": - if r.TryDecodeAsNil() { - x.VaultToken = "" - } else { - x.VaultToken = (string)(r.DecodeString()) - } - case "Status": - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - case "StatusDescription": - if r.TryDecodeAsNil() { - x.StatusDescription = "" - } else { - x.StatusDescription = (string)(r.DecodeString()) - } - case "Stable": - if r.TryDecodeAsNil() { - x.Stable = false - } else { - x.Stable = (bool)(r.DecodeBool()) - } - case "Version": - if r.TryDecodeAsNil() { - x.Version = 0 - } else { - x.Version = (uint64)(r.DecodeUint64()) - } - case "SubmitTime": - if r.TryDecodeAsNil() { - x.SubmitTime = 0 - } else { - x.SubmitTime = (int64)(r.DecodeInt64()) - } - case "CreateIndex": - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - case "ModifyIndex": - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - case "JobModifyIndex": - if r.TryDecodeAsNil() { - x.JobModifyIndex = 0 - } else { - x.JobModifyIndex = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *Job) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj40 int - var yyb40 bool - var yyhl40 bool = l >= 0 - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Stop = false - } else { - x.Stop = (bool)(r.DecodeBool()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ParentID = "" - } else { - x.ParentID = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Priority = 0 - } else { - x.Priority = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllAtOnce = false - } else { - x.AllAtOnce = (bool)(r.DecodeBool()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Datacenters = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Datacenters, d) - } - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Constraints = nil - } else { - if false { - } else { - h.decSlicePtrtoConstraint((*[]*Constraint)(&x.Constraints), d) - } - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Affinities = nil - } else { - if false { - } else { - h.decSlicePtrtoAffinity((*[]*Affinity)(&x.Affinities), d) - } - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Spreads = nil - } else { - if false { - } else { - h.decSlicePtrtoSpread((*[]*Spread)(&x.Spreads), d) - } - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskGroups = nil - } else { - if false { - } else { - h.decSlicePtrtoTaskGroup((*[]*TaskGroup)(&x.TaskGroups), d) - } - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Update = UpdateStrategy{} - } else { - x.Update.CodecDecodeSelf(d) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Periodic != nil { - x.Periodic = nil - } - } else { - if x.Periodic == nil { - x.Periodic = new(PeriodicConfig) - } - - x.Periodic.CodecDecodeSelf(d) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.ParameterizedJob != nil { - x.ParameterizedJob = nil - } - } else { - if x.ParameterizedJob == nil { - x.ParameterizedJob = new(ParameterizedJobConfig) - } - - x.ParameterizedJob.CodecDecodeSelf(d) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Dispatched = false - } else { - x.Dispatched = (bool)(r.DecodeBool()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Payload = nil - } else { - if false { - } else { - x.Payload = r.DecodeBytes(([]byte)(x.Payload), false) - } - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Meta, d) - } - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VaultToken = "" - } else { - x.VaultToken = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.StatusDescription = "" - } else { - x.StatusDescription = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Stable = false - } else { - x.Stable = (bool)(r.DecodeBool()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Version = 0 - } else { - x.Version = (uint64)(r.DecodeUint64()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SubmitTime = 0 - } else { - x.SubmitTime = (int64)(r.DecodeInt64()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobModifyIndex = 0 - } else { - x.JobModifyIndex = (uint64)(r.DecodeUint64()) - } - for { - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj40-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobListStub) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(16) - } else { - r.WriteMapStart(16) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ParentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ParentID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ParentID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ParentID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ParentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ParentID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Datacenters == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Datacenters, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Datacenters\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Datacenters`) - } - r.WriteMapElemValue() - if x.Datacenters == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Datacenters, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Type))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Type)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Type\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Type`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Type))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Type)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Priority)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Priority\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Priority`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Priority)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Periodic)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Periodic\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Periodic`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Periodic)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.ParameterizedJob)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ParameterizedJob\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ParameterizedJob`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.ParameterizedJob)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Stop)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Stop\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Stop`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Stop)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Status))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Status)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Status\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Status`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Status))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Status)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.StatusDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.StatusDescription)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"StatusDescription\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `StatusDescription`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.StatusDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.StatusDescription)) - } - } - } - var yyn36 bool - if x.JobSummary == nil { - yyn36 = true - goto LABEL36 - } - LABEL36: - if yyr2 || yy2arr2 { - if yyn36 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.JobSummary == nil { - r.EncodeNil() - } else { - x.JobSummary.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobSummary\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobSummary`) - } - r.WriteMapElemValue() - if yyn36 { - r.EncodeNil() - } else { - if x.JobSummary == nil { - r.EncodeNil() - } else { - x.JobSummary.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.JobModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.JobModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.SubmitTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SubmitTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SubmitTime`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.SubmitTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobListStub) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobListStub) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "ID": - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - case "ParentID": - if r.TryDecodeAsNil() { - x.ParentID = "" - } else { - x.ParentID = (string)(r.DecodeString()) - } - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Datacenters": - if r.TryDecodeAsNil() { - x.Datacenters = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Datacenters, d) - } - } - case "Type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - case "Priority": - if r.TryDecodeAsNil() { - x.Priority = 0 - } else { - x.Priority = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Periodic": - if r.TryDecodeAsNil() { - x.Periodic = false - } else { - x.Periodic = (bool)(r.DecodeBool()) - } - case "ParameterizedJob": - if r.TryDecodeAsNil() { - x.ParameterizedJob = false - } else { - x.ParameterizedJob = (bool)(r.DecodeBool()) - } - case "Stop": - if r.TryDecodeAsNil() { - x.Stop = false - } else { - x.Stop = (bool)(r.DecodeBool()) - } - case "Status": - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - case "StatusDescription": - if r.TryDecodeAsNil() { - x.StatusDescription = "" - } else { - x.StatusDescription = (string)(r.DecodeString()) - } - case "JobSummary": - if r.TryDecodeAsNil() { - if true && x.JobSummary != nil { - x.JobSummary = nil - } - } else { - if x.JobSummary == nil { - x.JobSummary = new(JobSummary) - } - - x.JobSummary.CodecDecodeSelf(d) - } - case "CreateIndex": - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - case "ModifyIndex": - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - case "JobModifyIndex": - if r.TryDecodeAsNil() { - x.JobModifyIndex = 0 - } else { - x.JobModifyIndex = (uint64)(r.DecodeUint64()) - } - case "SubmitTime": - if r.TryDecodeAsNil() { - x.SubmitTime = 0 - } else { - x.SubmitTime = (int64)(r.DecodeInt64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobListStub) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj21 int - var yyb21 bool - var yyhl21 bool = l >= 0 - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ParentID = "" - } else { - x.ParentID = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Datacenters = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Datacenters, d) - } - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Priority = 0 - } else { - x.Priority = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Periodic = false - } else { - x.Periodic = (bool)(r.DecodeBool()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ParameterizedJob = false - } else { - x.ParameterizedJob = (bool)(r.DecodeBool()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Stop = false - } else { - x.Stop = (bool)(r.DecodeBool()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.StatusDescription = "" - } else { - x.StatusDescription = (string)(r.DecodeString()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.JobSummary != nil { - x.JobSummary = nil - } - } else { - if x.JobSummary == nil { - x.JobSummary = new(JobSummary) - } - - x.JobSummary.CodecDecodeSelf(d) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobModifyIndex = 0 - } else { - x.JobModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SubmitTime = 0 - } else { - x.SubmitTime = (int64)(r.DecodeInt64()) - } - for { - yyj21++ - if yyhl21 { - yyb21 = yyj21 > l - } else { - yyb21 = r.CheckBreak() - } - if yyb21 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj21-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobSummary) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(6) - } else { - r.WriteMapStart(6) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Summary == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringTaskGroupSummary((map[string]TaskGroupSummary)(x.Summary), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Summary\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Summary`) - } - r.WriteMapElemValue() - if x.Summary == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringTaskGroupSummary((map[string]TaskGroupSummary)(x.Summary), e) - } - } - } - var yyn12 bool - if x.Children == nil { - yyn12 = true - goto LABEL12 - } - LABEL12: - if yyr2 || yy2arr2 { - if yyn12 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Children == nil { - r.EncodeNil() - } else { - x.Children.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Children\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Children`) - } - r.WriteMapElemValue() - if yyn12 { - r.EncodeNil() - } else { - if x.Children == nil { - r.EncodeNil() - } else { - x.Children.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobSummary) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobSummary) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "JobID": - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "Summary": - if r.TryDecodeAsNil() { - x.Summary = nil - } else { - if false { - } else { - h.decMapstringTaskGroupSummary((*map[string]TaskGroupSummary)(&x.Summary), d) - } - } - case "Children": - if r.TryDecodeAsNil() { - if true && x.Children != nil { - x.Children = nil - } - } else { - if x.Children == nil { - x.Children = new(JobChildrenSummary) - } - - x.Children.CodecDecodeSelf(d) - } - case "CreateIndex": - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - case "ModifyIndex": - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobSummary) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj11 int - var yyb11 bool - var yyhl11 bool = l >= 0 - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Summary = nil - } else { - if false { - } else { - h.decMapstringTaskGroupSummary((*map[string]TaskGroupSummary)(&x.Summary), d) - } - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Children != nil { - x.Children = nil - } - } else { - if x.Children == nil { - x.Children = new(JobChildrenSummary) - } - - x.Children.CodecDecodeSelf(d) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - for { - yyj11++ - if yyhl11 { - yyb11 = yyj11 > l - } else { - yyb11 = r.CheckBreak() - } - if yyb11 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj11-1, "") - } - r.ReadArrayEnd() -} - -func (x *JobChildrenSummary) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(3) - } else { - r.WriteMapStart(3) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Pending)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Pending\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Pending`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Pending)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Running)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Running\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Running`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Running)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Dead)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Dead\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Dead`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Dead)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *JobChildrenSummary) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *JobChildrenSummary) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Pending": - if r.TryDecodeAsNil() { - x.Pending = 0 - } else { - x.Pending = (int64)(r.DecodeInt64()) - } - case "Running": - if r.TryDecodeAsNil() { - x.Running = 0 - } else { - x.Running = (int64)(r.DecodeInt64()) - } - case "Dead": - if r.TryDecodeAsNil() { - x.Dead = 0 - } else { - x.Dead = (int64)(r.DecodeInt64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *JobChildrenSummary) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj7 int - var yyb7 bool - var yyhl7 bool = l >= 0 - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Pending = 0 - } else { - x.Pending = (int64)(r.DecodeInt64()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Running = 0 - } else { - x.Running = (int64)(r.DecodeInt64()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Dead = 0 - } else { - x.Dead = (int64)(r.DecodeInt64()) - } - for { - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj7-1, "") - } - r.ReadArrayEnd() -} - -func (x *TaskGroupSummary) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(6) - } else { - r.WriteMapStart(6) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Queued)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Queued\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Queued`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Queued)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Complete)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Complete\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Complete`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Complete)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Failed)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Failed\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Failed`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Failed)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Running)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Running\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Running`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Running)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Starting)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Starting\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Starting`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Starting)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Lost)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Lost\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Lost`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Lost)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *TaskGroupSummary) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *TaskGroupSummary) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Queued": - if r.TryDecodeAsNil() { - x.Queued = 0 - } else { - x.Queued = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Complete": - if r.TryDecodeAsNil() { - x.Complete = 0 - } else { - x.Complete = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Failed": - if r.TryDecodeAsNil() { - x.Failed = 0 - } else { - x.Failed = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Running": - if r.TryDecodeAsNil() { - x.Running = 0 - } else { - x.Running = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Starting": - if r.TryDecodeAsNil() { - x.Starting = 0 - } else { - x.Starting = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Lost": - if r.TryDecodeAsNil() { - x.Lost = 0 - } else { - x.Lost = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *TaskGroupSummary) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Queued = 0 - } else { - x.Queued = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Complete = 0 - } else { - x.Complete = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Failed = 0 - } else { - x.Failed = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Running = 0 - } else { - x.Running = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Starting = 0 - } else { - x.Starting = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Lost = 0 - } else { - x.Lost = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *UpdateStrategy) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(9) - } else { - r.WriteMapStart(9) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt4 := z.Extension(z.I2Rtid(x.Stagger)); yyxt4 != nil { - z.EncExtension(x.Stagger, yyxt4) - } else { - r.EncodeInt(int64(x.Stagger)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Stagger\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Stagger`) - } - r.WriteMapElemValue() - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.Stagger)); yyxt5 != nil { - z.EncExtension(x.Stagger, yyxt5) - } else { - r.EncodeInt(int64(x.Stagger)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.MaxParallel)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxParallel\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxParallel`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.MaxParallel)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.HealthCheck))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.HealthCheck)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"HealthCheck\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `HealthCheck`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.HealthCheck))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.HealthCheck)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.MinHealthyTime)); yyxt13 != nil { - z.EncExtension(x.MinHealthyTime, yyxt13) - } else { - r.EncodeInt(int64(x.MinHealthyTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinHealthyTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinHealthyTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.MinHealthyTime)); yyxt14 != nil { - z.EncExtension(x.MinHealthyTime, yyxt14) - } else { - r.EncodeInt(int64(x.MinHealthyTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.HealthyDeadline)); yyxt16 != nil { - z.EncExtension(x.HealthyDeadline, yyxt16) - } else { - r.EncodeInt(int64(x.HealthyDeadline)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"HealthyDeadline\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `HealthyDeadline`) - } - r.WriteMapElemValue() - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.HealthyDeadline)); yyxt17 != nil { - z.EncExtension(x.HealthyDeadline, yyxt17) - } else { - r.EncodeInt(int64(x.HealthyDeadline)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt19 := z.Extension(z.I2Rtid(x.ProgressDeadline)); yyxt19 != nil { - z.EncExtension(x.ProgressDeadline, yyxt19) - } else { - r.EncodeInt(int64(x.ProgressDeadline)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ProgressDeadline\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ProgressDeadline`) - } - r.WriteMapElemValue() - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.ProgressDeadline)); yyxt20 != nil { - z.EncExtension(x.ProgressDeadline, yyxt20) - } else { - r.EncodeInt(int64(x.ProgressDeadline)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AutoRevert)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AutoRevert\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AutoRevert`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AutoRevert)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AutoPromote)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AutoPromote\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AutoPromote`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AutoPromote)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Canary)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Canary\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Canary`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Canary)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *UpdateStrategy) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *UpdateStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Stagger": - if r.TryDecodeAsNil() { - x.Stagger = 0 - } else { - if false { - } else if yyxt5 := z.Extension(z.I2Rtid(x.Stagger)); yyxt5 != nil { - z.DecExtension(x.Stagger, yyxt5) - } else { - x.Stagger = (time.Duration)(r.DecodeInt64()) - } - } - case "MaxParallel": - if r.TryDecodeAsNil() { - x.MaxParallel = 0 - } else { - x.MaxParallel = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "HealthCheck": - if r.TryDecodeAsNil() { - x.HealthCheck = "" - } else { - x.HealthCheck = (string)(r.DecodeString()) - } - case "MinHealthyTime": - if r.TryDecodeAsNil() { - x.MinHealthyTime = 0 - } else { - if false { - } else if yyxt9 := z.Extension(z.I2Rtid(x.MinHealthyTime)); yyxt9 != nil { - z.DecExtension(x.MinHealthyTime, yyxt9) - } else { - x.MinHealthyTime = (time.Duration)(r.DecodeInt64()) - } - } - case "HealthyDeadline": - if r.TryDecodeAsNil() { - x.HealthyDeadline = 0 - } else { - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.HealthyDeadline)); yyxt11 != nil { - z.DecExtension(x.HealthyDeadline, yyxt11) - } else { - x.HealthyDeadline = (time.Duration)(r.DecodeInt64()) - } - } - case "ProgressDeadline": - if r.TryDecodeAsNil() { - x.ProgressDeadline = 0 - } else { - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.ProgressDeadline)); yyxt13 != nil { - z.DecExtension(x.ProgressDeadline, yyxt13) - } else { - x.ProgressDeadline = (time.Duration)(r.DecodeInt64()) - } - } - case "AutoRevert": - if r.TryDecodeAsNil() { - x.AutoRevert = false - } else { - x.AutoRevert = (bool)(r.DecodeBool()) - } - case "AutoPromote": - if r.TryDecodeAsNil() { - x.AutoPromote = false - } else { - x.AutoPromote = (bool)(r.DecodeBool()) - } - case "Canary": - if r.TryDecodeAsNil() { - x.Canary = 0 - } else { - x.Canary = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *UpdateStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj17 int - var yyb17 bool - var yyhl17 bool = l >= 0 - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Stagger = 0 - } else { - if false { - } else if yyxt19 := z.Extension(z.I2Rtid(x.Stagger)); yyxt19 != nil { - z.DecExtension(x.Stagger, yyxt19) - } else { - x.Stagger = (time.Duration)(r.DecodeInt64()) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MaxParallel = 0 - } else { - x.MaxParallel = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.HealthCheck = "" - } else { - x.HealthCheck = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MinHealthyTime = 0 - } else { - if false { - } else if yyxt23 := z.Extension(z.I2Rtid(x.MinHealthyTime)); yyxt23 != nil { - z.DecExtension(x.MinHealthyTime, yyxt23) - } else { - x.MinHealthyTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.HealthyDeadline = 0 - } else { - if false { - } else if yyxt25 := z.Extension(z.I2Rtid(x.HealthyDeadline)); yyxt25 != nil { - z.DecExtension(x.HealthyDeadline, yyxt25) - } else { - x.HealthyDeadline = (time.Duration)(r.DecodeInt64()) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ProgressDeadline = 0 - } else { - if false { - } else if yyxt27 := z.Extension(z.I2Rtid(x.ProgressDeadline)); yyxt27 != nil { - z.DecExtension(x.ProgressDeadline, yyxt27) - } else { - x.ProgressDeadline = (time.Duration)(r.DecodeInt64()) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AutoRevert = false - } else { - x.AutoRevert = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AutoPromote = false - } else { - x.AutoPromote = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Canary = 0 - } else { - x.Canary = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - for { - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj17-1, "") - } - r.ReadArrayEnd() -} - -func (x *PeriodicConfig) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Enabled)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Enabled\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Enabled`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Enabled)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Spec))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Spec)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Spec\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Spec`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Spec))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Spec)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SpecType))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SpecType)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SpecType\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SpecType`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SpecType))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SpecType)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.ProhibitOverlap)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ProhibitOverlap\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ProhibitOverlap`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.ProhibitOverlap)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TimeZone))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TimeZone)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TimeZone\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TimeZone`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TimeZone))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TimeZone)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *PeriodicConfig) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *PeriodicConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Enabled": - if r.TryDecodeAsNil() { - x.Enabled = false - } else { - x.Enabled = (bool)(r.DecodeBool()) - } - case "Spec": - if r.TryDecodeAsNil() { - x.Spec = "" - } else { - x.Spec = (string)(r.DecodeString()) - } - case "SpecType": - if r.TryDecodeAsNil() { - x.SpecType = "" - } else { - x.SpecType = (string)(r.DecodeString()) - } - case "ProhibitOverlap": - if r.TryDecodeAsNil() { - x.ProhibitOverlap = false - } else { - x.ProhibitOverlap = (bool)(r.DecodeBool()) - } - case "TimeZone": - if r.TryDecodeAsNil() { - x.TimeZone = "" - } else { - x.TimeZone = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *PeriodicConfig) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Enabled = false - } else { - x.Enabled = (bool)(r.DecodeBool()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Spec = "" - } else { - x.Spec = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SpecType = "" - } else { - x.SpecType = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ProhibitOverlap = false - } else { - x.ProhibitOverlap = (bool)(r.DecodeBool()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TimeZone = "" - } else { - x.TimeZone = (string)(r.DecodeString()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *PeriodicLaunch) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.Launch) - } else if yyxt10 := z.Extension(z.I2Rtid(x.Launch)); yyxt10 != nil { - z.EncExtension(x.Launch, yyxt10) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.Launch) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.Launch) - } else { - z.EncFallback(x.Launch) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Launch\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Launch`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.Launch) - } else if yyxt11 := z.Extension(z.I2Rtid(x.Launch)); yyxt11 != nil { - z.EncExtension(x.Launch, yyxt11) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.Launch) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.Launch) - } else { - z.EncFallback(x.Launch) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *PeriodicLaunch) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *PeriodicLaunch) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "ID": - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "Launch": - if r.TryDecodeAsNil() { - x.Launch = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.Launch = r.DecodeTime() - } else if yyxt7 := z.Extension(z.I2Rtid(x.Launch)); yyxt7 != nil { - z.DecExtension(x.Launch, yyxt7) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.Launch) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.Launch) - } else { - z.DecFallback(&x.Launch, false) - } - } - case "CreateIndex": - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - case "ModifyIndex": - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *PeriodicLaunch) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Launch = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.Launch = r.DecodeTime() - } else if yyxt14 := z.Extension(z.I2Rtid(x.Launch)); yyxt14 != nil { - z.DecExtension(x.Launch, yyxt14) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.Launch) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.Launch) - } else { - z.DecFallback(&x.Launch, false) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *ParameterizedJobConfig) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(3) - } else { - r.WriteMapStart(3) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Payload))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Payload)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Payload\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Payload`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Payload))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Payload)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.MetaRequired == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.MetaRequired, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MetaRequired\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MetaRequired`) - } - r.WriteMapElemValue() - if x.MetaRequired == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.MetaRequired, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.MetaOptional == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.MetaOptional, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MetaOptional\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MetaOptional`) - } - r.WriteMapElemValue() - if x.MetaOptional == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.MetaOptional, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ParameterizedJobConfig) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ParameterizedJobConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Payload": - if r.TryDecodeAsNil() { - x.Payload = "" - } else { - x.Payload = (string)(r.DecodeString()) - } - case "MetaRequired": - if r.TryDecodeAsNil() { - x.MetaRequired = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.MetaRequired, d) - } - } - case "MetaOptional": - if r.TryDecodeAsNil() { - x.MetaOptional = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.MetaOptional, d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ParameterizedJobConfig) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Payload = "" - } else { - x.Payload = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MetaRequired = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.MetaRequired, d) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MetaOptional = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.MetaOptional, d) - } - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *DispatchPayloadConfig) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.File))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.File)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"File\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `File`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.File))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.File)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DispatchPayloadConfig) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *DispatchPayloadConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "File": - if r.TryDecodeAsNil() { - x.File = "" - } else { - x.File = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DispatchPayloadConfig) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj5 int - var yyb5 bool - var yyhl5 bool = l >= 0 - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.File = "" - } else { - x.File = (string)(r.DecodeString()) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *RestartPolicy) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Attempts)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Attempts\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Attempts`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Attempts)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.Interval)); yyxt7 != nil { - z.EncExtension(x.Interval, yyxt7) - } else { - r.EncodeInt(int64(x.Interval)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Interval\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Interval`) - } - r.WriteMapElemValue() - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.Interval)); yyxt8 != nil { - z.EncExtension(x.Interval, yyxt8) - } else { - r.EncodeInt(int64(x.Interval)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.Delay)); yyxt10 != nil { - z.EncExtension(x.Delay, yyxt10) - } else { - r.EncodeInt(int64(x.Delay)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Delay\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Delay`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.Delay)); yyxt11 != nil { - z.EncExtension(x.Delay, yyxt11) - } else { - r.EncodeInt(int64(x.Delay)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Mode))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Mode)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Mode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Mode`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Mode))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Mode)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *RestartPolicy) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *RestartPolicy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Attempts": - if r.TryDecodeAsNil() { - x.Attempts = 0 - } else { - x.Attempts = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Interval": - if r.TryDecodeAsNil() { - x.Interval = 0 - } else { - if false { - } else if yyxt6 := z.Extension(z.I2Rtid(x.Interval)); yyxt6 != nil { - z.DecExtension(x.Interval, yyxt6) - } else { - x.Interval = (time.Duration)(r.DecodeInt64()) - } - } - case "Delay": - if r.TryDecodeAsNil() { - x.Delay = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.Delay)); yyxt8 != nil { - z.DecExtension(x.Delay, yyxt8) - } else { - x.Delay = (time.Duration)(r.DecodeInt64()) - } - } - case "Mode": - if r.TryDecodeAsNil() { - x.Mode = "" - } else { - x.Mode = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *RestartPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Attempts = 0 - } else { - x.Attempts = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Interval = 0 - } else { - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.Interval)); yyxt13 != nil { - z.DecExtension(x.Interval, yyxt13) - } else { - x.Interval = (time.Duration)(r.DecodeInt64()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Delay = 0 - } else { - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.Delay)); yyxt15 != nil { - z.DecExtension(x.Delay, yyxt15) - } else { - x.Delay = (time.Duration)(r.DecodeInt64()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Mode = "" - } else { - x.Mode = (string)(r.DecodeString()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *ReschedulePolicy) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(6) - } else { - r.WriteMapStart(6) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Attempts)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Attempts\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Attempts`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Attempts)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.Interval)); yyxt7 != nil { - z.EncExtension(x.Interval, yyxt7) - } else { - r.EncodeInt(int64(x.Interval)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Interval\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Interval`) - } - r.WriteMapElemValue() - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.Interval)); yyxt8 != nil { - z.EncExtension(x.Interval, yyxt8) - } else { - r.EncodeInt(int64(x.Interval)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.Delay)); yyxt10 != nil { - z.EncExtension(x.Delay, yyxt10) - } else { - r.EncodeInt(int64(x.Delay)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Delay\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Delay`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.Delay)); yyxt11 != nil { - z.EncExtension(x.Delay, yyxt11) - } else { - r.EncodeInt(int64(x.Delay)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DelayFunction))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DelayFunction)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DelayFunction\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DelayFunction`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DelayFunction))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DelayFunction)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.MaxDelay)); yyxt16 != nil { - z.EncExtension(x.MaxDelay, yyxt16) - } else { - r.EncodeInt(int64(x.MaxDelay)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxDelay\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxDelay`) - } - r.WriteMapElemValue() - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.MaxDelay)); yyxt17 != nil { - z.EncExtension(x.MaxDelay, yyxt17) - } else { - r.EncodeInt(int64(x.MaxDelay)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Unlimited)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Unlimited\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Unlimited`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Unlimited)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ReschedulePolicy) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ReschedulePolicy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Attempts": - if r.TryDecodeAsNil() { - x.Attempts = 0 - } else { - x.Attempts = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Interval": - if r.TryDecodeAsNil() { - x.Interval = 0 - } else { - if false { - } else if yyxt6 := z.Extension(z.I2Rtid(x.Interval)); yyxt6 != nil { - z.DecExtension(x.Interval, yyxt6) - } else { - x.Interval = (time.Duration)(r.DecodeInt64()) - } - } - case "Delay": - if r.TryDecodeAsNil() { - x.Delay = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.Delay)); yyxt8 != nil { - z.DecExtension(x.Delay, yyxt8) - } else { - x.Delay = (time.Duration)(r.DecodeInt64()) - } - } - case "DelayFunction": - if r.TryDecodeAsNil() { - x.DelayFunction = "" - } else { - x.DelayFunction = (string)(r.DecodeString()) - } - case "MaxDelay": - if r.TryDecodeAsNil() { - x.MaxDelay = 0 - } else { - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.MaxDelay)); yyxt11 != nil { - z.DecExtension(x.MaxDelay, yyxt11) - } else { - x.MaxDelay = (time.Duration)(r.DecodeInt64()) - } - } - case "Unlimited": - if r.TryDecodeAsNil() { - x.Unlimited = false - } else { - x.Unlimited = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ReschedulePolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Attempts = 0 - } else { - x.Attempts = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Interval = 0 - } else { - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.Interval)); yyxt16 != nil { - z.DecExtension(x.Interval, yyxt16) - } else { - x.Interval = (time.Duration)(r.DecodeInt64()) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Delay = 0 - } else { - if false { - } else if yyxt18 := z.Extension(z.I2Rtid(x.Delay)); yyxt18 != nil { - z.DecExtension(x.Delay, yyxt18) - } else { - x.Delay = (time.Duration)(r.DecodeInt64()) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DelayFunction = "" - } else { - x.DelayFunction = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MaxDelay = 0 - } else { - if false { - } else if yyxt21 := z.Extension(z.I2Rtid(x.MaxDelay)); yyxt21 != nil { - z.DecExtension(x.MaxDelay, yyxt21) - } else { - x.MaxDelay = (time.Duration)(r.DecodeInt64()) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Unlimited = false - } else { - x.Unlimited = (bool)(r.DecodeBool()) - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-1, "") - } - r.ReadArrayEnd() -} - -func (x *MigrateStrategy) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.MaxParallel)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxParallel\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxParallel`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.MaxParallel)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.HealthCheck))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.HealthCheck)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"HealthCheck\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `HealthCheck`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.HealthCheck))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.HealthCheck)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.MinHealthyTime)); yyxt10 != nil { - z.EncExtension(x.MinHealthyTime, yyxt10) - } else { - r.EncodeInt(int64(x.MinHealthyTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinHealthyTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinHealthyTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.MinHealthyTime)); yyxt11 != nil { - z.EncExtension(x.MinHealthyTime, yyxt11) - } else { - r.EncodeInt(int64(x.MinHealthyTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.HealthyDeadline)); yyxt13 != nil { - z.EncExtension(x.HealthyDeadline, yyxt13) - } else { - r.EncodeInt(int64(x.HealthyDeadline)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"HealthyDeadline\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `HealthyDeadline`) - } - r.WriteMapElemValue() - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.HealthyDeadline)); yyxt14 != nil { - z.EncExtension(x.HealthyDeadline, yyxt14) - } else { - r.EncodeInt(int64(x.HealthyDeadline)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *MigrateStrategy) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *MigrateStrategy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "MaxParallel": - if r.TryDecodeAsNil() { - x.MaxParallel = 0 - } else { - x.MaxParallel = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "HealthCheck": - if r.TryDecodeAsNil() { - x.HealthCheck = "" - } else { - x.HealthCheck = (string)(r.DecodeString()) - } - case "MinHealthyTime": - if r.TryDecodeAsNil() { - x.MinHealthyTime = 0 - } else { - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.MinHealthyTime)); yyxt7 != nil { - z.DecExtension(x.MinHealthyTime, yyxt7) - } else { - x.MinHealthyTime = (time.Duration)(r.DecodeInt64()) - } - } - case "HealthyDeadline": - if r.TryDecodeAsNil() { - x.HealthyDeadline = 0 - } else { - if false { - } else if yyxt9 := z.Extension(z.I2Rtid(x.HealthyDeadline)); yyxt9 != nil { - z.DecExtension(x.HealthyDeadline, yyxt9) - } else { - x.HealthyDeadline = (time.Duration)(r.DecodeInt64()) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *MigrateStrategy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MaxParallel = 0 - } else { - x.MaxParallel = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.HealthCheck = "" - } else { - x.HealthCheck = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MinHealthyTime = 0 - } else { - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.MinHealthyTime)); yyxt14 != nil { - z.DecExtension(x.MinHealthyTime, yyxt14) - } else { - x.MinHealthyTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.HealthyDeadline = 0 - } else { - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.HealthyDeadline)); yyxt16 != nil { - z.DecExtension(x.HealthyDeadline, yyxt16) - } else { - x.HealthyDeadline = (time.Duration)(r.DecodeInt64()) - } - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *TaskGroup) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(15) - } else { - r.WriteMapStart(15) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Count)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Count\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Count`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Count)) - } - } - var yyn9 bool - if x.Update == nil { - yyn9 = true - goto LABEL9 - } - LABEL9: - if yyr2 || yy2arr2 { - if yyn9 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Update == nil { - r.EncodeNil() - } else { - x.Update.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Update\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Update`) - } - r.WriteMapElemValue() - if yyn9 { - r.EncodeNil() - } else { - if x.Update == nil { - r.EncodeNil() - } else { - x.Update.CodecEncodeSelf(e) - } - } - } - var yyn12 bool - if x.Migrate == nil { - yyn12 = true - goto LABEL12 - } - LABEL12: - if yyr2 || yy2arr2 { - if yyn12 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Migrate == nil { - r.EncodeNil() - } else { - x.Migrate.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Migrate\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Migrate`) - } - r.WriteMapElemValue() - if yyn12 { - r.EncodeNil() - } else { - if x.Migrate == nil { - r.EncodeNil() - } else { - x.Migrate.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Constraints == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoConstraint(([]*Constraint)(x.Constraints), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Constraints\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Constraints`) - } - r.WriteMapElemValue() - if x.Constraints == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoConstraint(([]*Constraint)(x.Constraints), e) - } - } - } - var yyn18 bool - if x.RestartPolicy == nil { - yyn18 = true - goto LABEL18 - } - LABEL18: - if yyr2 || yy2arr2 { - if yyn18 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.RestartPolicy == nil { - r.EncodeNil() - } else { - x.RestartPolicy.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RestartPolicy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RestartPolicy`) - } - r.WriteMapElemValue() - if yyn18 { - r.EncodeNil() - } else { - if x.RestartPolicy == nil { - r.EncodeNil() - } else { - x.RestartPolicy.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Tasks == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoTask(([]*Task)(x.Tasks), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Tasks\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Tasks`) - } - r.WriteMapElemValue() - if x.Tasks == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoTask(([]*Task)(x.Tasks), e) - } - } - } - var yyn24 bool - if x.EphemeralDisk == nil { - yyn24 = true - goto LABEL24 - } - LABEL24: - if yyr2 || yy2arr2 { - if yyn24 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.EphemeralDisk == nil { - r.EncodeNil() - } else { - x.EphemeralDisk.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EphemeralDisk\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EphemeralDisk`) - } - r.WriteMapElemValue() - if yyn24 { - r.EncodeNil() - } else { - if x.EphemeralDisk == nil { - r.EncodeNil() - } else { - x.EphemeralDisk.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Meta, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Meta\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Meta`) - } - r.WriteMapElemValue() - if x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Meta, e) - } - } - } - var yyn30 bool - if x.ReschedulePolicy == nil { - yyn30 = true - goto LABEL30 - } - LABEL30: - if yyr2 || yy2arr2 { - if yyn30 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ReschedulePolicy == nil { - r.EncodeNil() - } else { - x.ReschedulePolicy.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ReschedulePolicy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ReschedulePolicy`) - } - r.WriteMapElemValue() - if yyn30 { - r.EncodeNil() - } else { - if x.ReschedulePolicy == nil { - r.EncodeNil() - } else { - x.ReschedulePolicy.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Affinities == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAffinity(([]*Affinity)(x.Affinities), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Affinities\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Affinities`) - } - r.WriteMapElemValue() - if x.Affinities == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAffinity(([]*Affinity)(x.Affinities), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Spreads == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoSpread(([]*Spread)(x.Spreads), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Spreads\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Spreads`) - } - r.WriteMapElemValue() - if x.Spreads == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoSpread(([]*Spread)(x.Spreads), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Networks == nil { - r.EncodeNil() - } else { - x.Networks.CodecEncodeSelf(e) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Networks\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Networks`) - } - r.WriteMapElemValue() - if x.Networks == nil { - r.EncodeNil() - } else { - x.Networks.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Services == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoService(([]*Service)(x.Services), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Services\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Services`) - } - r.WriteMapElemValue() - if x.Services == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoService(([]*Service)(x.Services), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Volumes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoVolumeRequest((map[string]*VolumeRequest)(x.Volumes), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Volumes\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Volumes`) - } - r.WriteMapElemValue() - if x.Volumes == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoVolumeRequest((map[string]*VolumeRequest)(x.Volumes), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *TaskGroup) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *TaskGroup) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Count": - if r.TryDecodeAsNil() { - x.Count = 0 - } else { - x.Count = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Update": - if r.TryDecodeAsNil() { - if true && x.Update != nil { - x.Update = nil - } - } else { - if x.Update == nil { - x.Update = new(UpdateStrategy) - } - - x.Update.CodecDecodeSelf(d) - } - case "Migrate": - if r.TryDecodeAsNil() { - if true && x.Migrate != nil { - x.Migrate = nil - } - } else { - if x.Migrate == nil { - x.Migrate = new(MigrateStrategy) - } - - x.Migrate.CodecDecodeSelf(d) - } - case "Constraints": - if r.TryDecodeAsNil() { - x.Constraints = nil - } else { - if false { - } else { - h.decSlicePtrtoConstraint((*[]*Constraint)(&x.Constraints), d) - } - } - case "RestartPolicy": - if r.TryDecodeAsNil() { - if true && x.RestartPolicy != nil { - x.RestartPolicy = nil - } - } else { - if x.RestartPolicy == nil { - x.RestartPolicy = new(RestartPolicy) - } - - x.RestartPolicy.CodecDecodeSelf(d) - } - case "Tasks": - if r.TryDecodeAsNil() { - x.Tasks = nil - } else { - if false { - } else { - h.decSlicePtrtoTask((*[]*Task)(&x.Tasks), d) - } - } - case "EphemeralDisk": - if r.TryDecodeAsNil() { - if true && x.EphemeralDisk != nil { - x.EphemeralDisk = nil - } - } else { - if x.EphemeralDisk == nil { - x.EphemeralDisk = new(EphemeralDisk) - } - - x.EphemeralDisk.CodecDecodeSelf(d) - } - case "Meta": - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Meta, d) - } - } - case "ReschedulePolicy": - if r.TryDecodeAsNil() { - if true && x.ReschedulePolicy != nil { - x.ReschedulePolicy = nil - } - } else { - if x.ReschedulePolicy == nil { - x.ReschedulePolicy = new(ReschedulePolicy) - } - - x.ReschedulePolicy.CodecDecodeSelf(d) - } - case "Affinities": - if r.TryDecodeAsNil() { - x.Affinities = nil - } else { - if false { - } else { - h.decSlicePtrtoAffinity((*[]*Affinity)(&x.Affinities), d) - } - } - case "Spreads": - if r.TryDecodeAsNil() { - x.Spreads = nil - } else { - if false { - } else { - h.decSlicePtrtoSpread((*[]*Spread)(&x.Spreads), d) - } - } - case "Networks": - if r.TryDecodeAsNil() { - x.Networks = nil - } else { - x.Networks.CodecDecodeSelf(d) - } - case "Services": - if r.TryDecodeAsNil() { - x.Services = nil - } else { - if false { - } else { - h.decSlicePtrtoService((*[]*Service)(&x.Services), d) - } - } - case "Volumes": - if r.TryDecodeAsNil() { - x.Volumes = nil - } else { - if false { - } else { - h.decMapstringPtrtoVolumeRequest((*map[string]*VolumeRequest)(&x.Volumes), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *TaskGroup) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj26 int - var yyb26 bool - var yyhl26 bool = l >= 0 - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Count = 0 - } else { - x.Count = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Update != nil { - x.Update = nil - } - } else { - if x.Update == nil { - x.Update = new(UpdateStrategy) - } - - x.Update.CodecDecodeSelf(d) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Migrate != nil { - x.Migrate = nil - } - } else { - if x.Migrate == nil { - x.Migrate = new(MigrateStrategy) - } - - x.Migrate.CodecDecodeSelf(d) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Constraints = nil - } else { - if false { - } else { - h.decSlicePtrtoConstraint((*[]*Constraint)(&x.Constraints), d) - } - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.RestartPolicy != nil { - x.RestartPolicy = nil - } - } else { - if x.RestartPolicy == nil { - x.RestartPolicy = new(RestartPolicy) - } - - x.RestartPolicy.CodecDecodeSelf(d) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Tasks = nil - } else { - if false { - } else { - h.decSlicePtrtoTask((*[]*Task)(&x.Tasks), d) - } - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.EphemeralDisk != nil { - x.EphemeralDisk = nil - } - } else { - if x.EphemeralDisk == nil { - x.EphemeralDisk = new(EphemeralDisk) - } - - x.EphemeralDisk.CodecDecodeSelf(d) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Meta, d) - } - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.ReschedulePolicy != nil { - x.ReschedulePolicy = nil - } - } else { - if x.ReschedulePolicy == nil { - x.ReschedulePolicy = new(ReschedulePolicy) - } - - x.ReschedulePolicy.CodecDecodeSelf(d) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Affinities = nil - } else { - if false { - } else { - h.decSlicePtrtoAffinity((*[]*Affinity)(&x.Affinities), d) - } - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Spreads = nil - } else { - if false { - } else { - h.decSlicePtrtoSpread((*[]*Spread)(&x.Spreads), d) - } - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Networks = nil - } else { - x.Networks.CodecDecodeSelf(d) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Services = nil - } else { - if false { - } else { - h.decSlicePtrtoService((*[]*Service)(&x.Services), d) - } - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Volumes = nil - } else { - if false { - } else { - h.decMapstringPtrtoVolumeRequest((*map[string]*VolumeRequest)(&x.Volumes), d) - } - } - for { - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj26-1, "") - } - r.ReadArrayEnd() -} - -func (x *CheckRestart) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(3) - } else { - r.WriteMapStart(3) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Limit)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Limit\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Limit`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Limit)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.Grace)); yyxt7 != nil { - z.EncExtension(x.Grace, yyxt7) - } else { - r.EncodeInt(int64(x.Grace)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Grace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Grace`) - } - r.WriteMapElemValue() - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.Grace)); yyxt8 != nil { - z.EncExtension(x.Grace, yyxt8) - } else { - r.EncodeInt(int64(x.Grace)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.IgnoreWarnings)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"IgnoreWarnings\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `IgnoreWarnings`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.IgnoreWarnings)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *CheckRestart) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *CheckRestart) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Limit": - if r.TryDecodeAsNil() { - x.Limit = 0 - } else { - x.Limit = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Grace": - if r.TryDecodeAsNil() { - x.Grace = 0 - } else { - if false { - } else if yyxt6 := z.Extension(z.I2Rtid(x.Grace)); yyxt6 != nil { - z.DecExtension(x.Grace, yyxt6) - } else { - x.Grace = (time.Duration)(r.DecodeInt64()) - } - } - case "IgnoreWarnings": - if r.TryDecodeAsNil() { - x.IgnoreWarnings = false - } else { - x.IgnoreWarnings = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *CheckRestart) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj8 int - var yyb8 bool - var yyhl8 bool = l >= 0 - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Limit = 0 - } else { - x.Limit = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Grace = 0 - } else { - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.Grace)); yyxt11 != nil { - z.DecExtension(x.Grace, yyxt11) - } else { - x.Grace = (time.Duration)(r.DecodeInt64()) - } - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.IgnoreWarnings = false - } else { - x.IgnoreWarnings = (bool)(r.DecodeBool()) - } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj8-1, "") - } - r.ReadArrayEnd() -} - -func (x *LogConfig) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(2) - } else { - r.WriteMapStart(2) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.MaxFiles)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxFiles\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxFiles`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.MaxFiles)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.MaxFileSizeMB)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxFileSizeMB\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxFileSizeMB`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.MaxFileSizeMB)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *LogConfig) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *LogConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "MaxFiles": - if r.TryDecodeAsNil() { - x.MaxFiles = 0 - } else { - x.MaxFiles = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "MaxFileSizeMB": - if r.TryDecodeAsNil() { - x.MaxFileSizeMB = 0 - } else { - x.MaxFileSizeMB = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *LogConfig) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MaxFiles = 0 - } else { - x.MaxFiles = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.MaxFileSizeMB = 0 - } else { - x.MaxFileSizeMB = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj6-1, "") - } - r.ReadArrayEnd() -} - -func (x *Task) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(21) - } else { - r.WriteMapStart(21) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Driver))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Driver)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Driver\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Driver`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Driver))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Driver)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.User))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.User)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"User\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `User`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.User))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.User)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Config == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntfV(x.Config, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Config\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Config`) - } - r.WriteMapElemValue() - if x.Config == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntfV(x.Config, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Env == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Env, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Env\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Env`) - } - r.WriteMapElemValue() - if x.Env == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Env, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Services == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoService(([]*Service)(x.Services), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Services\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Services`) - } - r.WriteMapElemValue() - if x.Services == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoService(([]*Service)(x.Services), e) - } - } - } - var yyn21 bool - if x.Vault == nil { - yyn21 = true - goto LABEL21 - } - LABEL21: - if yyr2 || yy2arr2 { - if yyn21 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Vault == nil { - r.EncodeNil() - } else { - x.Vault.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Vault\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Vault`) - } - r.WriteMapElemValue() - if yyn21 { - r.EncodeNil() - } else { - if x.Vault == nil { - r.EncodeNil() - } else { - x.Vault.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Templates == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoTemplate(([]*Template)(x.Templates), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Templates\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Templates`) - } - r.WriteMapElemValue() - if x.Templates == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoTemplate(([]*Template)(x.Templates), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Constraints == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoConstraint(([]*Constraint)(x.Constraints), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Constraints\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Constraints`) - } - r.WriteMapElemValue() - if x.Constraints == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoConstraint(([]*Constraint)(x.Constraints), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Affinities == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAffinity(([]*Affinity)(x.Affinities), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Affinities\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Affinities`) - } - r.WriteMapElemValue() - if x.Affinities == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAffinity(([]*Affinity)(x.Affinities), e) - } - } - } - var yyn33 bool - if x.Resources == nil { - yyn33 = true - goto LABEL33 - } - LABEL33: - if yyr2 || yy2arr2 { - if yyn33 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Resources == nil { - r.EncodeNil() - } else { - x.Resources.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Resources\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Resources`) - } - r.WriteMapElemValue() - if yyn33 { - r.EncodeNil() - } else { - if x.Resources == nil { - r.EncodeNil() - } else { - x.Resources.CodecEncodeSelf(e) - } - } - } - var yyn36 bool - if x.DispatchPayload == nil { - yyn36 = true - goto LABEL36 - } - LABEL36: - if yyr2 || yy2arr2 { - if yyn36 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.DispatchPayload == nil { - r.EncodeNil() - } else { - x.DispatchPayload.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DispatchPayload\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DispatchPayload`) - } - r.WriteMapElemValue() - if yyn36 { - r.EncodeNil() - } else { - if x.DispatchPayload == nil { - r.EncodeNil() - } else { - x.DispatchPayload.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Meta, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Meta\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Meta`) - } - r.WriteMapElemValue() - if x.Meta == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Meta, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt43 := z.Extension(z.I2Rtid(x.KillTimeout)); yyxt43 != nil { - z.EncExtension(x.KillTimeout, yyxt43) - } else { - r.EncodeInt(int64(x.KillTimeout)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KillTimeout\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KillTimeout`) - } - r.WriteMapElemValue() - if false { - } else if yyxt44 := z.Extension(z.I2Rtid(x.KillTimeout)); yyxt44 != nil { - z.EncExtension(x.KillTimeout, yyxt44) - } else { - r.EncodeInt(int64(x.KillTimeout)) - } - } - var yyn45 bool - if x.LogConfig == nil { - yyn45 = true - goto LABEL45 - } - LABEL45: - if yyr2 || yy2arr2 { - if yyn45 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.LogConfig == nil { - r.EncodeNil() - } else { - x.LogConfig.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LogConfig\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LogConfig`) - } - r.WriteMapElemValue() - if yyn45 { - r.EncodeNil() - } else { - if x.LogConfig == nil { - r.EncodeNil() - } else { - x.LogConfig.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Artifacts == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoTaskArtifact(([]*TaskArtifact)(x.Artifacts), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Artifacts\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Artifacts`) - } - r.WriteMapElemValue() - if x.Artifacts == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoTaskArtifact(([]*TaskArtifact)(x.Artifacts), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Leader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Leader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Leader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Leader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt55 := z.Extension(z.I2Rtid(x.ShutdownDelay)); yyxt55 != nil { - z.EncExtension(x.ShutdownDelay, yyxt55) - } else { - r.EncodeInt(int64(x.ShutdownDelay)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ShutdownDelay\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ShutdownDelay`) - } - r.WriteMapElemValue() - if false { - } else if yyxt56 := z.Extension(z.I2Rtid(x.ShutdownDelay)); yyxt56 != nil { - z.EncExtension(x.ShutdownDelay, yyxt56) - } else { - r.EncodeInt(int64(x.ShutdownDelay)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.VolumeMounts == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoVolumeMount(([]*VolumeMount)(x.VolumeMounts), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"VolumeMounts\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `VolumeMounts`) - } - r.WriteMapElemValue() - if x.VolumeMounts == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoVolumeMount(([]*VolumeMount)(x.VolumeMounts), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.KillSignal))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.KillSignal)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KillSignal\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KillSignal`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.KillSignal))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.KillSignal)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - x.Kind.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Kind\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Kind`) - } - r.WriteMapElemValue() - x.Kind.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *Task) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *Task) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Driver": - if r.TryDecodeAsNil() { - x.Driver = "" - } else { - x.Driver = (string)(r.DecodeString()) - } - case "User": - if r.TryDecodeAsNil() { - x.User = "" - } else { - x.User = (string)(r.DecodeString()) - } - case "Config": - if r.TryDecodeAsNil() { - x.Config = nil - } else { - if false { - } else { - z.F.DecMapStringIntfX(&x.Config, d) - } - } - case "Env": - if r.TryDecodeAsNil() { - x.Env = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Env, d) - } - } - case "Services": - if r.TryDecodeAsNil() { - x.Services = nil - } else { - if false { - } else { - h.decSlicePtrtoService((*[]*Service)(&x.Services), d) - } - } - case "Vault": - if r.TryDecodeAsNil() { - if true && x.Vault != nil { - x.Vault = nil - } - } else { - if x.Vault == nil { - x.Vault = new(Vault) - } - - x.Vault.CodecDecodeSelf(d) - } - case "Templates": - if r.TryDecodeAsNil() { - x.Templates = nil - } else { - if false { - } else { - h.decSlicePtrtoTemplate((*[]*Template)(&x.Templates), d) - } - } - case "Constraints": - if r.TryDecodeAsNil() { - x.Constraints = nil - } else { - if false { - } else { - h.decSlicePtrtoConstraint((*[]*Constraint)(&x.Constraints), d) - } - } - case "Affinities": - if r.TryDecodeAsNil() { - x.Affinities = nil - } else { - if false { - } else { - h.decSlicePtrtoAffinity((*[]*Affinity)(&x.Affinities), d) - } - } - case "Resources": - if r.TryDecodeAsNil() { - if true && x.Resources != nil { - x.Resources = nil - } - } else { - if x.Resources == nil { - x.Resources = new(Resources) - } - - x.Resources.CodecDecodeSelf(d) - } - case "DispatchPayload": - if r.TryDecodeAsNil() { - if true && x.DispatchPayload != nil { - x.DispatchPayload = nil - } - } else { - if x.DispatchPayload == nil { - x.DispatchPayload = new(DispatchPayloadConfig) - } - - x.DispatchPayload.CodecDecodeSelf(d) - } - case "Meta": - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Meta, d) - } - } - case "KillTimeout": - if r.TryDecodeAsNil() { - x.KillTimeout = 0 - } else { - if false { - } else if yyxt25 := z.Extension(z.I2Rtid(x.KillTimeout)); yyxt25 != nil { - z.DecExtension(x.KillTimeout, yyxt25) - } else { - x.KillTimeout = (time.Duration)(r.DecodeInt64()) - } - } - case "LogConfig": - if r.TryDecodeAsNil() { - if true && x.LogConfig != nil { - x.LogConfig = nil - } - } else { - if x.LogConfig == nil { - x.LogConfig = new(LogConfig) - } - - x.LogConfig.CodecDecodeSelf(d) - } - case "Artifacts": - if r.TryDecodeAsNil() { - x.Artifacts = nil - } else { - if false { - } else { - h.decSlicePtrtoTaskArtifact((*[]*TaskArtifact)(&x.Artifacts), d) - } - } - case "Leader": - if r.TryDecodeAsNil() { - x.Leader = false - } else { - x.Leader = (bool)(r.DecodeBool()) - } - case "ShutdownDelay": - if r.TryDecodeAsNil() { - x.ShutdownDelay = 0 - } else { - if false { - } else if yyxt31 := z.Extension(z.I2Rtid(x.ShutdownDelay)); yyxt31 != nil { - z.DecExtension(x.ShutdownDelay, yyxt31) - } else { - x.ShutdownDelay = (time.Duration)(r.DecodeInt64()) - } - } - case "VolumeMounts": - if r.TryDecodeAsNil() { - x.VolumeMounts = nil - } else { - if false { - } else { - h.decSlicePtrtoVolumeMount((*[]*VolumeMount)(&x.VolumeMounts), d) - } - } - case "KillSignal": - if r.TryDecodeAsNil() { - x.KillSignal = "" - } else { - x.KillSignal = (string)(r.DecodeString()) - } - case "Kind": - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind.CodecDecodeSelf(d) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *Task) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj36 int - var yyb36 bool - var yyhl36 bool = l >= 0 - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Driver = "" - } else { - x.Driver = (string)(r.DecodeString()) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.User = "" - } else { - x.User = (string)(r.DecodeString()) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Config = nil - } else { - if false { - } else { - z.F.DecMapStringIntfX(&x.Config, d) - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Env = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Env, d) - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Services = nil - } else { - if false { - } else { - h.decSlicePtrtoService((*[]*Service)(&x.Services), d) - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Vault != nil { - x.Vault = nil - } - } else { - if x.Vault == nil { - x.Vault = new(Vault) - } - - x.Vault.CodecDecodeSelf(d) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Templates = nil - } else { - if false { - } else { - h.decSlicePtrtoTemplate((*[]*Template)(&x.Templates), d) - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Constraints = nil - } else { - if false { - } else { - h.decSlicePtrtoConstraint((*[]*Constraint)(&x.Constraints), d) - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Affinities = nil - } else { - if false { - } else { - h.decSlicePtrtoAffinity((*[]*Affinity)(&x.Affinities), d) - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Resources != nil { - x.Resources = nil - } - } else { - if x.Resources == nil { - x.Resources = new(Resources) - } - - x.Resources.CodecDecodeSelf(d) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.DispatchPayload != nil { - x.DispatchPayload = nil - } - } else { - if x.DispatchPayload == nil { - x.DispatchPayload = new(DispatchPayloadConfig) - } - - x.DispatchPayload.CodecDecodeSelf(d) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Meta = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Meta, d) - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.KillTimeout = 0 - } else { - if false { - } else if yyxt58 := z.Extension(z.I2Rtid(x.KillTimeout)); yyxt58 != nil { - z.DecExtension(x.KillTimeout, yyxt58) - } else { - x.KillTimeout = (time.Duration)(r.DecodeInt64()) - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.LogConfig != nil { - x.LogConfig = nil - } - } else { - if x.LogConfig == nil { - x.LogConfig = new(LogConfig) - } - - x.LogConfig.CodecDecodeSelf(d) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Artifacts = nil - } else { - if false { - } else { - h.decSlicePtrtoTaskArtifact((*[]*TaskArtifact)(&x.Artifacts), d) - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Leader = false - } else { - x.Leader = (bool)(r.DecodeBool()) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ShutdownDelay = 0 - } else { - if false { - } else if yyxt64 := z.Extension(z.I2Rtid(x.ShutdownDelay)); yyxt64 != nil { - z.DecExtension(x.ShutdownDelay, yyxt64) - } else { - x.ShutdownDelay = (time.Duration)(r.DecodeInt64()) - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VolumeMounts = nil - } else { - if false { - } else { - h.decSlicePtrtoVolumeMount((*[]*VolumeMount)(&x.VolumeMounts), d) - } - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.KillSignal = "" - } else { - x.KillSignal = (string)(r.DecodeString()) - } - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Kind = "" - } else { - x.Kind.CodecDecodeSelf(d) - } - for { - yyj36++ - if yyhl36 { - yyb36 = yyj36 > l - } else { - yyb36 = r.CheckBreak() - } - if yyb36 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj36-1, "") - } - r.ReadArrayEnd() -} - -func (x TaskKind) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x)) - } - } -} - -func (x *TaskKind) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - *x = (TaskKind)(r.DecodeString()) - } -} - -func (x *Template) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(11) - } else { - r.WriteMapStart(11) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SourcePath))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SourcePath)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SourcePath\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SourcePath`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SourcePath))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SourcePath)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DestPath))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DestPath)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DestPath\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DestPath`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DestPath))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DestPath)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EmbeddedTmpl))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EmbeddedTmpl)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EmbeddedTmpl\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EmbeddedTmpl`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EmbeddedTmpl))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EmbeddedTmpl)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ChangeMode))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ChangeMode)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ChangeMode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ChangeMode`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ChangeMode))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ChangeMode)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ChangeSignal))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ChangeSignal)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ChangeSignal\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ChangeSignal`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ChangeSignal))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ChangeSignal)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt19 := z.Extension(z.I2Rtid(x.Splay)); yyxt19 != nil { - z.EncExtension(x.Splay, yyxt19) - } else { - r.EncodeInt(int64(x.Splay)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Splay\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Splay`) - } - r.WriteMapElemValue() - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.Splay)); yyxt20 != nil { - z.EncExtension(x.Splay, yyxt20) - } else { - r.EncodeInt(int64(x.Splay)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Perms))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Perms)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Perms\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Perms`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Perms))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Perms)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LeftDelim))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.LeftDelim)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LeftDelim\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LeftDelim`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LeftDelim))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.LeftDelim)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.RightDelim))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.RightDelim)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RightDelim\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RightDelim`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.RightDelim))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.RightDelim)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Envvars)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Envvars\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Envvars`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Envvars)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt34 := z.Extension(z.I2Rtid(x.VaultGrace)); yyxt34 != nil { - z.EncExtension(x.VaultGrace, yyxt34) - } else { - r.EncodeInt(int64(x.VaultGrace)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"VaultGrace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `VaultGrace`) - } - r.WriteMapElemValue() - if false { - } else if yyxt35 := z.Extension(z.I2Rtid(x.VaultGrace)); yyxt35 != nil { - z.EncExtension(x.VaultGrace, yyxt35) - } else { - r.EncodeInt(int64(x.VaultGrace)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *Template) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *Template) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "SourcePath": - if r.TryDecodeAsNil() { - x.SourcePath = "" - } else { - x.SourcePath = (string)(r.DecodeString()) - } - case "DestPath": - if r.TryDecodeAsNil() { - x.DestPath = "" - } else { - x.DestPath = (string)(r.DecodeString()) - } - case "EmbeddedTmpl": - if r.TryDecodeAsNil() { - x.EmbeddedTmpl = "" - } else { - x.EmbeddedTmpl = (string)(r.DecodeString()) - } - case "ChangeMode": - if r.TryDecodeAsNil() { - x.ChangeMode = "" - } else { - x.ChangeMode = (string)(r.DecodeString()) - } - case "ChangeSignal": - if r.TryDecodeAsNil() { - x.ChangeSignal = "" - } else { - x.ChangeSignal = (string)(r.DecodeString()) - } - case "Splay": - if r.TryDecodeAsNil() { - x.Splay = 0 - } else { - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.Splay)); yyxt10 != nil { - z.DecExtension(x.Splay, yyxt10) - } else { - x.Splay = (time.Duration)(r.DecodeInt64()) - } - } - case "Perms": - if r.TryDecodeAsNil() { - x.Perms = "" - } else { - x.Perms = (string)(r.DecodeString()) - } - case "LeftDelim": - if r.TryDecodeAsNil() { - x.LeftDelim = "" - } else { - x.LeftDelim = (string)(r.DecodeString()) - } - case "RightDelim": - if r.TryDecodeAsNil() { - x.RightDelim = "" - } else { - x.RightDelim = (string)(r.DecodeString()) - } - case "Envvars": - if r.TryDecodeAsNil() { - x.Envvars = false - } else { - x.Envvars = (bool)(r.DecodeBool()) - } - case "VaultGrace": - if r.TryDecodeAsNil() { - x.VaultGrace = 0 - } else { - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.VaultGrace)); yyxt16 != nil { - z.DecExtension(x.VaultGrace, yyxt16) - } else { - x.VaultGrace = (time.Duration)(r.DecodeInt64()) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *Template) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj17 int - var yyb17 bool - var yyhl17 bool = l >= 0 - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SourcePath = "" - } else { - x.SourcePath = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DestPath = "" - } else { - x.DestPath = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EmbeddedTmpl = "" - } else { - x.EmbeddedTmpl = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ChangeMode = "" - } else { - x.ChangeMode = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ChangeSignal = "" - } else { - x.ChangeSignal = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Splay = 0 - } else { - if false { - } else if yyxt24 := z.Extension(z.I2Rtid(x.Splay)); yyxt24 != nil { - z.DecExtension(x.Splay, yyxt24) - } else { - x.Splay = (time.Duration)(r.DecodeInt64()) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Perms = "" - } else { - x.Perms = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LeftDelim = "" - } else { - x.LeftDelim = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RightDelim = "" - } else { - x.RightDelim = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Envvars = false - } else { - x.Envvars = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VaultGrace = 0 - } else { - if false { - } else if yyxt30 := z.Extension(z.I2Rtid(x.VaultGrace)); yyxt30 != nil { - z.DecExtension(x.VaultGrace, yyxt30) - } else { - x.VaultGrace = (time.Duration)(r.DecodeInt64()) - } - } - for { - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj17-1, "") - } - r.ReadArrayEnd() -} - -func (x *TaskState) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(7) - } else { - r.WriteMapStart(7) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.State))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.State)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"State\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `State`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.State))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.State)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Failed)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Failed\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Failed`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Failed)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Restarts)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Restarts\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Restarts`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Restarts)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.LastRestart) - } else if yyxt13 := z.Extension(z.I2Rtid(x.LastRestart)); yyxt13 != nil { - z.EncExtension(x.LastRestart, yyxt13) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.LastRestart) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.LastRestart) - } else { - z.EncFallback(x.LastRestart) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastRestart\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastRestart`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.LastRestart) - } else if yyxt14 := z.Extension(z.I2Rtid(x.LastRestart)); yyxt14 != nil { - z.EncExtension(x.LastRestart, yyxt14) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.LastRestart) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.LastRestart) - } else { - z.EncFallback(x.LastRestart) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.StartedAt) - } else if yyxt16 := z.Extension(z.I2Rtid(x.StartedAt)); yyxt16 != nil { - z.EncExtension(x.StartedAt, yyxt16) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.StartedAt) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.StartedAt) - } else { - z.EncFallback(x.StartedAt) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"StartedAt\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `StartedAt`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.StartedAt) - } else if yyxt17 := z.Extension(z.I2Rtid(x.StartedAt)); yyxt17 != nil { - z.EncExtension(x.StartedAt, yyxt17) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.StartedAt) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.StartedAt) - } else { - z.EncFallback(x.StartedAt) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.FinishedAt) - } else if yyxt19 := z.Extension(z.I2Rtid(x.FinishedAt)); yyxt19 != nil { - z.EncExtension(x.FinishedAt, yyxt19) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.FinishedAt) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.FinishedAt) - } else { - z.EncFallback(x.FinishedAt) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"FinishedAt\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `FinishedAt`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.FinishedAt) - } else if yyxt20 := z.Extension(z.I2Rtid(x.FinishedAt)); yyxt20 != nil { - z.EncExtension(x.FinishedAt, yyxt20) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.FinishedAt) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.FinishedAt) - } else { - z.EncFallback(x.FinishedAt) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Events == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoTaskEvent(([]*TaskEvent)(x.Events), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Events\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Events`) - } - r.WriteMapElemValue() - if x.Events == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoTaskEvent(([]*TaskEvent)(x.Events), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *TaskState) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *TaskState) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "State": - if r.TryDecodeAsNil() { - x.State = "" - } else { - x.State = (string)(r.DecodeString()) - } - case "Failed": - if r.TryDecodeAsNil() { - x.Failed = false - } else { - x.Failed = (bool)(r.DecodeBool()) - } - case "Restarts": - if r.TryDecodeAsNil() { - x.Restarts = 0 - } else { - x.Restarts = (uint64)(r.DecodeUint64()) - } - case "LastRestart": - if r.TryDecodeAsNil() { - x.LastRestart = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.LastRestart = r.DecodeTime() - } else if yyxt8 := z.Extension(z.I2Rtid(x.LastRestart)); yyxt8 != nil { - z.DecExtension(x.LastRestart, yyxt8) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.LastRestart) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.LastRestart) - } else { - z.DecFallback(&x.LastRestart, false) - } - } - case "StartedAt": - if r.TryDecodeAsNil() { - x.StartedAt = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.StartedAt = r.DecodeTime() - } else if yyxt10 := z.Extension(z.I2Rtid(x.StartedAt)); yyxt10 != nil { - z.DecExtension(x.StartedAt, yyxt10) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.StartedAt) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.StartedAt) - } else { - z.DecFallback(&x.StartedAt, false) - } - } - case "FinishedAt": - if r.TryDecodeAsNil() { - x.FinishedAt = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.FinishedAt = r.DecodeTime() - } else if yyxt12 := z.Extension(z.I2Rtid(x.FinishedAt)); yyxt12 != nil { - z.DecExtension(x.FinishedAt, yyxt12) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.FinishedAt) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.FinishedAt) - } else { - z.DecFallback(&x.FinishedAt, false) - } - } - case "Events": - if r.TryDecodeAsNil() { - x.Events = nil - } else { - if false { - } else { - h.decSlicePtrtoTaskEvent((*[]*TaskEvent)(&x.Events), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *TaskState) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj15 int - var yyb15 bool - var yyhl15 bool = l >= 0 - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.State = "" - } else { - x.State = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Failed = false - } else { - x.Failed = (bool)(r.DecodeBool()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Restarts = 0 - } else { - x.Restarts = (uint64)(r.DecodeUint64()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LastRestart = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.LastRestart = r.DecodeTime() - } else if yyxt20 := z.Extension(z.I2Rtid(x.LastRestart)); yyxt20 != nil { - z.DecExtension(x.LastRestart, yyxt20) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.LastRestart) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.LastRestart) - } else { - z.DecFallback(&x.LastRestart, false) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.StartedAt = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.StartedAt = r.DecodeTime() - } else if yyxt22 := z.Extension(z.I2Rtid(x.StartedAt)); yyxt22 != nil { - z.DecExtension(x.StartedAt, yyxt22) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.StartedAt) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.StartedAt) - } else { - z.DecFallback(&x.StartedAt, false) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.FinishedAt = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.FinishedAt = r.DecodeTime() - } else if yyxt24 := z.Extension(z.I2Rtid(x.FinishedAt)); yyxt24 != nil { - z.DecExtension(x.FinishedAt, yyxt24) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.FinishedAt) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.FinishedAt) - } else { - z.DecFallback(&x.FinishedAt, false) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Events = nil - } else { - if false { - } else { - h.decSlicePtrtoTaskEvent((*[]*TaskEvent)(&x.Events), d) - } - } - for { - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj15-1, "") - } - r.ReadArrayEnd() -} - -func (x *TaskEvent) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(24) - } else { - r.WriteMapStart(24) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Type))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Type)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Type\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Type`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Type))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Type)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Time)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Time\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Time`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Time)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Message))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Message)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Message\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Message`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Message))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Message)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DisplayMessage))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DisplayMessage)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DisplayMessage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DisplayMessage`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DisplayMessage))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DisplayMessage)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Details == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Details, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Details\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Details`) - } - r.WriteMapElemValue() - if x.Details == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Details, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.FailsTask)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"FailsTask\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `FailsTask`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.FailsTask)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.RestartReason))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.RestartReason)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RestartReason\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RestartReason`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.RestartReason))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.RestartReason)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SetupError))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SetupError)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SetupError\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SetupError`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SetupError))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SetupError)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DriverError))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DriverError)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DriverError\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DriverError`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DriverError))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DriverError)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.ExitCode)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ExitCode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ExitCode`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.ExitCode)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Signal)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Signal\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Signal`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Signal)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt37 := z.Extension(z.I2Rtid(x.KillTimeout)); yyxt37 != nil { - z.EncExtension(x.KillTimeout, yyxt37) - } else { - r.EncodeInt(int64(x.KillTimeout)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KillTimeout\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KillTimeout`) - } - r.WriteMapElemValue() - if false { - } else if yyxt38 := z.Extension(z.I2Rtid(x.KillTimeout)); yyxt38 != nil { - z.EncExtension(x.KillTimeout, yyxt38) - } else { - r.EncodeInt(int64(x.KillTimeout)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.KillError))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.KillError)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KillError\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KillError`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.KillError))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.KillError)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.KillReason))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.KillReason)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KillReason\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KillReason`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.KillReason))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.KillReason)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.StartDelay)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"StartDelay\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `StartDelay`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.StartDelay)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DownloadError))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DownloadError)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DownloadError\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DownloadError`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DownloadError))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DownloadError)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ValidationError))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ValidationError)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ValidationError\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ValidationError`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ValidationError))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ValidationError)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.DiskLimit)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DiskLimit\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DiskLimit`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.DiskLimit)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.FailedSibling))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.FailedSibling)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"FailedSibling\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `FailedSibling`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.FailedSibling))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.FailedSibling)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.VaultError))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.VaultError)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"VaultError\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `VaultError`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.VaultError))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.VaultError)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TaskSignalReason))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TaskSignalReason)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TaskSignalReason\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TaskSignalReason`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TaskSignalReason))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TaskSignalReason)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TaskSignal))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TaskSignal)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TaskSignal\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TaskSignal`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TaskSignal))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TaskSignal)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DriverMessage))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DriverMessage)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DriverMessage\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DriverMessage`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DriverMessage))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DriverMessage)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.GenericSource))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.GenericSource)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"GenericSource\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `GenericSource`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.GenericSource))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.GenericSource)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *TaskEvent) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *TaskEvent) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - case "Time": - if r.TryDecodeAsNil() { - x.Time = 0 - } else { - x.Time = (int64)(r.DecodeInt64()) - } - case "Message": - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = (string)(r.DecodeString()) - } - case "DisplayMessage": - if r.TryDecodeAsNil() { - x.DisplayMessage = "" - } else { - x.DisplayMessage = (string)(r.DecodeString()) - } - case "Details": - if r.TryDecodeAsNil() { - x.Details = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Details, d) - } - } - case "FailsTask": - if r.TryDecodeAsNil() { - x.FailsTask = false - } else { - x.FailsTask = (bool)(r.DecodeBool()) - } - case "RestartReason": - if r.TryDecodeAsNil() { - x.RestartReason = "" - } else { - x.RestartReason = (string)(r.DecodeString()) - } - case "SetupError": - if r.TryDecodeAsNil() { - x.SetupError = "" - } else { - x.SetupError = (string)(r.DecodeString()) - } - case "DriverError": - if r.TryDecodeAsNil() { - x.DriverError = "" - } else { - x.DriverError = (string)(r.DecodeString()) - } - case "ExitCode": - if r.TryDecodeAsNil() { - x.ExitCode = 0 - } else { - x.ExitCode = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Signal": - if r.TryDecodeAsNil() { - x.Signal = 0 - } else { - x.Signal = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "KillTimeout": - if r.TryDecodeAsNil() { - x.KillTimeout = 0 - } else { - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.KillTimeout)); yyxt17 != nil { - z.DecExtension(x.KillTimeout, yyxt17) - } else { - x.KillTimeout = (time.Duration)(r.DecodeInt64()) - } - } - case "KillError": - if r.TryDecodeAsNil() { - x.KillError = "" - } else { - x.KillError = (string)(r.DecodeString()) - } - case "KillReason": - if r.TryDecodeAsNil() { - x.KillReason = "" - } else { - x.KillReason = (string)(r.DecodeString()) - } - case "StartDelay": - if r.TryDecodeAsNil() { - x.StartDelay = 0 - } else { - x.StartDelay = (int64)(r.DecodeInt64()) - } - case "DownloadError": - if r.TryDecodeAsNil() { - x.DownloadError = "" - } else { - x.DownloadError = (string)(r.DecodeString()) - } - case "ValidationError": - if r.TryDecodeAsNil() { - x.ValidationError = "" - } else { - x.ValidationError = (string)(r.DecodeString()) - } - case "DiskLimit": - if r.TryDecodeAsNil() { - x.DiskLimit = 0 - } else { - x.DiskLimit = (int64)(r.DecodeInt64()) - } - case "FailedSibling": - if r.TryDecodeAsNil() { - x.FailedSibling = "" - } else { - x.FailedSibling = (string)(r.DecodeString()) - } - case "VaultError": - if r.TryDecodeAsNil() { - x.VaultError = "" - } else { - x.VaultError = (string)(r.DecodeString()) - } - case "TaskSignalReason": - if r.TryDecodeAsNil() { - x.TaskSignalReason = "" - } else { - x.TaskSignalReason = (string)(r.DecodeString()) - } - case "TaskSignal": - if r.TryDecodeAsNil() { - x.TaskSignal = "" - } else { - x.TaskSignal = (string)(r.DecodeString()) - } - case "DriverMessage": - if r.TryDecodeAsNil() { - x.DriverMessage = "" - } else { - x.DriverMessage = (string)(r.DecodeString()) - } - case "GenericSource": - if r.TryDecodeAsNil() { - x.GenericSource = "" - } else { - x.GenericSource = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *TaskEvent) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj30 int - var yyb30 bool - var yyhl30 bool = l >= 0 - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Time = 0 - } else { - x.Time = (int64)(r.DecodeInt64()) - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Message = "" - } else { - x.Message = (string)(r.DecodeString()) - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DisplayMessage = "" - } else { - x.DisplayMessage = (string)(r.DecodeString()) - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Details = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Details, d) - } - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.FailsTask = false - } else { - x.FailsTask = (bool)(r.DecodeBool()) - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RestartReason = "" - } else { - x.RestartReason = (string)(r.DecodeString()) - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SetupError = "" - } else { - x.SetupError = (string)(r.DecodeString()) - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DriverError = "" - } else { - x.DriverError = (string)(r.DecodeString()) - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ExitCode = 0 - } else { - x.ExitCode = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Signal = 0 - } else { - x.Signal = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.KillTimeout = 0 - } else { - if false { - } else if yyxt44 := z.Extension(z.I2Rtid(x.KillTimeout)); yyxt44 != nil { - z.DecExtension(x.KillTimeout, yyxt44) - } else { - x.KillTimeout = (time.Duration)(r.DecodeInt64()) - } - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.KillError = "" - } else { - x.KillError = (string)(r.DecodeString()) - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.KillReason = "" - } else { - x.KillReason = (string)(r.DecodeString()) - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.StartDelay = 0 - } else { - x.StartDelay = (int64)(r.DecodeInt64()) - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DownloadError = "" - } else { - x.DownloadError = (string)(r.DecodeString()) - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ValidationError = "" - } else { - x.ValidationError = (string)(r.DecodeString()) - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DiskLimit = 0 - } else { - x.DiskLimit = (int64)(r.DecodeInt64()) - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.FailedSibling = "" - } else { - x.FailedSibling = (string)(r.DecodeString()) - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.VaultError = "" - } else { - x.VaultError = (string)(r.DecodeString()) - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskSignalReason = "" - } else { - x.TaskSignalReason = (string)(r.DecodeString()) - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskSignal = "" - } else { - x.TaskSignal = (string)(r.DecodeString()) - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DriverMessage = "" - } else { - x.DriverMessage = (string)(r.DecodeString()) - } - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.GenericSource = "" - } else { - x.GenericSource = (string)(r.DecodeString()) - } - for { - yyj30++ - if yyhl30 { - yyb30 = yyj30 > l - } else { - yyb30 = r.CheckBreak() - } - if yyb30 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj30-1, "") - } - r.ReadArrayEnd() -} - -func (x *TaskArtifact) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.GetterSource))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.GetterSource)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"GetterSource\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `GetterSource`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.GetterSource))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.GetterSource)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.GetterOptions == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.GetterOptions, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"GetterOptions\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `GetterOptions`) - } - r.WriteMapElemValue() - if x.GetterOptions == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.GetterOptions, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.GetterMode))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.GetterMode)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"GetterMode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `GetterMode`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.GetterMode))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.GetterMode)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.RelativeDest))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.RelativeDest)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RelativeDest\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RelativeDest`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.RelativeDest))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.RelativeDest)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *TaskArtifact) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *TaskArtifact) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "GetterSource": - if r.TryDecodeAsNil() { - x.GetterSource = "" - } else { - x.GetterSource = (string)(r.DecodeString()) - } - case "GetterOptions": - if r.TryDecodeAsNil() { - x.GetterOptions = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.GetterOptions, d) - } - } - case "GetterMode": - if r.TryDecodeAsNil() { - x.GetterMode = "" - } else { - x.GetterMode = (string)(r.DecodeString()) - } - case "RelativeDest": - if r.TryDecodeAsNil() { - x.RelativeDest = "" - } else { - x.RelativeDest = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *TaskArtifact) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.GetterSource = "" - } else { - x.GetterSource = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.GetterOptions = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.GetterOptions, d) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.GetterMode = "" - } else { - x.GetterMode = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RelativeDest = "" - } else { - x.RelativeDest = (string)(r.DecodeString()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *Constraint) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(3) - } else { - r.WriteMapStart(3) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LTarget))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.LTarget)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LTarget\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LTarget`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LTarget))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.LTarget)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.RTarget))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.RTarget)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RTarget\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RTarget`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.RTarget))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.RTarget)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Operand))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Operand)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Operand\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Operand`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Operand))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Operand)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *Constraint) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *Constraint) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "LTarget": - if r.TryDecodeAsNil() { - x.LTarget = "" - } else { - x.LTarget = (string)(r.DecodeString()) - } - case "RTarget": - if r.TryDecodeAsNil() { - x.RTarget = "" - } else { - x.RTarget = (string)(r.DecodeString()) - } - case "Operand": - if r.TryDecodeAsNil() { - x.Operand = "" - } else { - x.Operand = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *Constraint) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj7 int - var yyb7 bool - var yyhl7 bool = l >= 0 - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LTarget = "" - } else { - x.LTarget = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RTarget = "" - } else { - x.RTarget = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Operand = "" - } else { - x.Operand = (string)(r.DecodeString()) - } - for { - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj7-1, "") - } - r.ReadArrayEnd() -} - -func (x Constraints) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - h.encConstraints((Constraints)(x), e) - } - } -} - -func (x *Constraints) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - h.decConstraints((*Constraints)(x), d) - } -} - -func (x *Affinity) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LTarget))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.LTarget)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LTarget\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LTarget`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LTarget))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.LTarget)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.RTarget))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.RTarget)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RTarget\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RTarget`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.RTarget))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.RTarget)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Operand))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Operand)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Operand\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Operand`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Operand))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Operand)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Weight)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Weight\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Weight`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Weight)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *Affinity) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *Affinity) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "LTarget": - if r.TryDecodeAsNil() { - x.LTarget = "" - } else { - x.LTarget = (string)(r.DecodeString()) - } - case "RTarget": - if r.TryDecodeAsNil() { - x.RTarget = "" - } else { - x.RTarget = (string)(r.DecodeString()) - } - case "Operand": - if r.TryDecodeAsNil() { - x.Operand = "" - } else { - x.Operand = (string)(r.DecodeString()) - } - case "Weight": - if r.TryDecodeAsNil() { - x.Weight = 0 - } else { - x.Weight = (int8)(z.C.IntV(r.DecodeInt64(), 8)) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *Affinity) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj8 int - var yyb8 bool - var yyhl8 bool = l >= 0 - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LTarget = "" - } else { - x.LTarget = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RTarget = "" - } else { - x.RTarget = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Operand = "" - } else { - x.Operand = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Weight = 0 - } else { - x.Weight = (int8)(z.C.IntV(r.DecodeInt64(), 8)) - } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj8-1, "") - } - r.ReadArrayEnd() -} - -func (x *Spread) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(3) - } else { - r.WriteMapStart(3) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Attribute))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Attribute)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Attribute\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Attribute`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Attribute))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Attribute)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.Weight)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Weight\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Weight`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Weight)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.SpreadTarget == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoSpreadTarget(([]*SpreadTarget)(x.SpreadTarget), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SpreadTarget\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SpreadTarget`) - } - r.WriteMapElemValue() - if x.SpreadTarget == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoSpreadTarget(([]*SpreadTarget)(x.SpreadTarget), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *Spread) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *Spread) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Attribute": - if r.TryDecodeAsNil() { - x.Attribute = "" - } else { - x.Attribute = (string)(r.DecodeString()) - } - case "Weight": - if r.TryDecodeAsNil() { - x.Weight = 0 - } else { - x.Weight = (int8)(z.C.IntV(r.DecodeInt64(), 8)) - } - case "SpreadTarget": - if r.TryDecodeAsNil() { - x.SpreadTarget = nil - } else { - if false { - } else { - h.decSlicePtrtoSpreadTarget((*[]*SpreadTarget)(&x.SpreadTarget), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *Spread) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj8 int - var yyb8 bool - var yyhl8 bool = l >= 0 - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Attribute = "" - } else { - x.Attribute = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Weight = 0 - } else { - x.Weight = (int8)(z.C.IntV(r.DecodeInt64(), 8)) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SpreadTarget = nil - } else { - if false { - } else { - h.decSlicePtrtoSpreadTarget((*[]*SpreadTarget)(&x.SpreadTarget), d) - } - } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj8-1, "") - } - r.ReadArrayEnd() -} - -func (x Affinities) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - h.encAffinities((Affinities)(x), e) - } - } -} - -func (x *Affinities) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - h.decAffinities((*Affinities)(x), d) - } -} - -func (x *SpreadTarget) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(2) - } else { - r.WriteMapStart(2) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Value))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Value)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Value\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Value`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Value))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Value)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Percent)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Percent\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Percent`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Percent)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *SpreadTarget) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *SpreadTarget) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Value": - if r.TryDecodeAsNil() { - x.Value = "" - } else { - x.Value = (string)(r.DecodeString()) - } - case "Percent": - if r.TryDecodeAsNil() { - x.Percent = 0 - } else { - x.Percent = (uint8)(z.C.UintV(r.DecodeUint64(), 8)) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *SpreadTarget) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Value = "" - } else { - x.Value = (string)(r.DecodeString()) - } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Percent = 0 - } else { - x.Percent = (uint8)(z.C.UintV(r.DecodeUint64(), 8)) - } - for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj6-1, "") - } - r.ReadArrayEnd() -} - -func (x *EphemeralDisk) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(3) - } else { - r.WriteMapStart(3) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Sticky)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Sticky\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Sticky`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Sticky)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.SizeMB)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SizeMB\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SizeMB`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.SizeMB)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Migrate)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Migrate\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Migrate`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Migrate)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *EphemeralDisk) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *EphemeralDisk) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Sticky": - if r.TryDecodeAsNil() { - x.Sticky = false - } else { - x.Sticky = (bool)(r.DecodeBool()) - } - case "SizeMB": - if r.TryDecodeAsNil() { - x.SizeMB = 0 - } else { - x.SizeMB = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Migrate": - if r.TryDecodeAsNil() { - x.Migrate = false - } else { - x.Migrate = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *EphemeralDisk) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj7 int - var yyb7 bool - var yyhl7 bool = l >= 0 - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Sticky = false - } else { - x.Sticky = (bool)(r.DecodeBool()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SizeMB = 0 - } else { - x.SizeMB = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Migrate = false - } else { - x.Migrate = (bool)(r.DecodeBool()) - } - for { - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj7-1, "") - } - r.ReadArrayEnd() -} - -func (x *Vault) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Policies == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Policies, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Policies\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Policies`) - } - r.WriteMapElemValue() - if x.Policies == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Policies, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Env)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Env\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Env`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Env)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ChangeMode))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ChangeMode)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ChangeMode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ChangeMode`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ChangeMode))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ChangeMode)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ChangeSignal))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ChangeSignal)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ChangeSignal\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ChangeSignal`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ChangeSignal))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ChangeSignal)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *Vault) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *Vault) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Policies": - if r.TryDecodeAsNil() { - x.Policies = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Policies, d) - } - } - case "Env": - if r.TryDecodeAsNil() { - x.Env = false - } else { - x.Env = (bool)(r.DecodeBool()) - } - case "ChangeMode": - if r.TryDecodeAsNil() { - x.ChangeMode = "" - } else { - x.ChangeMode = (string)(r.DecodeString()) - } - case "ChangeSignal": - if r.TryDecodeAsNil() { - x.ChangeSignal = "" - } else { - x.ChangeSignal = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *Vault) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Policies = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Policies, d) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Env = false - } else { - x.Env = (bool)(r.DecodeBool()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ChangeMode = "" - } else { - x.ChangeMode = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ChangeSignal = "" - } else { - x.ChangeSignal = (string)(r.DecodeString()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *Deployment) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(12) - } else { - r.WriteMapStart(12) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.JobVersion)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobVersion\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobVersion`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.JobVersion)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.JobModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.JobModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.JobSpecModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobSpecModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobSpecModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.JobSpecModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.JobCreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobCreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobCreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.JobCreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.TaskGroups == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoDeploymentState((map[string]*DeploymentState)(x.TaskGroups), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TaskGroups\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TaskGroups`) - } - r.WriteMapElemValue() - if x.TaskGroups == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoDeploymentState((map[string]*DeploymentState)(x.TaskGroups), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Status))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Status)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Status\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Status`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Status))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Status)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.StatusDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.StatusDescription)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"StatusDescription\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `StatusDescription`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.StatusDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.StatusDescription)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *Deployment) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *Deployment) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "ID": - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "JobID": - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - case "JobVersion": - if r.TryDecodeAsNil() { - x.JobVersion = 0 - } else { - x.JobVersion = (uint64)(r.DecodeUint64()) - } - case "JobModifyIndex": - if r.TryDecodeAsNil() { - x.JobModifyIndex = 0 - } else { - x.JobModifyIndex = (uint64)(r.DecodeUint64()) - } - case "JobSpecModifyIndex": - if r.TryDecodeAsNil() { - x.JobSpecModifyIndex = 0 - } else { - x.JobSpecModifyIndex = (uint64)(r.DecodeUint64()) - } - case "JobCreateIndex": - if r.TryDecodeAsNil() { - x.JobCreateIndex = 0 - } else { - x.JobCreateIndex = (uint64)(r.DecodeUint64()) - } - case "TaskGroups": - if r.TryDecodeAsNil() { - x.TaskGroups = nil - } else { - if false { - } else { - h.decMapstringPtrtoDeploymentState((*map[string]*DeploymentState)(&x.TaskGroups), d) - } - } - case "Status": - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - case "StatusDescription": - if r.TryDecodeAsNil() { - x.StatusDescription = "" - } else { - x.StatusDescription = (string)(r.DecodeString()) - } - case "CreateIndex": - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - case "ModifyIndex": - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *Deployment) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj17 int - var yyb17 bool - var yyhl17 bool = l >= 0 - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobVersion = 0 - } else { - x.JobVersion = (uint64)(r.DecodeUint64()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobModifyIndex = 0 - } else { - x.JobModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobSpecModifyIndex = 0 - } else { - x.JobSpecModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobCreateIndex = 0 - } else { - x.JobCreateIndex = (uint64)(r.DecodeUint64()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskGroups = nil - } else { - if false { - } else { - h.decMapstringPtrtoDeploymentState((*map[string]*DeploymentState)(&x.TaskGroups), d) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.StatusDescription = "" - } else { - x.StatusDescription = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - for { - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj17-1, "") - } - r.ReadArrayEnd() -} - -func (x *DeploymentState) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(11) - } else { - r.WriteMapStart(11) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AutoRevert)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AutoRevert\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AutoRevert`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AutoRevert)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AutoPromote)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AutoPromote\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AutoPromote`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AutoPromote)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.ProgressDeadline)); yyxt10 != nil { - z.EncExtension(x.ProgressDeadline, yyxt10) - } else { - r.EncodeInt(int64(x.ProgressDeadline)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ProgressDeadline\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ProgressDeadline`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.ProgressDeadline)); yyxt11 != nil { - z.EncExtension(x.ProgressDeadline, yyxt11) - } else { - r.EncodeInt(int64(x.ProgressDeadline)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.RequireProgressBy) - } else if yyxt13 := z.Extension(z.I2Rtid(x.RequireProgressBy)); yyxt13 != nil { - z.EncExtension(x.RequireProgressBy, yyxt13) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.RequireProgressBy) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.RequireProgressBy) - } else { - z.EncFallback(x.RequireProgressBy) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RequireProgressBy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RequireProgressBy`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.RequireProgressBy) - } else if yyxt14 := z.Extension(z.I2Rtid(x.RequireProgressBy)); yyxt14 != nil { - z.EncExtension(x.RequireProgressBy, yyxt14) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.RequireProgressBy) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.RequireProgressBy) - } else { - z.EncFallback(x.RequireProgressBy) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Promoted)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Promoted\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Promoted`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Promoted)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.PlacedCanaries == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.PlacedCanaries, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PlacedCanaries\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PlacedCanaries`) - } - r.WriteMapElemValue() - if x.PlacedCanaries == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.PlacedCanaries, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.DesiredCanaries)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DesiredCanaries\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DesiredCanaries`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.DesiredCanaries)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.DesiredTotal)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DesiredTotal\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DesiredTotal`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.DesiredTotal)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.PlacedAllocs)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PlacedAllocs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PlacedAllocs`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.PlacedAllocs)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.HealthyAllocs)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"HealthyAllocs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `HealthyAllocs`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.HealthyAllocs)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.UnhealthyAllocs)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"UnhealthyAllocs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `UnhealthyAllocs`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.UnhealthyAllocs)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DeploymentState) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *DeploymentState) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "AutoRevert": - if r.TryDecodeAsNil() { - x.AutoRevert = false - } else { - x.AutoRevert = (bool)(r.DecodeBool()) - } - case "AutoPromote": - if r.TryDecodeAsNil() { - x.AutoPromote = false - } else { - x.AutoPromote = (bool)(r.DecodeBool()) - } - case "ProgressDeadline": - if r.TryDecodeAsNil() { - x.ProgressDeadline = 0 - } else { - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.ProgressDeadline)); yyxt7 != nil { - z.DecExtension(x.ProgressDeadline, yyxt7) - } else { - x.ProgressDeadline = (time.Duration)(r.DecodeInt64()) - } - } - case "RequireProgressBy": - if r.TryDecodeAsNil() { - x.RequireProgressBy = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.RequireProgressBy = r.DecodeTime() - } else if yyxt9 := z.Extension(z.I2Rtid(x.RequireProgressBy)); yyxt9 != nil { - z.DecExtension(x.RequireProgressBy, yyxt9) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.RequireProgressBy) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.RequireProgressBy) - } else { - z.DecFallback(&x.RequireProgressBy, false) - } - } - case "Promoted": - if r.TryDecodeAsNil() { - x.Promoted = false - } else { - x.Promoted = (bool)(r.DecodeBool()) - } - case "PlacedCanaries": - if r.TryDecodeAsNil() { - x.PlacedCanaries = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.PlacedCanaries, d) - } - } - case "DesiredCanaries": - if r.TryDecodeAsNil() { - x.DesiredCanaries = 0 - } else { - x.DesiredCanaries = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "DesiredTotal": - if r.TryDecodeAsNil() { - x.DesiredTotal = 0 - } else { - x.DesiredTotal = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "PlacedAllocs": - if r.TryDecodeAsNil() { - x.PlacedAllocs = 0 - } else { - x.PlacedAllocs = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "HealthyAllocs": - if r.TryDecodeAsNil() { - x.HealthyAllocs = 0 - } else { - x.HealthyAllocs = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "UnhealthyAllocs": - if r.TryDecodeAsNil() { - x.UnhealthyAllocs = 0 - } else { - x.UnhealthyAllocs = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DeploymentState) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj18 int - var yyb18 bool - var yyhl18 bool = l >= 0 - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AutoRevert = false - } else { - x.AutoRevert = (bool)(r.DecodeBool()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AutoPromote = false - } else { - x.AutoPromote = (bool)(r.DecodeBool()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ProgressDeadline = 0 - } else { - if false { - } else if yyxt22 := z.Extension(z.I2Rtid(x.ProgressDeadline)); yyxt22 != nil { - z.DecExtension(x.ProgressDeadline, yyxt22) - } else { - x.ProgressDeadline = (time.Duration)(r.DecodeInt64()) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RequireProgressBy = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.RequireProgressBy = r.DecodeTime() - } else if yyxt24 := z.Extension(z.I2Rtid(x.RequireProgressBy)); yyxt24 != nil { - z.DecExtension(x.RequireProgressBy, yyxt24) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.RequireProgressBy) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.RequireProgressBy) - } else { - z.DecFallback(&x.RequireProgressBy, false) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Promoted = false - } else { - x.Promoted = (bool)(r.DecodeBool()) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PlacedCanaries = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.PlacedCanaries, d) - } - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DesiredCanaries = 0 - } else { - x.DesiredCanaries = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DesiredTotal = 0 - } else { - x.DesiredTotal = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PlacedAllocs = 0 - } else { - x.PlacedAllocs = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.HealthyAllocs = 0 - } else { - x.HealthyAllocs = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.UnhealthyAllocs = 0 - } else { - x.UnhealthyAllocs = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - for { - yyj18++ - if yyhl18 { - yyb18 = yyj18 > l - } else { - yyb18 = r.CheckBreak() - } - if yyb18 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj18-1, "") - } - r.ReadArrayEnd() -} - -func (x *DeploymentStatusUpdate) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(3) - } else { - r.WriteMapStart(3) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DeploymentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DeploymentID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeploymentID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DeploymentID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DeploymentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DeploymentID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Status))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Status)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Status\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Status`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Status))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Status)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.StatusDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.StatusDescription)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"StatusDescription\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `StatusDescription`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.StatusDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.StatusDescription)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DeploymentStatusUpdate) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *DeploymentStatusUpdate) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "DeploymentID": - if r.TryDecodeAsNil() { - x.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - case "Status": - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - case "StatusDescription": - if r.TryDecodeAsNil() { - x.StatusDescription = "" - } else { - x.StatusDescription = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DeploymentStatusUpdate) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj7 int - var yyb7 bool - var yyhl7 bool = l >= 0 - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.StatusDescription = "" - } else { - x.StatusDescription = (string)(r.DecodeString()) - } - for { - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj7-1, "") - } - r.ReadArrayEnd() -} - -func (x *RescheduleTracker) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Events == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoRescheduleEvent(([]*RescheduleEvent)(x.Events), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Events\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Events`) - } - r.WriteMapElemValue() - if x.Events == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoRescheduleEvent(([]*RescheduleEvent)(x.Events), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *RescheduleTracker) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *RescheduleTracker) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Events": - if r.TryDecodeAsNil() { - x.Events = nil - } else { - if false { - } else { - h.decSlicePtrtoRescheduleEvent((*[]*RescheduleEvent)(&x.Events), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *RescheduleTracker) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Events = nil - } else { - if false { - } else { - h.decSlicePtrtoRescheduleEvent((*[]*RescheduleEvent)(&x.Events), d) - } - } - for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj6-1, "") - } - r.ReadArrayEnd() -} - -func (x *RescheduleEvent) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.RescheduleTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RescheduleTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RescheduleTime`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.RescheduleTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PrevAllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PrevAllocID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PrevAllocID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PrevAllocID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PrevAllocID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PrevAllocID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PrevNodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PrevNodeID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PrevNodeID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PrevNodeID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PrevNodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PrevNodeID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.Delay)); yyxt13 != nil { - z.EncExtension(x.Delay, yyxt13) - } else { - r.EncodeInt(int64(x.Delay)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Delay\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Delay`) - } - r.WriteMapElemValue() - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.Delay)); yyxt14 != nil { - z.EncExtension(x.Delay, yyxt14) - } else { - r.EncodeInt(int64(x.Delay)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *RescheduleEvent) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *RescheduleEvent) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "RescheduleTime": - if r.TryDecodeAsNil() { - x.RescheduleTime = 0 - } else { - x.RescheduleTime = (int64)(r.DecodeInt64()) - } - case "PrevAllocID": - if r.TryDecodeAsNil() { - x.PrevAllocID = "" - } else { - x.PrevAllocID = (string)(r.DecodeString()) - } - case "PrevNodeID": - if r.TryDecodeAsNil() { - x.PrevNodeID = "" - } else { - x.PrevNodeID = (string)(r.DecodeString()) - } - case "Delay": - if r.TryDecodeAsNil() { - x.Delay = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.Delay)); yyxt8 != nil { - z.DecExtension(x.Delay, yyxt8) - } else { - x.Delay = (time.Duration)(r.DecodeInt64()) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *RescheduleEvent) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RescheduleTime = 0 - } else { - x.RescheduleTime = (int64)(r.DecodeInt64()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PrevAllocID = "" - } else { - x.PrevAllocID = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PrevNodeID = "" - } else { - x.PrevNodeID = (string)(r.DecodeString()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Delay = 0 - } else { - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.Delay)); yyxt14 != nil { - z.DecExtension(x.Delay, yyxt14) - } else { - x.Delay = (time.Duration)(r.DecodeInt64()) - } - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *DesiredTransition) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(3) - } else { - r.WriteMapStart(3) - } - var yyn3 bool - if x.Migrate == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Migrate == nil { - r.EncodeNil() - } else { - yy4 := *x.Migrate - if false { - } else { - r.EncodeBool(bool(yy4)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Migrate\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Migrate`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Migrate == nil { - r.EncodeNil() - } else { - yy6 := *x.Migrate - if false { - } else { - r.EncodeBool(bool(yy6)) - } - } - } - } - var yyn8 bool - if x.Reschedule == nil { - yyn8 = true - goto LABEL8 - } - LABEL8: - if yyr2 || yy2arr2 { - if yyn8 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Reschedule == nil { - r.EncodeNil() - } else { - yy9 := *x.Reschedule - if false { - } else { - r.EncodeBool(bool(yy9)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Reschedule\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Reschedule`) - } - r.WriteMapElemValue() - if yyn8 { - r.EncodeNil() - } else { - if x.Reschedule == nil { - r.EncodeNil() - } else { - yy11 := *x.Reschedule - if false { - } else { - r.EncodeBool(bool(yy11)) - } - } - } - } - var yyn13 bool - if x.ForceReschedule == nil { - yyn13 = true - goto LABEL13 - } - LABEL13: - if yyr2 || yy2arr2 { - if yyn13 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.ForceReschedule == nil { - r.EncodeNil() - } else { - yy14 := *x.ForceReschedule - if false { - } else { - r.EncodeBool(bool(yy14)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ForceReschedule\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ForceReschedule`) - } - r.WriteMapElemValue() - if yyn13 { - r.EncodeNil() - } else { - if x.ForceReschedule == nil { - r.EncodeNil() - } else { - yy16 := *x.ForceReschedule - if false { - } else { - r.EncodeBool(bool(yy16)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DesiredTransition) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *DesiredTransition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Migrate": - if r.TryDecodeAsNil() { - if true && x.Migrate != nil { - x.Migrate = nil - } - } else { - if x.Migrate == nil { - x.Migrate = new(bool) - } - - if false { - } else { - *x.Migrate = (bool)(r.DecodeBool()) - } - } - case "Reschedule": - if r.TryDecodeAsNil() { - if true && x.Reschedule != nil { - x.Reschedule = nil - } - } else { - if x.Reschedule == nil { - x.Reschedule = new(bool) - } - - if false { - } else { - *x.Reschedule = (bool)(r.DecodeBool()) - } - } - case "ForceReschedule": - if r.TryDecodeAsNil() { - if true && x.ForceReschedule != nil { - x.ForceReschedule = nil - } - } else { - if x.ForceReschedule == nil { - x.ForceReschedule = new(bool) - } - - if false { - } else { - *x.ForceReschedule = (bool)(r.DecodeBool()) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DesiredTransition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Migrate != nil { - x.Migrate = nil - } - } else { - if x.Migrate == nil { - x.Migrate = new(bool) - } - - if false { - } else { - *x.Migrate = (bool)(r.DecodeBool()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Reschedule != nil { - x.Reschedule = nil - } - } else { - if x.Reschedule == nil { - x.Reschedule = new(bool) - } - - if false { - } else { - *x.Reschedule = (bool)(r.DecodeBool()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.ForceReschedule != nil { - x.ForceReschedule = nil - } - } else { - if x.ForceReschedule == nil { - x.ForceReschedule = new(bool) - } - - if false { - } else { - *x.ForceReschedule = (bool)(r.DecodeBool()) - } - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *Allocation) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - var yyq2 = [33]bool{ // should field at this index be written? - x.ID != "", // ID - x.Namespace != "", // Namespace - x.EvalID != "", // EvalID - x.Name != "", // Name - x.NodeID != "", // NodeID - x.NodeName != "", // NodeName - x.JobID != "", // JobID - x.Job != nil, // Job - x.TaskGroup != "", // TaskGroup - x.Resources != nil, // Resources - x.SharedResources != nil, // SharedResources - len(x.TaskResources) != 0, // TaskResources - x.AllocatedResources != nil, // AllocatedResources - x.Metrics != nil, // Metrics - x.DesiredStatus != "", // DesiredStatus - x.DesiredDescription != "", // DesiredDescription - x.DesiredTransition != DesiredTransition{}, // DesiredTransition - x.ClientStatus != "", // ClientStatus - x.ClientDescription != "", // ClientDescription - len(x.TaskStates) != 0, // TaskStates - x.PreviousAllocation != "", // PreviousAllocation - x.NextAllocation != "", // NextAllocation - x.DeploymentID != "", // DeploymentID - x.DeploymentStatus != nil, // DeploymentStatus - x.RescheduleTracker != nil, // RescheduleTracker - x.FollowupEvalID != "", // FollowupEvalID - len(x.PreemptedAllocations) != 0, // PreemptedAllocations - x.PreemptedByAllocation != "", // PreemptedByAllocation - x.CreateIndex != 0, // CreateIndex - x.ModifyIndex != 0, // ModifyIndex - x.AllocModifyIndex != 0, // AllocModifyIndex - x.CreateTime != 0, // CreateTime - x.ModifyTime != 0, // ModifyTime - } - _ = yyq2 - if yyr2 || yy2arr2 { - r.WriteArrayStart(33) - } else { - var yynn2 int - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.WriteMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[0] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[0] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[1] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[1] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[2] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[2] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[3] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[3] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[4] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[4] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[5] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeName)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[5] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeName)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[6] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[6] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } - } - var yyn24 bool - if x.Job == nil { - yyn24 = true - goto LABEL24 - } - LABEL24: - if yyr2 || yy2arr2 { - if yyn24 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[7] { - if x.Job == nil { - r.EncodeNil() - } else { - x.Job.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[7] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Job\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Job`) - } - r.WriteMapElemValue() - if yyn24 { - r.EncodeNil() - } else { - if x.Job == nil { - r.EncodeNil() - } else { - x.Job.CodecEncodeSelf(e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[8] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TaskGroup))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TaskGroup)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[8] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TaskGroup\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TaskGroup`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TaskGroup))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TaskGroup)) - } - } - } - } - var yyn30 bool - if x.Resources == nil { - yyn30 = true - goto LABEL30 - } - LABEL30: - if yyr2 || yy2arr2 { - if yyn30 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[9] { - if x.Resources == nil { - r.EncodeNil() - } else { - x.Resources.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[9] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Resources\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Resources`) - } - r.WriteMapElemValue() - if yyn30 { - r.EncodeNil() - } else { - if x.Resources == nil { - r.EncodeNil() - } else { - x.Resources.CodecEncodeSelf(e) - } - } - } - } - var yyn33 bool - if x.SharedResources == nil { - yyn33 = true - goto LABEL33 - } - LABEL33: - if yyr2 || yy2arr2 { - if yyn33 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[10] { - if x.SharedResources == nil { - r.EncodeNil() - } else { - x.SharedResources.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[10] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SharedResources\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SharedResources`) - } - r.WriteMapElemValue() - if yyn33 { - r.EncodeNil() - } else { - if x.SharedResources == nil { - r.EncodeNil() - } else { - x.SharedResources.CodecEncodeSelf(e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[11] { - if x.TaskResources == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoResources((map[string]*Resources)(x.TaskResources), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[11] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TaskResources\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TaskResources`) - } - r.WriteMapElemValue() - if x.TaskResources == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoResources((map[string]*Resources)(x.TaskResources), e) - } - } - } - } - var yyn39 bool - if x.AllocatedResources == nil { - yyn39 = true - goto LABEL39 - } - LABEL39: - if yyr2 || yy2arr2 { - if yyn39 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[12] { - if x.AllocatedResources == nil { - r.EncodeNil() - } else { - x.AllocatedResources.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[12] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocatedResources\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllocatedResources`) - } - r.WriteMapElemValue() - if yyn39 { - r.EncodeNil() - } else { - if x.AllocatedResources == nil { - r.EncodeNil() - } else { - x.AllocatedResources.CodecEncodeSelf(e) - } - } - } - } - var yyn42 bool - if x.Metrics == nil { - yyn42 = true - goto LABEL42 - } - LABEL42: - if yyr2 || yy2arr2 { - if yyn42 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[13] { - if x.Metrics == nil { - r.EncodeNil() - } else { - x.Metrics.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[13] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Metrics\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Metrics`) - } - r.WriteMapElemValue() - if yyn42 { - r.EncodeNil() - } else { - if x.Metrics == nil { - r.EncodeNil() - } else { - x.Metrics.CodecEncodeSelf(e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[14] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DesiredStatus))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DesiredStatus)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[14] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DesiredStatus\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DesiredStatus`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DesiredStatus))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DesiredStatus)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[15] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DesiredDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DesiredDescription)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[15] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DesiredDescription\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DesiredDescription`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DesiredDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DesiredDescription)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[16] { - yy52 := &x.DesiredTransition - yy52.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[16] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DesiredTransition\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DesiredTransition`) - } - r.WriteMapElemValue() - yy54 := &x.DesiredTransition - yy54.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[17] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ClientStatus))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ClientStatus)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[17] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ClientStatus\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ClientStatus`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ClientStatus))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ClientStatus)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[18] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ClientDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ClientDescription)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[18] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ClientDescription\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ClientDescription`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ClientDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ClientDescription)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[19] { - if x.TaskStates == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoTaskState((map[string]*TaskState)(x.TaskStates), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[19] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TaskStates\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TaskStates`) - } - r.WriteMapElemValue() - if x.TaskStates == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoTaskState((map[string]*TaskState)(x.TaskStates), e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[20] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PreviousAllocation))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PreviousAllocation)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[20] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PreviousAllocation\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PreviousAllocation`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PreviousAllocation))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PreviousAllocation)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[21] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextAllocation))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextAllocation)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[21] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextAllocation\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextAllocation`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextAllocation))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextAllocation)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[22] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DeploymentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DeploymentID)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[22] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeploymentID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DeploymentID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DeploymentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DeploymentID)) - } - } - } - } - var yyn74 bool - if x.DeploymentStatus == nil { - yyn74 = true - goto LABEL74 - } - LABEL74: - if yyr2 || yy2arr2 { - if yyn74 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[23] { - if x.DeploymentStatus == nil { - r.EncodeNil() - } else { - x.DeploymentStatus.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[23] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeploymentStatus\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DeploymentStatus`) - } - r.WriteMapElemValue() - if yyn74 { - r.EncodeNil() - } else { - if x.DeploymentStatus == nil { - r.EncodeNil() - } else { - x.DeploymentStatus.CodecEncodeSelf(e) - } - } - } - } - var yyn77 bool - if x.RescheduleTracker == nil { - yyn77 = true - goto LABEL77 - } - LABEL77: - if yyr2 || yy2arr2 { - if yyn77 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[24] { - if x.RescheduleTracker == nil { - r.EncodeNil() - } else { - x.RescheduleTracker.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[24] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RescheduleTracker\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RescheduleTracker`) - } - r.WriteMapElemValue() - if yyn77 { - r.EncodeNil() - } else { - if x.RescheduleTracker == nil { - r.EncodeNil() - } else { - x.RescheduleTracker.CodecEncodeSelf(e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[25] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.FollowupEvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.FollowupEvalID)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[25] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"FollowupEvalID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `FollowupEvalID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.FollowupEvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.FollowupEvalID)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[26] { - if x.PreemptedAllocations == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.PreemptedAllocations, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[26] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PreemptedAllocations\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PreemptedAllocations`) - } - r.WriteMapElemValue() - if x.PreemptedAllocations == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.PreemptedAllocations, e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[27] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PreemptedByAllocation))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PreemptedByAllocation)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[27] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PreemptedByAllocation\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PreemptedByAllocation`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PreemptedByAllocation))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PreemptedByAllocation)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[28] { - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } else { - r.EncodeUint(0) - } - } else { - if yyq2[28] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[29] { - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } else { - r.EncodeUint(0) - } - } else { - if yyq2[29] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[30] { - if false { - } else { - r.EncodeUint(uint64(x.AllocModifyIndex)) - } - } else { - r.EncodeUint(0) - } - } else { - if yyq2[30] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllocModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.AllocModifyIndex)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[31] { - if false { - } else { - r.EncodeInt(int64(x.CreateTime)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[31] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateTime`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.CreateTime)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[32] { - if false { - } else { - r.EncodeInt(int64(x.ModifyTime)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[32] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModifyTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ModifyTime`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.ModifyTime)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *Allocation) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *Allocation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "ID": - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "EvalID": - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "NodeID": - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - case "NodeName": - if r.TryDecodeAsNil() { - x.NodeName = "" - } else { - x.NodeName = (string)(r.DecodeString()) - } - case "JobID": - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - case "Job": - if r.TryDecodeAsNil() { - if true && x.Job != nil { - x.Job = nil - } - } else { - if x.Job == nil { - x.Job = new(Job) - } - - x.Job.CodecDecodeSelf(d) - } - case "TaskGroup": - if r.TryDecodeAsNil() { - x.TaskGroup = "" - } else { - x.TaskGroup = (string)(r.DecodeString()) - } - case "Resources": - if r.TryDecodeAsNil() { - if true && x.Resources != nil { - x.Resources = nil - } - } else { - if x.Resources == nil { - x.Resources = new(Resources) - } - - x.Resources.CodecDecodeSelf(d) - } - case "SharedResources": - if r.TryDecodeAsNil() { - if true && x.SharedResources != nil { - x.SharedResources = nil - } - } else { - if x.SharedResources == nil { - x.SharedResources = new(Resources) - } - - x.SharedResources.CodecDecodeSelf(d) - } - case "TaskResources": - if r.TryDecodeAsNil() { - x.TaskResources = nil - } else { - if false { - } else { - h.decMapstringPtrtoResources((*map[string]*Resources)(&x.TaskResources), d) - } - } - case "AllocatedResources": - if r.TryDecodeAsNil() { - if true && x.AllocatedResources != nil { - x.AllocatedResources = nil - } - } else { - if x.AllocatedResources == nil { - x.AllocatedResources = new(AllocatedResources) - } - - x.AllocatedResources.CodecDecodeSelf(d) - } - case "Metrics": - if r.TryDecodeAsNil() { - if true && x.Metrics != nil { - x.Metrics = nil - } - } else { - if x.Metrics == nil { - x.Metrics = new(AllocMetric) - } - - x.Metrics.CodecDecodeSelf(d) - } - case "DesiredStatus": - if r.TryDecodeAsNil() { - x.DesiredStatus = "" - } else { - x.DesiredStatus = (string)(r.DecodeString()) - } - case "DesiredDescription": - if r.TryDecodeAsNil() { - x.DesiredDescription = "" - } else { - x.DesiredDescription = (string)(r.DecodeString()) - } - case "DesiredTransition": - if r.TryDecodeAsNil() { - x.DesiredTransition = DesiredTransition{} - } else { - x.DesiredTransition.CodecDecodeSelf(d) - } - case "ClientStatus": - if r.TryDecodeAsNil() { - x.ClientStatus = "" - } else { - x.ClientStatus = (string)(r.DecodeString()) - } - case "ClientDescription": - if r.TryDecodeAsNil() { - x.ClientDescription = "" - } else { - x.ClientDescription = (string)(r.DecodeString()) - } - case "TaskStates": - if r.TryDecodeAsNil() { - x.TaskStates = nil - } else { - if false { - } else { - h.decMapstringPtrtoTaskState((*map[string]*TaskState)(&x.TaskStates), d) - } - } - case "PreviousAllocation": - if r.TryDecodeAsNil() { - x.PreviousAllocation = "" - } else { - x.PreviousAllocation = (string)(r.DecodeString()) - } - case "NextAllocation": - if r.TryDecodeAsNil() { - x.NextAllocation = "" - } else { - x.NextAllocation = (string)(r.DecodeString()) - } - case "DeploymentID": - if r.TryDecodeAsNil() { - x.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - case "DeploymentStatus": - if r.TryDecodeAsNil() { - if true && x.DeploymentStatus != nil { - x.DeploymentStatus = nil - } - } else { - if x.DeploymentStatus == nil { - x.DeploymentStatus = new(AllocDeploymentStatus) - } - - x.DeploymentStatus.CodecDecodeSelf(d) - } - case "RescheduleTracker": - if r.TryDecodeAsNil() { - if true && x.RescheduleTracker != nil { - x.RescheduleTracker = nil - } - } else { - if x.RescheduleTracker == nil { - x.RescheduleTracker = new(RescheduleTracker) - } - - x.RescheduleTracker.CodecDecodeSelf(d) - } - case "FollowupEvalID": - if r.TryDecodeAsNil() { - x.FollowupEvalID = "" - } else { - x.FollowupEvalID = (string)(r.DecodeString()) - } - case "PreemptedAllocations": - if r.TryDecodeAsNil() { - x.PreemptedAllocations = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.PreemptedAllocations, d) - } - } - case "PreemptedByAllocation": - if r.TryDecodeAsNil() { - x.PreemptedByAllocation = "" - } else { - x.PreemptedByAllocation = (string)(r.DecodeString()) - } - case "CreateIndex": - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - case "ModifyIndex": - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - case "AllocModifyIndex": - if r.TryDecodeAsNil() { - x.AllocModifyIndex = 0 - } else { - x.AllocModifyIndex = (uint64)(r.DecodeUint64()) - } - case "CreateTime": - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - case "ModifyTime": - if r.TryDecodeAsNil() { - x.ModifyTime = 0 - } else { - x.ModifyTime = (int64)(r.DecodeInt64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *Allocation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj40 int - var yyb40 bool - var yyhl40 bool = l >= 0 - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeName = "" - } else { - x.NodeName = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Job != nil { - x.Job = nil - } - } else { - if x.Job == nil { - x.Job = new(Job) - } - - x.Job.CodecDecodeSelf(d) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskGroup = "" - } else { - x.TaskGroup = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Resources != nil { - x.Resources = nil - } - } else { - if x.Resources == nil { - x.Resources = new(Resources) - } - - x.Resources.CodecDecodeSelf(d) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.SharedResources != nil { - x.SharedResources = nil - } - } else { - if x.SharedResources == nil { - x.SharedResources = new(Resources) - } - - x.SharedResources.CodecDecodeSelf(d) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskResources = nil - } else { - if false { - } else { - h.decMapstringPtrtoResources((*map[string]*Resources)(&x.TaskResources), d) - } - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.AllocatedResources != nil { - x.AllocatedResources = nil - } - } else { - if x.AllocatedResources == nil { - x.AllocatedResources = new(AllocatedResources) - } - - x.AllocatedResources.CodecDecodeSelf(d) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Metrics != nil { - x.Metrics = nil - } - } else { - if x.Metrics == nil { - x.Metrics = new(AllocMetric) - } - - x.Metrics.CodecDecodeSelf(d) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DesiredStatus = "" - } else { - x.DesiredStatus = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DesiredDescription = "" - } else { - x.DesiredDescription = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DesiredTransition = DesiredTransition{} - } else { - x.DesiredTransition.CodecDecodeSelf(d) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ClientStatus = "" - } else { - x.ClientStatus = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ClientDescription = "" - } else { - x.ClientDescription = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskStates = nil - } else { - if false { - } else { - h.decMapstringPtrtoTaskState((*map[string]*TaskState)(&x.TaskStates), d) - } - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreviousAllocation = "" - } else { - x.PreviousAllocation = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NextAllocation = "" - } else { - x.NextAllocation = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.DeploymentStatus != nil { - x.DeploymentStatus = nil - } - } else { - if x.DeploymentStatus == nil { - x.DeploymentStatus = new(AllocDeploymentStatus) - } - - x.DeploymentStatus.CodecDecodeSelf(d) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.RescheduleTracker != nil { - x.RescheduleTracker = nil - } - } else { - if x.RescheduleTracker == nil { - x.RescheduleTracker = new(RescheduleTracker) - } - - x.RescheduleTracker.CodecDecodeSelf(d) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.FollowupEvalID = "" - } else { - x.FollowupEvalID = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreemptedAllocations = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.PreemptedAllocations, d) - } - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreemptedByAllocation = "" - } else { - x.PreemptedByAllocation = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocModifyIndex = 0 - } else { - x.AllocModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyTime = 0 - } else { - x.ModifyTime = (int64)(r.DecodeInt64()) - } - for { - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj40-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocationDiff) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - var yyq2 = [33]bool{ // should field at this index be written? - x.ID != "", // ID - x.Namespace != "", // Namespace - x.EvalID != "", // EvalID - x.Name != "", // Name - x.NodeID != "", // NodeID - x.NodeName != "", // NodeName - x.JobID != "", // JobID - x.Job != nil, // Job - x.TaskGroup != "", // TaskGroup - x.Resources != nil, // Resources - x.SharedResources != nil, // SharedResources - len(x.TaskResources) != 0, // TaskResources - x.AllocatedResources != nil, // AllocatedResources - x.Metrics != nil, // Metrics - x.DesiredStatus != "", // DesiredStatus - x.DesiredDescription != "", // DesiredDescription - x.DesiredTransition != DesiredTransition{}, // DesiredTransition - x.ClientStatus != "", // ClientStatus - x.ClientDescription != "", // ClientDescription - len(x.TaskStates) != 0, // TaskStates - x.PreviousAllocation != "", // PreviousAllocation - x.NextAllocation != "", // NextAllocation - x.DeploymentID != "", // DeploymentID - x.DeploymentStatus != nil, // DeploymentStatus - x.RescheduleTracker != nil, // RescheduleTracker - x.FollowupEvalID != "", // FollowupEvalID - len(x.PreemptedAllocations) != 0, // PreemptedAllocations - x.PreemptedByAllocation != "", // PreemptedByAllocation - x.CreateIndex != 0, // CreateIndex - x.ModifyIndex != 0, // ModifyIndex - x.AllocModifyIndex != 0, // AllocModifyIndex - x.CreateTime != 0, // CreateTime - x.ModifyTime != 0, // ModifyTime - } - _ = yyq2 - if yyr2 || yy2arr2 { - r.WriteArrayStart(33) - } else { - var yynn2 int - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.WriteMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[0] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[0] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[1] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[1] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[2] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[2] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[3] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[3] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[4] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[4] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[5] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeName)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[5] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeName)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[6] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[6] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } - } - var yyn24 bool - if x.Job == nil { - yyn24 = true - goto LABEL24 - } - LABEL24: - if yyr2 || yy2arr2 { - if yyn24 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[7] { - if x.Job == nil { - r.EncodeNil() - } else { - x.Job.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[7] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Job\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Job`) - } - r.WriteMapElemValue() - if yyn24 { - r.EncodeNil() - } else { - if x.Job == nil { - r.EncodeNil() - } else { - x.Job.CodecEncodeSelf(e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[8] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TaskGroup))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TaskGroup)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[8] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TaskGroup\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TaskGroup`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TaskGroup))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TaskGroup)) - } - } - } - } - var yyn30 bool - if x.Resources == nil { - yyn30 = true - goto LABEL30 - } - LABEL30: - if yyr2 || yy2arr2 { - if yyn30 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[9] { - if x.Resources == nil { - r.EncodeNil() - } else { - x.Resources.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[9] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Resources\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Resources`) - } - r.WriteMapElemValue() - if yyn30 { - r.EncodeNil() - } else { - if x.Resources == nil { - r.EncodeNil() - } else { - x.Resources.CodecEncodeSelf(e) - } - } - } - } - var yyn33 bool - if x.SharedResources == nil { - yyn33 = true - goto LABEL33 - } - LABEL33: - if yyr2 || yy2arr2 { - if yyn33 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[10] { - if x.SharedResources == nil { - r.EncodeNil() - } else { - x.SharedResources.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[10] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SharedResources\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SharedResources`) - } - r.WriteMapElemValue() - if yyn33 { - r.EncodeNil() - } else { - if x.SharedResources == nil { - r.EncodeNil() - } else { - x.SharedResources.CodecEncodeSelf(e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[11] { - if x.TaskResources == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoResources((map[string]*Resources)(x.TaskResources), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[11] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TaskResources\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TaskResources`) - } - r.WriteMapElemValue() - if x.TaskResources == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoResources((map[string]*Resources)(x.TaskResources), e) - } - } - } - } - var yyn39 bool - if x.AllocatedResources == nil { - yyn39 = true - goto LABEL39 - } - LABEL39: - if yyr2 || yy2arr2 { - if yyn39 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[12] { - if x.AllocatedResources == nil { - r.EncodeNil() - } else { - x.AllocatedResources.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[12] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocatedResources\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllocatedResources`) - } - r.WriteMapElemValue() - if yyn39 { - r.EncodeNil() - } else { - if x.AllocatedResources == nil { - r.EncodeNil() - } else { - x.AllocatedResources.CodecEncodeSelf(e) - } - } - } - } - var yyn42 bool - if x.Metrics == nil { - yyn42 = true - goto LABEL42 - } - LABEL42: - if yyr2 || yy2arr2 { - if yyn42 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[13] { - if x.Metrics == nil { - r.EncodeNil() - } else { - x.Metrics.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[13] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Metrics\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Metrics`) - } - r.WriteMapElemValue() - if yyn42 { - r.EncodeNil() - } else { - if x.Metrics == nil { - r.EncodeNil() - } else { - x.Metrics.CodecEncodeSelf(e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[14] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DesiredStatus))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DesiredStatus)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[14] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DesiredStatus\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DesiredStatus`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DesiredStatus))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DesiredStatus)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[15] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DesiredDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DesiredDescription)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[15] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DesiredDescription\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DesiredDescription`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DesiredDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DesiredDescription)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[16] { - yy52 := &x.DesiredTransition - yy52.CodecEncodeSelf(e) - } else { - r.EncodeNil() - } - } else { - if yyq2[16] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DesiredTransition\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DesiredTransition`) - } - r.WriteMapElemValue() - yy54 := &x.DesiredTransition - yy54.CodecEncodeSelf(e) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[17] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ClientStatus))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ClientStatus)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[17] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ClientStatus\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ClientStatus`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ClientStatus))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ClientStatus)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[18] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ClientDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ClientDescription)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[18] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ClientDescription\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ClientDescription`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ClientDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ClientDescription)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[19] { - if x.TaskStates == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoTaskState((map[string]*TaskState)(x.TaskStates), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[19] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TaskStates\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TaskStates`) - } - r.WriteMapElemValue() - if x.TaskStates == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoTaskState((map[string]*TaskState)(x.TaskStates), e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[20] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PreviousAllocation))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PreviousAllocation)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[20] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PreviousAllocation\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PreviousAllocation`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PreviousAllocation))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PreviousAllocation)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[21] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextAllocation))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextAllocation)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[21] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextAllocation\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextAllocation`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextAllocation))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextAllocation)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[22] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DeploymentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DeploymentID)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[22] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeploymentID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DeploymentID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DeploymentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DeploymentID)) - } - } - } - } - var yyn74 bool - if x.DeploymentStatus == nil { - yyn74 = true - goto LABEL74 - } - LABEL74: - if yyr2 || yy2arr2 { - if yyn74 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[23] { - if x.DeploymentStatus == nil { - r.EncodeNil() - } else { - x.DeploymentStatus.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[23] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeploymentStatus\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DeploymentStatus`) - } - r.WriteMapElemValue() - if yyn74 { - r.EncodeNil() - } else { - if x.DeploymentStatus == nil { - r.EncodeNil() - } else { - x.DeploymentStatus.CodecEncodeSelf(e) - } - } - } - } - var yyn77 bool - if x.RescheduleTracker == nil { - yyn77 = true - goto LABEL77 - } - LABEL77: - if yyr2 || yy2arr2 { - if yyn77 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[24] { - if x.RescheduleTracker == nil { - r.EncodeNil() - } else { - x.RescheduleTracker.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[24] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RescheduleTracker\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RescheduleTracker`) - } - r.WriteMapElemValue() - if yyn77 { - r.EncodeNil() - } else { - if x.RescheduleTracker == nil { - r.EncodeNil() - } else { - x.RescheduleTracker.CodecEncodeSelf(e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[25] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.FollowupEvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.FollowupEvalID)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[25] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"FollowupEvalID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `FollowupEvalID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.FollowupEvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.FollowupEvalID)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[26] { - if x.PreemptedAllocations == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.PreemptedAllocations, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[26] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PreemptedAllocations\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PreemptedAllocations`) - } - r.WriteMapElemValue() - if x.PreemptedAllocations == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.PreemptedAllocations, e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[27] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PreemptedByAllocation))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PreemptedByAllocation)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[27] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PreemptedByAllocation\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PreemptedByAllocation`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PreemptedByAllocation))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PreemptedByAllocation)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[28] { - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } else { - r.EncodeUint(0) - } - } else { - if yyq2[28] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[29] { - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } else { - r.EncodeUint(0) - } - } else { - if yyq2[29] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[30] { - if false { - } else { - r.EncodeUint(uint64(x.AllocModifyIndex)) - } - } else { - r.EncodeUint(0) - } - } else { - if yyq2[30] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllocModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.AllocModifyIndex)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[31] { - if false { - } else { - r.EncodeInt(int64(x.CreateTime)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[31] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateTime`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.CreateTime)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[32] { - if false { - } else { - r.EncodeInt(int64(x.ModifyTime)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[32] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModifyTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ModifyTime`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.ModifyTime)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocationDiff) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *AllocationDiff) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "ID": - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "EvalID": - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "NodeID": - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - case "NodeName": - if r.TryDecodeAsNil() { - x.NodeName = "" - } else { - x.NodeName = (string)(r.DecodeString()) - } - case "JobID": - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - case "Job": - if r.TryDecodeAsNil() { - if true && x.Job != nil { - x.Job = nil - } - } else { - if x.Job == nil { - x.Job = new(Job) - } - - x.Job.CodecDecodeSelf(d) - } - case "TaskGroup": - if r.TryDecodeAsNil() { - x.TaskGroup = "" - } else { - x.TaskGroup = (string)(r.DecodeString()) - } - case "Resources": - if r.TryDecodeAsNil() { - if true && x.Resources != nil { - x.Resources = nil - } - } else { - if x.Resources == nil { - x.Resources = new(Resources) - } - - x.Resources.CodecDecodeSelf(d) - } - case "SharedResources": - if r.TryDecodeAsNil() { - if true && x.SharedResources != nil { - x.SharedResources = nil - } - } else { - if x.SharedResources == nil { - x.SharedResources = new(Resources) - } - - x.SharedResources.CodecDecodeSelf(d) - } - case "TaskResources": - if r.TryDecodeAsNil() { - x.TaskResources = nil - } else { - if false { - } else { - h.decMapstringPtrtoResources((*map[string]*Resources)(&x.TaskResources), d) - } - } - case "AllocatedResources": - if r.TryDecodeAsNil() { - if true && x.AllocatedResources != nil { - x.AllocatedResources = nil - } - } else { - if x.AllocatedResources == nil { - x.AllocatedResources = new(AllocatedResources) - } - - x.AllocatedResources.CodecDecodeSelf(d) - } - case "Metrics": - if r.TryDecodeAsNil() { - if true && x.Metrics != nil { - x.Metrics = nil - } - } else { - if x.Metrics == nil { - x.Metrics = new(AllocMetric) - } - - x.Metrics.CodecDecodeSelf(d) - } - case "DesiredStatus": - if r.TryDecodeAsNil() { - x.DesiredStatus = "" - } else { - x.DesiredStatus = (string)(r.DecodeString()) - } - case "DesiredDescription": - if r.TryDecodeAsNil() { - x.DesiredDescription = "" - } else { - x.DesiredDescription = (string)(r.DecodeString()) - } - case "DesiredTransition": - if r.TryDecodeAsNil() { - x.DesiredTransition = DesiredTransition{} - } else { - x.DesiredTransition.CodecDecodeSelf(d) - } - case "ClientStatus": - if r.TryDecodeAsNil() { - x.ClientStatus = "" - } else { - x.ClientStatus = (string)(r.DecodeString()) - } - case "ClientDescription": - if r.TryDecodeAsNil() { - x.ClientDescription = "" - } else { - x.ClientDescription = (string)(r.DecodeString()) - } - case "TaskStates": - if r.TryDecodeAsNil() { - x.TaskStates = nil - } else { - if false { - } else { - h.decMapstringPtrtoTaskState((*map[string]*TaskState)(&x.TaskStates), d) - } - } - case "PreviousAllocation": - if r.TryDecodeAsNil() { - x.PreviousAllocation = "" - } else { - x.PreviousAllocation = (string)(r.DecodeString()) - } - case "NextAllocation": - if r.TryDecodeAsNil() { - x.NextAllocation = "" - } else { - x.NextAllocation = (string)(r.DecodeString()) - } - case "DeploymentID": - if r.TryDecodeAsNil() { - x.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - case "DeploymentStatus": - if r.TryDecodeAsNil() { - if true && x.DeploymentStatus != nil { - x.DeploymentStatus = nil - } - } else { - if x.DeploymentStatus == nil { - x.DeploymentStatus = new(AllocDeploymentStatus) - } - - x.DeploymentStatus.CodecDecodeSelf(d) - } - case "RescheduleTracker": - if r.TryDecodeAsNil() { - if true && x.RescheduleTracker != nil { - x.RescheduleTracker = nil - } - } else { - if x.RescheduleTracker == nil { - x.RescheduleTracker = new(RescheduleTracker) - } - - x.RescheduleTracker.CodecDecodeSelf(d) - } - case "FollowupEvalID": - if r.TryDecodeAsNil() { - x.FollowupEvalID = "" - } else { - x.FollowupEvalID = (string)(r.DecodeString()) - } - case "PreemptedAllocations": - if r.TryDecodeAsNil() { - x.PreemptedAllocations = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.PreemptedAllocations, d) - } - } - case "PreemptedByAllocation": - if r.TryDecodeAsNil() { - x.PreemptedByAllocation = "" - } else { - x.PreemptedByAllocation = (string)(r.DecodeString()) - } - case "CreateIndex": - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - case "ModifyIndex": - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - case "AllocModifyIndex": - if r.TryDecodeAsNil() { - x.AllocModifyIndex = 0 - } else { - x.AllocModifyIndex = (uint64)(r.DecodeUint64()) - } - case "CreateTime": - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - case "ModifyTime": - if r.TryDecodeAsNil() { - x.ModifyTime = 0 - } else { - x.ModifyTime = (int64)(r.DecodeInt64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocationDiff) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj40 int - var yyb40 bool - var yyhl40 bool = l >= 0 - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeName = "" - } else { - x.NodeName = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Job != nil { - x.Job = nil - } - } else { - if x.Job == nil { - x.Job = new(Job) - } - - x.Job.CodecDecodeSelf(d) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskGroup = "" - } else { - x.TaskGroup = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Resources != nil { - x.Resources = nil - } - } else { - if x.Resources == nil { - x.Resources = new(Resources) - } - - x.Resources.CodecDecodeSelf(d) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.SharedResources != nil { - x.SharedResources = nil - } - } else { - if x.SharedResources == nil { - x.SharedResources = new(Resources) - } - - x.SharedResources.CodecDecodeSelf(d) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskResources = nil - } else { - if false { - } else { - h.decMapstringPtrtoResources((*map[string]*Resources)(&x.TaskResources), d) - } - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.AllocatedResources != nil { - x.AllocatedResources = nil - } - } else { - if x.AllocatedResources == nil { - x.AllocatedResources = new(AllocatedResources) - } - - x.AllocatedResources.CodecDecodeSelf(d) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Metrics != nil { - x.Metrics = nil - } - } else { - if x.Metrics == nil { - x.Metrics = new(AllocMetric) - } - - x.Metrics.CodecDecodeSelf(d) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DesiredStatus = "" - } else { - x.DesiredStatus = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DesiredDescription = "" - } else { - x.DesiredDescription = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DesiredTransition = DesiredTransition{} - } else { - x.DesiredTransition.CodecDecodeSelf(d) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ClientStatus = "" - } else { - x.ClientStatus = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ClientDescription = "" - } else { - x.ClientDescription = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskStates = nil - } else { - if false { - } else { - h.decMapstringPtrtoTaskState((*map[string]*TaskState)(&x.TaskStates), d) - } - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreviousAllocation = "" - } else { - x.PreviousAllocation = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NextAllocation = "" - } else { - x.NextAllocation = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.DeploymentStatus != nil { - x.DeploymentStatus = nil - } - } else { - if x.DeploymentStatus == nil { - x.DeploymentStatus = new(AllocDeploymentStatus) - } - - x.DeploymentStatus.CodecDecodeSelf(d) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.RescheduleTracker != nil { - x.RescheduleTracker = nil - } - } else { - if x.RescheduleTracker == nil { - x.RescheduleTracker = new(RescheduleTracker) - } - - x.RescheduleTracker.CodecDecodeSelf(d) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.FollowupEvalID = "" - } else { - x.FollowupEvalID = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreemptedAllocations = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.PreemptedAllocations, d) - } - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreemptedByAllocation = "" - } else { - x.PreemptedByAllocation = (string)(r.DecodeString()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocModifyIndex = 0 - } else { - x.AllocModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyTime = 0 - } else { - x.ModifyTime = (int64)(r.DecodeInt64()) - } - for { - yyj40++ - if yyhl40 { - yyb40 = yyj40 > l - } else { - yyb40 = r.CheckBreak() - } - if yyb40 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj40-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocListStub) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(25) - } else { - r.WriteMapStart(25) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeName)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeName\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeName`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeName))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeName)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobType))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobType)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobType\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobType`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobType))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobType)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.JobVersion)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobVersion\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobVersion`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.JobVersion)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TaskGroup))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TaskGroup)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TaskGroup\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TaskGroup`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TaskGroup))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TaskGroup)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DesiredStatus))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DesiredStatus)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DesiredStatus\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DesiredStatus`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DesiredStatus))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DesiredStatus)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DesiredDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DesiredDescription)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DesiredDescription\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DesiredDescription`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DesiredDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DesiredDescription)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ClientStatus))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ClientStatus)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ClientStatus\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ClientStatus`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ClientStatus))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ClientStatus)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ClientDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ClientDescription)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ClientDescription\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ClientDescription`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ClientDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ClientDescription)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - yy46 := &x.DesiredTransition - yy46.CodecEncodeSelf(e) - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DesiredTransition\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DesiredTransition`) - } - r.WriteMapElemValue() - yy48 := &x.DesiredTransition - yy48.CodecEncodeSelf(e) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.TaskStates == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoTaskState((map[string]*TaskState)(x.TaskStates), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TaskStates\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TaskStates`) - } - r.WriteMapElemValue() - if x.TaskStates == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoTaskState((map[string]*TaskState)(x.TaskStates), e) - } - } - } - var yyn53 bool - if x.DeploymentStatus == nil { - yyn53 = true - goto LABEL53 - } - LABEL53: - if yyr2 || yy2arr2 { - if yyn53 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.DeploymentStatus == nil { - r.EncodeNil() - } else { - x.DeploymentStatus.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeploymentStatus\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DeploymentStatus`) - } - r.WriteMapElemValue() - if yyn53 { - r.EncodeNil() - } else { - if x.DeploymentStatus == nil { - r.EncodeNil() - } else { - x.DeploymentStatus.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.FollowupEvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.FollowupEvalID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"FollowupEvalID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `FollowupEvalID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.FollowupEvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.FollowupEvalID)) - } - } - } - var yyn59 bool - if x.RescheduleTracker == nil { - yyn59 = true - goto LABEL59 - } - LABEL59: - if yyr2 || yy2arr2 { - if yyn59 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.RescheduleTracker == nil { - r.EncodeNil() - } else { - x.RescheduleTracker.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RescheduleTracker\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RescheduleTracker`) - } - r.WriteMapElemValue() - if yyn59 { - r.EncodeNil() - } else { - if x.RescheduleTracker == nil { - r.EncodeNil() - } else { - x.RescheduleTracker.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.PreemptedAllocations == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.PreemptedAllocations, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PreemptedAllocations\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PreemptedAllocations`) - } - r.WriteMapElemValue() - if x.PreemptedAllocations == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.PreemptedAllocations, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PreemptedByAllocation))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PreemptedByAllocation)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PreemptedByAllocation\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PreemptedByAllocation`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PreemptedByAllocation))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PreemptedByAllocation)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.CreateTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateTime`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.CreateTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.ModifyTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModifyTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ModifyTime`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.ModifyTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocListStub) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *AllocListStub) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "ID": - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - case "EvalID": - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "NodeID": - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - case "NodeName": - if r.TryDecodeAsNil() { - x.NodeName = "" - } else { - x.NodeName = (string)(r.DecodeString()) - } - case "JobID": - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - case "JobType": - if r.TryDecodeAsNil() { - x.JobType = "" - } else { - x.JobType = (string)(r.DecodeString()) - } - case "JobVersion": - if r.TryDecodeAsNil() { - x.JobVersion = 0 - } else { - x.JobVersion = (uint64)(r.DecodeUint64()) - } - case "TaskGroup": - if r.TryDecodeAsNil() { - x.TaskGroup = "" - } else { - x.TaskGroup = (string)(r.DecodeString()) - } - case "DesiredStatus": - if r.TryDecodeAsNil() { - x.DesiredStatus = "" - } else { - x.DesiredStatus = (string)(r.DecodeString()) - } - case "DesiredDescription": - if r.TryDecodeAsNil() { - x.DesiredDescription = "" - } else { - x.DesiredDescription = (string)(r.DecodeString()) - } - case "ClientStatus": - if r.TryDecodeAsNil() { - x.ClientStatus = "" - } else { - x.ClientStatus = (string)(r.DecodeString()) - } - case "ClientDescription": - if r.TryDecodeAsNil() { - x.ClientDescription = "" - } else { - x.ClientDescription = (string)(r.DecodeString()) - } - case "DesiredTransition": - if r.TryDecodeAsNil() { - x.DesiredTransition = DesiredTransition{} - } else { - x.DesiredTransition.CodecDecodeSelf(d) - } - case "TaskStates": - if r.TryDecodeAsNil() { - x.TaskStates = nil - } else { - if false { - } else { - h.decMapstringPtrtoTaskState((*map[string]*TaskState)(&x.TaskStates), d) - } - } - case "DeploymentStatus": - if r.TryDecodeAsNil() { - if true && x.DeploymentStatus != nil { - x.DeploymentStatus = nil - } - } else { - if x.DeploymentStatus == nil { - x.DeploymentStatus = new(AllocDeploymentStatus) - } - - x.DeploymentStatus.CodecDecodeSelf(d) - } - case "FollowupEvalID": - if r.TryDecodeAsNil() { - x.FollowupEvalID = "" - } else { - x.FollowupEvalID = (string)(r.DecodeString()) - } - case "RescheduleTracker": - if r.TryDecodeAsNil() { - if true && x.RescheduleTracker != nil { - x.RescheduleTracker = nil - } - } else { - if x.RescheduleTracker == nil { - x.RescheduleTracker = new(RescheduleTracker) - } - - x.RescheduleTracker.CodecDecodeSelf(d) - } - case "PreemptedAllocations": - if r.TryDecodeAsNil() { - x.PreemptedAllocations = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.PreemptedAllocations, d) - } - } - case "PreemptedByAllocation": - if r.TryDecodeAsNil() { - x.PreemptedByAllocation = "" - } else { - x.PreemptedByAllocation = (string)(r.DecodeString()) - } - case "CreateIndex": - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - case "ModifyIndex": - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - case "CreateTime": - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - case "ModifyTime": - if r.TryDecodeAsNil() { - x.ModifyTime = 0 - } else { - x.ModifyTime = (int64)(r.DecodeInt64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocListStub) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj31 int - var yyb31 bool - var yyhl31 bool = l >= 0 - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeName = "" - } else { - x.NodeName = (string)(r.DecodeString()) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobType = "" - } else { - x.JobType = (string)(r.DecodeString()) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobVersion = 0 - } else { - x.JobVersion = (uint64)(r.DecodeUint64()) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskGroup = "" - } else { - x.TaskGroup = (string)(r.DecodeString()) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DesiredStatus = "" - } else { - x.DesiredStatus = (string)(r.DecodeString()) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DesiredDescription = "" - } else { - x.DesiredDescription = (string)(r.DecodeString()) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ClientStatus = "" - } else { - x.ClientStatus = (string)(r.DecodeString()) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ClientDescription = "" - } else { - x.ClientDescription = (string)(r.DecodeString()) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DesiredTransition = DesiredTransition{} - } else { - x.DesiredTransition.CodecDecodeSelf(d) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TaskStates = nil - } else { - if false { - } else { - h.decMapstringPtrtoTaskState((*map[string]*TaskState)(&x.TaskStates), d) - } - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.DeploymentStatus != nil { - x.DeploymentStatus = nil - } - } else { - if x.DeploymentStatus == nil { - x.DeploymentStatus = new(AllocDeploymentStatus) - } - - x.DeploymentStatus.CodecDecodeSelf(d) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.FollowupEvalID = "" - } else { - x.FollowupEvalID = (string)(r.DecodeString()) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.RescheduleTracker != nil { - x.RescheduleTracker = nil - } - } else { - if x.RescheduleTracker == nil { - x.RescheduleTracker = new(RescheduleTracker) - } - - x.RescheduleTracker.CodecDecodeSelf(d) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreemptedAllocations = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.PreemptedAllocations, d) - } - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreemptedByAllocation = "" - } else { - x.PreemptedByAllocation = (string)(r.DecodeString()) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyTime = 0 - } else { - x.ModifyTime = (int64)(r.DecodeInt64()) - } - for { - yyj31++ - if yyhl31 { - yyb31 = yyj31 > l - } else { - yyb31 = r.CheckBreak() - } - if yyb31 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj31-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocMetric) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(13) - } else { - r.WriteMapStart(13) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.NodesEvaluated)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodesEvaluated\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodesEvaluated`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.NodesEvaluated)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.NodesFiltered)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodesFiltered\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodesFiltered`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.NodesFiltered)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.NodesAvailable == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntV(x.NodesAvailable, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodesAvailable\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodesAvailable`) - } - r.WriteMapElemValue() - if x.NodesAvailable == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntV(x.NodesAvailable, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.ClassFiltered == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntV(x.ClassFiltered, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ClassFiltered\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ClassFiltered`) - } - r.WriteMapElemValue() - if x.ClassFiltered == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntV(x.ClassFiltered, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.ConstraintFiltered == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntV(x.ConstraintFiltered, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ConstraintFiltered\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ConstraintFiltered`) - } - r.WriteMapElemValue() - if x.ConstraintFiltered == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntV(x.ConstraintFiltered, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.NodesExhausted)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodesExhausted\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodesExhausted`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.NodesExhausted)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.ClassExhausted == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntV(x.ClassExhausted, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ClassExhausted\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ClassExhausted`) - } - r.WriteMapElemValue() - if x.ClassExhausted == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntV(x.ClassExhausted, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.DimensionExhausted == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntV(x.DimensionExhausted, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DimensionExhausted\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DimensionExhausted`) - } - r.WriteMapElemValue() - if x.DimensionExhausted == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntV(x.DimensionExhausted, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.QuotaExhausted == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.QuotaExhausted, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"QuotaExhausted\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `QuotaExhausted`) - } - r.WriteMapElemValue() - if x.QuotaExhausted == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.QuotaExhausted, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Scores == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringFloat64V(x.Scores, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Scores\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Scores`) - } - r.WriteMapElemValue() - if x.Scores == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringFloat64V(x.Scores, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.ScoreMetaData == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNodeScoreMeta(([]*NodeScoreMeta)(x.ScoreMetaData), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ScoreMetaData\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ScoreMetaData`) - } - r.WriteMapElemValue() - if x.ScoreMetaData == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNodeScoreMeta(([]*NodeScoreMeta)(x.ScoreMetaData), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt37 := z.Extension(z.I2Rtid(x.AllocationTime)); yyxt37 != nil { - z.EncExtension(x.AllocationTime, yyxt37) - } else { - r.EncodeInt(int64(x.AllocationTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocationTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllocationTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt38 := z.Extension(z.I2Rtid(x.AllocationTime)); yyxt38 != nil { - z.EncExtension(x.AllocationTime, yyxt38) - } else { - r.EncodeInt(int64(x.AllocationTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.CoalescedFailures)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CoalescedFailures\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CoalescedFailures`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.CoalescedFailures)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocMetric) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *AllocMetric) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "NodesEvaluated": - if r.TryDecodeAsNil() { - x.NodesEvaluated = 0 - } else { - x.NodesEvaluated = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "NodesFiltered": - if r.TryDecodeAsNil() { - x.NodesFiltered = 0 - } else { - x.NodesFiltered = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "NodesAvailable": - if r.TryDecodeAsNil() { - x.NodesAvailable = nil - } else { - if false { - } else { - z.F.DecMapStringIntX(&x.NodesAvailable, d) - } - } - case "ClassFiltered": - if r.TryDecodeAsNil() { - x.ClassFiltered = nil - } else { - if false { - } else { - z.F.DecMapStringIntX(&x.ClassFiltered, d) - } - } - case "ConstraintFiltered": - if r.TryDecodeAsNil() { - x.ConstraintFiltered = nil - } else { - if false { - } else { - z.F.DecMapStringIntX(&x.ConstraintFiltered, d) - } - } - case "NodesExhausted": - if r.TryDecodeAsNil() { - x.NodesExhausted = 0 - } else { - x.NodesExhausted = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "ClassExhausted": - if r.TryDecodeAsNil() { - x.ClassExhausted = nil - } else { - if false { - } else { - z.F.DecMapStringIntX(&x.ClassExhausted, d) - } - } - case "DimensionExhausted": - if r.TryDecodeAsNil() { - x.DimensionExhausted = nil - } else { - if false { - } else { - z.F.DecMapStringIntX(&x.DimensionExhausted, d) - } - } - case "QuotaExhausted": - if r.TryDecodeAsNil() { - x.QuotaExhausted = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.QuotaExhausted, d) - } - } - case "Scores": - if r.TryDecodeAsNil() { - x.Scores = nil - } else { - if false { - } else { - z.F.DecMapStringFloat64X(&x.Scores, d) - } - } - case "ScoreMetaData": - if r.TryDecodeAsNil() { - x.ScoreMetaData = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeScoreMeta((*[]*NodeScoreMeta)(&x.ScoreMetaData), d) - } - } - case "AllocationTime": - if r.TryDecodeAsNil() { - x.AllocationTime = 0 - } else { - if false { - } else if yyxt24 := z.Extension(z.I2Rtid(x.AllocationTime)); yyxt24 != nil { - z.DecExtension(x.AllocationTime, yyxt24) - } else { - x.AllocationTime = (time.Duration)(r.DecodeInt64()) - } - } - case "CoalescedFailures": - if r.TryDecodeAsNil() { - x.CoalescedFailures = 0 - } else { - x.CoalescedFailures = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocMetric) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj26 int - var yyb26 bool - var yyhl26 bool = l >= 0 - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodesEvaluated = 0 - } else { - x.NodesEvaluated = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodesFiltered = 0 - } else { - x.NodesFiltered = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodesAvailable = nil - } else { - if false { - } else { - z.F.DecMapStringIntX(&x.NodesAvailable, d) - } - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ClassFiltered = nil - } else { - if false { - } else { - z.F.DecMapStringIntX(&x.ClassFiltered, d) - } - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ConstraintFiltered = nil - } else { - if false { - } else { - z.F.DecMapStringIntX(&x.ConstraintFiltered, d) - } - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodesExhausted = 0 - } else { - x.NodesExhausted = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ClassExhausted = nil - } else { - if false { - } else { - z.F.DecMapStringIntX(&x.ClassExhausted, d) - } - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DimensionExhausted = nil - } else { - if false { - } else { - z.F.DecMapStringIntX(&x.DimensionExhausted, d) - } - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QuotaExhausted = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.QuotaExhausted, d) - } - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Scores = nil - } else { - if false { - } else { - z.F.DecMapStringFloat64X(&x.Scores, d) - } - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ScoreMetaData = nil - } else { - if false { - } else { - h.decSlicePtrtoNodeScoreMeta((*[]*NodeScoreMeta)(&x.ScoreMetaData), d) - } - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocationTime = 0 - } else { - if false { - } else if yyxt47 := z.Extension(z.I2Rtid(x.AllocationTime)); yyxt47 != nil { - z.DecExtension(x.AllocationTime, yyxt47) - } else { - x.AllocationTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CoalescedFailures = 0 - } else { - x.CoalescedFailures = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - for { - yyj26++ - if yyhl26 { - yyb26 = yyj26 > l - } else { - yyb26 = r.CheckBreak() - } - if yyb26 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj26-1, "") - } - r.ReadArrayEnd() -} - -func (x *NodeScoreMeta) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(3) - } else { - r.WriteMapStart(3) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Scores == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringFloat64V(x.Scores, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Scores\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Scores`) - } - r.WriteMapElemValue() - if x.Scores == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringFloat64V(x.Scores, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeFloat64(float64(x.NormScore)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NormScore\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NormScore`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeFloat64(float64(x.NormScore)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *NodeScoreMeta) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *NodeScoreMeta) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "NodeID": - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - case "Scores": - if r.TryDecodeAsNil() { - x.Scores = nil - } else { - if false { - } else { - z.F.DecMapStringFloat64X(&x.Scores, d) - } - } - case "NormScore": - if r.TryDecodeAsNil() { - x.NormScore = 0 - } else { - x.NormScore = (float64)(r.DecodeFloat64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *NodeScoreMeta) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj8 int - var yyb8 bool - var yyhl8 bool = l >= 0 - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Scores = nil - } else { - if false { - } else { - z.F.DecMapStringFloat64X(&x.Scores, d) - } - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NormScore = 0 - } else { - x.NormScore = (float64)(r.DecodeFloat64()) - } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj8-1, "") - } - r.ReadArrayEnd() -} - -func (x *AllocDeploymentStatus) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - var yyn3 bool - if x.Healthy == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Healthy == nil { - r.EncodeNil() - } else { - yy4 := *x.Healthy - if false { - } else { - r.EncodeBool(bool(yy4)) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Healthy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Healthy`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Healthy == nil { - r.EncodeNil() - } else { - yy6 := *x.Healthy - if false { - } else { - r.EncodeBool(bool(yy6)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.Timestamp) - } else if yyxt9 := z.Extension(z.I2Rtid(x.Timestamp)); yyxt9 != nil { - z.EncExtension(x.Timestamp, yyxt9) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.Timestamp) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.Timestamp) - } else { - z.EncFallback(x.Timestamp) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Timestamp\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Timestamp`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.Timestamp) - } else if yyxt10 := z.Extension(z.I2Rtid(x.Timestamp)); yyxt10 != nil { - z.EncExtension(x.Timestamp, yyxt10) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.Timestamp) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.Timestamp) - } else { - z.EncFallback(x.Timestamp) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Canary)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Canary\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Canary`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Canary)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *AllocDeploymentStatus) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *AllocDeploymentStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Healthy": - if r.TryDecodeAsNil() { - if true && x.Healthy != nil { - x.Healthy = nil - } - } else { - if x.Healthy == nil { - x.Healthy = new(bool) - } - - if false { - } else { - *x.Healthy = (bool)(r.DecodeBool()) - } - } - case "Timestamp": - if r.TryDecodeAsNil() { - x.Timestamp = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.Timestamp = r.DecodeTime() - } else if yyxt7 := z.Extension(z.I2Rtid(x.Timestamp)); yyxt7 != nil { - z.DecExtension(x.Timestamp, yyxt7) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.Timestamp) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.Timestamp) - } else { - z.DecFallback(&x.Timestamp, false) - } - } - case "Canary": - if r.TryDecodeAsNil() { - x.Canary = false - } else { - x.Canary = (bool)(r.DecodeBool()) - } - case "ModifyIndex": - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *AllocDeploymentStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Healthy != nil { - x.Healthy = nil - } - } else { - if x.Healthy == nil { - x.Healthy = new(bool) - } - - if false { - } else { - *x.Healthy = (bool)(r.DecodeBool()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Timestamp = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.Timestamp = r.DecodeTime() - } else if yyxt14 := z.Extension(z.I2Rtid(x.Timestamp)); yyxt14 != nil { - z.DecExtension(x.Timestamp, yyxt14) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.Timestamp) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.Timestamp) - } else { - z.DecFallback(&x.Timestamp, false) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Canary = false - } else { - x.Canary = (bool)(r.DecodeBool()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *Evaluation) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - var yyq2 = [29]bool{ // should field at this index be written? - x.ID != "", // ID - x.Namespace != "", // Namespace - x.Priority != 0, // Priority - x.Type != "", // Type - x.TriggeredBy != "", // TriggeredBy - x.JobID != "", // JobID - x.JobModifyIndex != 0, // JobModifyIndex - x.NodeID != "", // NodeID - x.NodeModifyIndex != 0, // NodeModifyIndex - x.DeploymentID != "", // DeploymentID - x.Status != "", // Status - x.StatusDescription != "", // StatusDescription - x.Wait != 0, // Wait - !(x.WaitUntil.IsZero()), // WaitUntil - x.NextEval != "", // NextEval - x.PreviousEval != "", // PreviousEval - x.BlockedEval != "", // BlockedEval - len(x.FailedTGAllocs) != 0, // FailedTGAllocs - len(x.ClassEligibility) != 0, // ClassEligibility - x.QuotaLimitReached != "", // QuotaLimitReached - x.EscapedComputedClass, // EscapedComputedClass - x.AnnotatePlan, // AnnotatePlan - len(x.QueuedAllocations) != 0, // QueuedAllocations - x.LeaderACL != "", // LeaderACL - x.SnapshotIndex != 0, // SnapshotIndex - x.CreateIndex != 0, // CreateIndex - x.ModifyIndex != 0, // ModifyIndex - x.CreateTime != 0, // CreateTime - x.ModifyTime != 0, // ModifyTime - } - _ = yyq2 - if yyr2 || yy2arr2 { - r.WriteArrayStart(29) - } else { - var yynn2 int - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.WriteMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[0] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[0] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.ID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.ID)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[1] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[1] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[2] { - if false { - } else { - r.EncodeInt(int64(x.Priority)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[2] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Priority\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Priority`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Priority)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[3] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Type))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Type)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[3] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Type\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Type`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Type))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Type)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[4] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TriggeredBy))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TriggeredBy)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[4] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"TriggeredBy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `TriggeredBy`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.TriggeredBy))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.TriggeredBy)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[5] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[5] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.JobID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.JobID)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[6] { - if false { - } else { - r.EncodeUint(uint64(x.JobModifyIndex)) - } - } else { - r.EncodeUint(0) - } - } else { - if yyq2[6] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"JobModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `JobModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.JobModifyIndex)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[7] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[7] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NodeID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NodeID)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[8] { - if false { - } else { - r.EncodeUint(uint64(x.NodeModifyIndex)) - } - } else { - r.EncodeUint(0) - } - } else { - if yyq2[8] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.NodeModifyIndex)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[9] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DeploymentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DeploymentID)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[9] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeploymentID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DeploymentID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.DeploymentID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.DeploymentID)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[10] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Status))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Status)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[10] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Status\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Status`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Status))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Status)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[11] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.StatusDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.StatusDescription)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[11] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"StatusDescription\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `StatusDescription`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.StatusDescription))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.StatusDescription)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[12] { - if false { - } else if yyxt40 := z.Extension(z.I2Rtid(x.Wait)); yyxt40 != nil { - z.EncExtension(x.Wait, yyxt40) - } else { - r.EncodeInt(int64(x.Wait)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[12] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Wait\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Wait`) - } - r.WriteMapElemValue() - if false { - } else if yyxt41 := z.Extension(z.I2Rtid(x.Wait)); yyxt41 != nil { - z.EncExtension(x.Wait, yyxt41) - } else { - r.EncodeInt(int64(x.Wait)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[13] { - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.WaitUntil) - } else if yyxt43 := z.Extension(z.I2Rtid(x.WaitUntil)); yyxt43 != nil { - z.EncExtension(x.WaitUntil, yyxt43) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.WaitUntil) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.WaitUntil) - } else { - z.EncFallback(x.WaitUntil) - } - } else { - r.EncodeNil() - } - } else { - if yyq2[13] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"WaitUntil\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `WaitUntil`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.WaitUntil) - } else if yyxt44 := z.Extension(z.I2Rtid(x.WaitUntil)); yyxt44 != nil { - z.EncExtension(x.WaitUntil, yyxt44) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.WaitUntil) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.WaitUntil) - } else { - z.EncFallback(x.WaitUntil) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[14] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextEval))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextEval)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[14] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NextEval\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NextEval`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.NextEval))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.NextEval)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[15] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PreviousEval))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PreviousEval)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[15] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PreviousEval\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PreviousEval`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PreviousEval))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PreviousEval)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[16] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.BlockedEval))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.BlockedEval)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[16] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"BlockedEval\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `BlockedEval`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.BlockedEval))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.BlockedEval)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[17] { - if x.FailedTGAllocs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoAllocMetric((map[string]*AllocMetric)(x.FailedTGAllocs), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[17] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"FailedTGAllocs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `FailedTGAllocs`) - } - r.WriteMapElemValue() - if x.FailedTGAllocs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoAllocMetric((map[string]*AllocMetric)(x.FailedTGAllocs), e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[18] { - if x.ClassEligibility == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringBoolV(x.ClassEligibility, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[18] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ClassEligibility\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ClassEligibility`) - } - r.WriteMapElemValue() - if x.ClassEligibility == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringBoolV(x.ClassEligibility, e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[19] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.QuotaLimitReached))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.QuotaLimitReached)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[19] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"QuotaLimitReached\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `QuotaLimitReached`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.QuotaLimitReached))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.QuotaLimitReached)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[20] { - if false { - } else { - r.EncodeBool(bool(x.EscapedComputedClass)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq2[20] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EscapedComputedClass\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EscapedComputedClass`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.EscapedComputedClass)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[21] { - if false { - } else { - r.EncodeBool(bool(x.AnnotatePlan)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq2[21] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AnnotatePlan\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AnnotatePlan`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AnnotatePlan)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[22] { - if x.QueuedAllocations == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntV(x.QueuedAllocations, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[22] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"QueuedAllocations\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `QueuedAllocations`) - } - r.WriteMapElemValue() - if x.QueuedAllocations == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntV(x.QueuedAllocations, e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[23] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LeaderACL))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.LeaderACL)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[23] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LeaderACL\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LeaderACL`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.LeaderACL))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.LeaderACL)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[24] { - if false { - } else { - r.EncodeUint(uint64(x.SnapshotIndex)) - } - } else { - r.EncodeUint(0) - } - } else { - if yyq2[24] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SnapshotIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SnapshotIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.SnapshotIndex)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[25] { - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } else { - r.EncodeUint(0) - } - } else { - if yyq2[25] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[26] { - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } else { - r.EncodeUint(0) - } - } else { - if yyq2[26] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[27] { - if false { - } else { - r.EncodeInt(int64(x.CreateTime)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[27] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateTime`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.CreateTime)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[28] { - if false { - } else { - r.EncodeInt(int64(x.ModifyTime)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[28] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModifyTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ModifyTime`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.ModifyTime)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *Evaluation) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *Evaluation) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "ID": - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "Priority": - if r.TryDecodeAsNil() { - x.Priority = 0 - } else { - x.Priority = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "Type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - case "TriggeredBy": - if r.TryDecodeAsNil() { - x.TriggeredBy = "" - } else { - x.TriggeredBy = (string)(r.DecodeString()) - } - case "JobID": - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - case "JobModifyIndex": - if r.TryDecodeAsNil() { - x.JobModifyIndex = 0 - } else { - x.JobModifyIndex = (uint64)(r.DecodeUint64()) - } - case "NodeID": - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - case "NodeModifyIndex": - if r.TryDecodeAsNil() { - x.NodeModifyIndex = 0 - } else { - x.NodeModifyIndex = (uint64)(r.DecodeUint64()) - } - case "DeploymentID": - if r.TryDecodeAsNil() { - x.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - case "Status": - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - case "StatusDescription": - if r.TryDecodeAsNil() { - x.StatusDescription = "" - } else { - x.StatusDescription = (string)(r.DecodeString()) - } - case "Wait": - if r.TryDecodeAsNil() { - x.Wait = 0 - } else { - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.Wait)); yyxt17 != nil { - z.DecExtension(x.Wait, yyxt17) - } else { - x.Wait = (time.Duration)(r.DecodeInt64()) - } - } - case "WaitUntil": - if r.TryDecodeAsNil() { - x.WaitUntil = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.WaitUntil = r.DecodeTime() - } else if yyxt19 := z.Extension(z.I2Rtid(x.WaitUntil)); yyxt19 != nil { - z.DecExtension(x.WaitUntil, yyxt19) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.WaitUntil) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.WaitUntil) - } else { - z.DecFallback(&x.WaitUntil, false) - } - } - case "NextEval": - if r.TryDecodeAsNil() { - x.NextEval = "" - } else { - x.NextEval = (string)(r.DecodeString()) - } - case "PreviousEval": - if r.TryDecodeAsNil() { - x.PreviousEval = "" - } else { - x.PreviousEval = (string)(r.DecodeString()) - } - case "BlockedEval": - if r.TryDecodeAsNil() { - x.BlockedEval = "" - } else { - x.BlockedEval = (string)(r.DecodeString()) - } - case "FailedTGAllocs": - if r.TryDecodeAsNil() { - x.FailedTGAllocs = nil - } else { - if false { - } else { - h.decMapstringPtrtoAllocMetric((*map[string]*AllocMetric)(&x.FailedTGAllocs), d) - } - } - case "ClassEligibility": - if r.TryDecodeAsNil() { - x.ClassEligibility = nil - } else { - if false { - } else { - z.F.DecMapStringBoolX(&x.ClassEligibility, d) - } - } - case "QuotaLimitReached": - if r.TryDecodeAsNil() { - x.QuotaLimitReached = "" - } else { - x.QuotaLimitReached = (string)(r.DecodeString()) - } - case "EscapedComputedClass": - if r.TryDecodeAsNil() { - x.EscapedComputedClass = false - } else { - x.EscapedComputedClass = (bool)(r.DecodeBool()) - } - case "AnnotatePlan": - if r.TryDecodeAsNil() { - x.AnnotatePlan = false - } else { - x.AnnotatePlan = (bool)(r.DecodeBool()) - } - case "QueuedAllocations": - if r.TryDecodeAsNil() { - x.QueuedAllocations = nil - } else { - if false { - } else { - z.F.DecMapStringIntX(&x.QueuedAllocations, d) - } - } - case "LeaderACL": - if r.TryDecodeAsNil() { - x.LeaderACL = "" - } else { - x.LeaderACL = (string)(r.DecodeString()) - } - case "SnapshotIndex": - if r.TryDecodeAsNil() { - x.SnapshotIndex = 0 - } else { - x.SnapshotIndex = (uint64)(r.DecodeUint64()) - } - case "CreateIndex": - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - case "ModifyIndex": - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - case "CreateTime": - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - case "ModifyTime": - if r.TryDecodeAsNil() { - x.ModifyTime = 0 - } else { - x.ModifyTime = (int64)(r.DecodeInt64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *Evaluation) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj38 int - var yyb38 bool - var yyhl38 bool = l >= 0 - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ID = "" - } else { - x.ID = (string)(r.DecodeString()) - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Priority = 0 - } else { - x.Priority = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.TriggeredBy = "" - } else { - x.TriggeredBy = (string)(r.DecodeString()) - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobID = "" - } else { - x.JobID = (string)(r.DecodeString()) - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.JobModifyIndex = 0 - } else { - x.JobModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeID = "" - } else { - x.NodeID = (string)(r.DecodeString()) - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeModifyIndex = 0 - } else { - x.NodeModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentID = "" - } else { - x.DeploymentID = (string)(r.DecodeString()) - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Status = "" - } else { - x.Status = (string)(r.DecodeString()) - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.StatusDescription = "" - } else { - x.StatusDescription = (string)(r.DecodeString()) - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Wait = 0 - } else { - if false { - } else if yyxt52 := z.Extension(z.I2Rtid(x.Wait)); yyxt52 != nil { - z.DecExtension(x.Wait, yyxt52) - } else { - x.Wait = (time.Duration)(r.DecodeInt64()) - } - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WaitUntil = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.WaitUntil = r.DecodeTime() - } else if yyxt54 := z.Extension(z.I2Rtid(x.WaitUntil)); yyxt54 != nil { - z.DecExtension(x.WaitUntil, yyxt54) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.WaitUntil) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.WaitUntil) - } else { - z.DecFallback(&x.WaitUntil, false) - } - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NextEval = "" - } else { - x.NextEval = (string)(r.DecodeString()) - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreviousEval = "" - } else { - x.PreviousEval = (string)(r.DecodeString()) - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.BlockedEval = "" - } else { - x.BlockedEval = (string)(r.DecodeString()) - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.FailedTGAllocs = nil - } else { - if false { - } else { - h.decMapstringPtrtoAllocMetric((*map[string]*AllocMetric)(&x.FailedTGAllocs), d) - } - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ClassEligibility = nil - } else { - if false { - } else { - z.F.DecMapStringBoolX(&x.ClassEligibility, d) - } - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QuotaLimitReached = "" - } else { - x.QuotaLimitReached = (string)(r.DecodeString()) - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EscapedComputedClass = false - } else { - x.EscapedComputedClass = (bool)(r.DecodeBool()) - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AnnotatePlan = false - } else { - x.AnnotatePlan = (bool)(r.DecodeBool()) - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueuedAllocations = nil - } else { - if false { - } else { - z.F.DecMapStringIntX(&x.QueuedAllocations, d) - } - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.LeaderACL = "" - } else { - x.LeaderACL = (string)(r.DecodeString()) - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SnapshotIndex = 0 - } else { - x.SnapshotIndex = (uint64)(r.DecodeUint64()) - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateTime = 0 - } else { - x.CreateTime = (int64)(r.DecodeInt64()) - } - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyTime = 0 - } else { - x.ModifyTime = (int64)(r.DecodeInt64()) - } - for { - yyj38++ - if yyhl38 { - yyb38 = yyj38 > l - } else { - yyb38 = r.CheckBreak() - } - if yyb38 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj38-1, "") - } - r.ReadArrayEnd() -} - -func (x *Plan) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - var yyq2 = [12]bool{ // should field at this index be written? - x.EvalID != "", // EvalID - x.EvalToken != "", // EvalToken - x.Priority != 0, // Priority - x.AllAtOnce, // AllAtOnce - x.Job != nil, // Job - len(x.NodeUpdate) != 0, // NodeUpdate - len(x.NodeAllocation) != 0, // NodeAllocation - x.Annotations != nil, // Annotations - x.Deployment != nil, // Deployment - len(x.DeploymentUpdates) != 0, // DeploymentUpdates - len(x.NodePreemptions) != 0, // NodePreemptions - x.SnapshotIndex != 0, // SnapshotIndex - } - _ = yyq2 - if yyr2 || yy2arr2 { - r.WriteArrayStart(12) - } else { - var yynn2 int - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.WriteMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[0] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[0] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalID)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[1] { - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalToken)) - } - } - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw([]byte{}) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, "") - } - } - } else { - if yyq2[1] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"EvalToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `EvalToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.EvalToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.EvalToken)) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[2] { - if false { - } else { - r.EncodeInt(int64(x.Priority)) - } - } else { - r.EncodeInt(0) - } - } else { - if yyq2[2] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Priority\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Priority`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.Priority)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[3] { - if false { - } else { - r.EncodeBool(bool(x.AllAtOnce)) - } - } else { - r.EncodeBool(false) - } - } else { - if yyq2[3] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllAtOnce\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllAtOnce`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllAtOnce)) - } - } - } - var yyn15 bool - if x.Job == nil { - yyn15 = true - goto LABEL15 - } - LABEL15: - if yyr2 || yy2arr2 { - if yyn15 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[4] { - if x.Job == nil { - r.EncodeNil() - } else { - x.Job.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[4] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Job\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Job`) - } - r.WriteMapElemValue() - if yyn15 { - r.EncodeNil() - } else { - if x.Job == nil { - r.EncodeNil() - } else { - x.Job.CodecEncodeSelf(e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[5] { - if x.NodeUpdate == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringSlicePtrtoAllocation((map[string][]*Allocation)(x.NodeUpdate), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[5] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeUpdate\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeUpdate`) - } - r.WriteMapElemValue() - if x.NodeUpdate == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringSlicePtrtoAllocation((map[string][]*Allocation)(x.NodeUpdate), e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[6] { - if x.NodeAllocation == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringSlicePtrtoAllocation((map[string][]*Allocation)(x.NodeAllocation), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[6] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeAllocation\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeAllocation`) - } - r.WriteMapElemValue() - if x.NodeAllocation == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringSlicePtrtoAllocation((map[string][]*Allocation)(x.NodeAllocation), e) - } - } - } - } - var yyn24 bool - if x.Annotations == nil { - yyn24 = true - goto LABEL24 - } - LABEL24: - if yyr2 || yy2arr2 { - if yyn24 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[7] { - if x.Annotations == nil { - r.EncodeNil() - } else { - x.Annotations.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[7] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Annotations\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Annotations`) - } - r.WriteMapElemValue() - if yyn24 { - r.EncodeNil() - } else { - if x.Annotations == nil { - r.EncodeNil() - } else { - x.Annotations.CodecEncodeSelf(e) - } - } - } - } - var yyn27 bool - if x.Deployment == nil { - yyn27 = true - goto LABEL27 - } - LABEL27: - if yyr2 || yy2arr2 { - if yyn27 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if yyq2[8] { - if x.Deployment == nil { - r.EncodeNil() - } else { - x.Deployment.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } - } else { - if yyq2[8] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Deployment\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Deployment`) - } - r.WriteMapElemValue() - if yyn27 { - r.EncodeNil() - } else { - if x.Deployment == nil { - r.EncodeNil() - } else { - x.Deployment.CodecEncodeSelf(e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[9] { - if x.DeploymentUpdates == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoDeploymentStatusUpdate(([]*DeploymentStatusUpdate)(x.DeploymentUpdates), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[9] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeploymentUpdates\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DeploymentUpdates`) - } - r.WriteMapElemValue() - if x.DeploymentUpdates == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoDeploymentStatusUpdate(([]*DeploymentStatusUpdate)(x.DeploymentUpdates), e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[10] { - if x.NodePreemptions == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringSlicePtrtoAllocation((map[string][]*Allocation)(x.NodePreemptions), e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[10] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodePreemptions\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodePreemptions`) - } - r.WriteMapElemValue() - if x.NodePreemptions == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringSlicePtrtoAllocation((map[string][]*Allocation)(x.NodePreemptions), e) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if yyq2[11] { - if false { - } else { - r.EncodeUint(uint64(x.SnapshotIndex)) - } - } else { - r.EncodeUint(0) - } - } else { - if yyq2[11] { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SnapshotIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SnapshotIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.SnapshotIndex)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *Plan) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *Plan) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "EvalID": - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - case "EvalToken": - if r.TryDecodeAsNil() { - x.EvalToken = "" - } else { - x.EvalToken = (string)(r.DecodeString()) - } - case "Priority": - if r.TryDecodeAsNil() { - x.Priority = 0 - } else { - x.Priority = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - case "AllAtOnce": - if r.TryDecodeAsNil() { - x.AllAtOnce = false - } else { - x.AllAtOnce = (bool)(r.DecodeBool()) - } - case "Job": - if r.TryDecodeAsNil() { - if true && x.Job != nil { - x.Job = nil - } - } else { - if x.Job == nil { - x.Job = new(Job) - } - - x.Job.CodecDecodeSelf(d) - } - case "NodeUpdate": - if r.TryDecodeAsNil() { - x.NodeUpdate = nil - } else { - if false { - } else { - h.decMapstringSlicePtrtoAllocation((*map[string][]*Allocation)(&x.NodeUpdate), d) - } - } - case "NodeAllocation": - if r.TryDecodeAsNil() { - x.NodeAllocation = nil - } else { - if false { - } else { - h.decMapstringSlicePtrtoAllocation((*map[string][]*Allocation)(&x.NodeAllocation), d) - } - } - case "Annotations": - if r.TryDecodeAsNil() { - if true && x.Annotations != nil { - x.Annotations = nil - } - } else { - if x.Annotations == nil { - x.Annotations = new(PlanAnnotations) - } - - x.Annotations.CodecDecodeSelf(d) - } - case "Deployment": - if r.TryDecodeAsNil() { - if true && x.Deployment != nil { - x.Deployment = nil - } - } else { - if x.Deployment == nil { - x.Deployment = new(Deployment) - } - - x.Deployment.CodecDecodeSelf(d) - } - case "DeploymentUpdates": - if r.TryDecodeAsNil() { - x.DeploymentUpdates = nil - } else { - if false { - } else { - h.decSlicePtrtoDeploymentStatusUpdate((*[]*DeploymentStatusUpdate)(&x.DeploymentUpdates), d) - } - } - case "NodePreemptions": - if r.TryDecodeAsNil() { - x.NodePreemptions = nil - } else { - if false { - } else { - h.decMapstringSlicePtrtoAllocation((*map[string][]*Allocation)(&x.NodePreemptions), d) - } - } - case "SnapshotIndex": - if r.TryDecodeAsNil() { - x.SnapshotIndex = 0 - } else { - x.SnapshotIndex = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *Plan) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj20 int - var yyb20 bool - var yyhl20 bool = l >= 0 - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalID = "" - } else { - x.EvalID = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.EvalToken = "" - } else { - x.EvalToken = (string)(r.DecodeString()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Priority = 0 - } else { - x.Priority = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllAtOnce = false - } else { - x.AllAtOnce = (bool)(r.DecodeBool()) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Job != nil { - x.Job = nil - } - } else { - if x.Job == nil { - x.Job = new(Job) - } - - x.Job.CodecDecodeSelf(d) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeUpdate = nil - } else { - if false { - } else { - h.decMapstringSlicePtrtoAllocation((*map[string][]*Allocation)(&x.NodeUpdate), d) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeAllocation = nil - } else { - if false { - } else { - h.decMapstringSlicePtrtoAllocation((*map[string][]*Allocation)(&x.NodeAllocation), d) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Annotations != nil { - x.Annotations = nil - } - } else { - if x.Annotations == nil { - x.Annotations = new(PlanAnnotations) - } - - x.Annotations.CodecDecodeSelf(d) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Deployment != nil { - x.Deployment = nil - } - } else { - if x.Deployment == nil { - x.Deployment = new(Deployment) - } - - x.Deployment.CodecDecodeSelf(d) - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentUpdates = nil - } else { - if false { - } else { - h.decSlicePtrtoDeploymentStatusUpdate((*[]*DeploymentStatusUpdate)(&x.DeploymentUpdates), d) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodePreemptions = nil - } else { - if false { - } else { - h.decMapstringSlicePtrtoAllocation((*map[string][]*Allocation)(&x.NodePreemptions), d) - } - } - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SnapshotIndex = 0 - } else { - x.SnapshotIndex = (uint64)(r.DecodeUint64()) - } - for { - yyj20++ - if yyhl20 { - yyb20 = yyj20 > l - } else { - yyb20 = r.CheckBreak() - } - if yyb20 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj20-1, "") - } - r.ReadArrayEnd() -} - -func (x *PlanResult) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(7) - } else { - r.WriteMapStart(7) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.NodeUpdate == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringSlicePtrtoAllocation((map[string][]*Allocation)(x.NodeUpdate), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeUpdate\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeUpdate`) - } - r.WriteMapElemValue() - if x.NodeUpdate == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringSlicePtrtoAllocation((map[string][]*Allocation)(x.NodeUpdate), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.NodeAllocation == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringSlicePtrtoAllocation((map[string][]*Allocation)(x.NodeAllocation), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodeAllocation\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodeAllocation`) - } - r.WriteMapElemValue() - if x.NodeAllocation == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringSlicePtrtoAllocation((map[string][]*Allocation)(x.NodeAllocation), e) - } - } - } - var yyn9 bool - if x.Deployment == nil { - yyn9 = true - goto LABEL9 - } - LABEL9: - if yyr2 || yy2arr2 { - if yyn9 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Deployment == nil { - r.EncodeNil() - } else { - x.Deployment.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Deployment\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Deployment`) - } - r.WriteMapElemValue() - if yyn9 { - r.EncodeNil() - } else { - if x.Deployment == nil { - r.EncodeNil() - } else { - x.Deployment.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.DeploymentUpdates == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoDeploymentStatusUpdate(([]*DeploymentStatusUpdate)(x.DeploymentUpdates), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DeploymentUpdates\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DeploymentUpdates`) - } - r.WriteMapElemValue() - if x.DeploymentUpdates == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoDeploymentStatusUpdate(([]*DeploymentStatusUpdate)(x.DeploymentUpdates), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.NodePreemptions == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringSlicePtrtoAllocation((map[string][]*Allocation)(x.NodePreemptions), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NodePreemptions\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NodePreemptions`) - } - r.WriteMapElemValue() - if x.NodePreemptions == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringSlicePtrtoAllocation((map[string][]*Allocation)(x.NodePreemptions), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.RefreshIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RefreshIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RefreshIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.RefreshIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.AllocIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllocIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllocIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.AllocIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *PlanResult) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *PlanResult) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "NodeUpdate": - if r.TryDecodeAsNil() { - x.NodeUpdate = nil - } else { - if false { - } else { - h.decMapstringSlicePtrtoAllocation((*map[string][]*Allocation)(&x.NodeUpdate), d) - } - } - case "NodeAllocation": - if r.TryDecodeAsNil() { - x.NodeAllocation = nil - } else { - if false { - } else { - h.decMapstringSlicePtrtoAllocation((*map[string][]*Allocation)(&x.NodeAllocation), d) - } - } - case "Deployment": - if r.TryDecodeAsNil() { - if true && x.Deployment != nil { - x.Deployment = nil - } - } else { - if x.Deployment == nil { - x.Deployment = new(Deployment) - } - - x.Deployment.CodecDecodeSelf(d) - } - case "DeploymentUpdates": - if r.TryDecodeAsNil() { - x.DeploymentUpdates = nil - } else { - if false { - } else { - h.decSlicePtrtoDeploymentStatusUpdate((*[]*DeploymentStatusUpdate)(&x.DeploymentUpdates), d) - } - } - case "NodePreemptions": - if r.TryDecodeAsNil() { - x.NodePreemptions = nil - } else { - if false { - } else { - h.decMapstringSlicePtrtoAllocation((*map[string][]*Allocation)(&x.NodePreemptions), d) - } - } - case "RefreshIndex": - if r.TryDecodeAsNil() { - x.RefreshIndex = 0 - } else { - x.RefreshIndex = (uint64)(r.DecodeUint64()) - } - case "AllocIndex": - if r.TryDecodeAsNil() { - x.AllocIndex = 0 - } else { - x.AllocIndex = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *PlanResult) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj15 int - var yyb15 bool - var yyhl15 bool = l >= 0 - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeUpdate = nil - } else { - if false { - } else { - h.decMapstringSlicePtrtoAllocation((*map[string][]*Allocation)(&x.NodeUpdate), d) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodeAllocation = nil - } else { - if false { - } else { - h.decMapstringSlicePtrtoAllocation((*map[string][]*Allocation)(&x.NodeAllocation), d) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Deployment != nil { - x.Deployment = nil - } - } else { - if x.Deployment == nil { - x.Deployment = new(Deployment) - } - - x.Deployment.CodecDecodeSelf(d) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DeploymentUpdates = nil - } else { - if false { - } else { - h.decSlicePtrtoDeploymentStatusUpdate((*[]*DeploymentStatusUpdate)(&x.DeploymentUpdates), d) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NodePreemptions = nil - } else { - if false { - } else { - h.decMapstringSlicePtrtoAllocation((*map[string][]*Allocation)(&x.NodePreemptions), d) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.RefreshIndex = 0 - } else { - x.RefreshIndex = (uint64)(r.DecodeUint64()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AllocIndex = 0 - } else { - x.AllocIndex = (uint64)(r.DecodeUint64()) - } - for { - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj15-1, "") - } - r.ReadArrayEnd() -} - -func (x *PlanAnnotations) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(2) - } else { - r.WriteMapStart(2) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.DesiredTGUpdates == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoDesiredUpdates((map[string]*DesiredUpdates)(x.DesiredTGUpdates), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DesiredTGUpdates\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DesiredTGUpdates`) - } - r.WriteMapElemValue() - if x.DesiredTGUpdates == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoDesiredUpdates((map[string]*DesiredUpdates)(x.DesiredTGUpdates), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.PreemptedAllocs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocListStub(([]*AllocListStub)(x.PreemptedAllocs), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PreemptedAllocs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PreemptedAllocs`) - } - r.WriteMapElemValue() - if x.PreemptedAllocs == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocListStub(([]*AllocListStub)(x.PreemptedAllocs), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *PlanAnnotations) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *PlanAnnotations) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "DesiredTGUpdates": - if r.TryDecodeAsNil() { - x.DesiredTGUpdates = nil - } else { - if false { - } else { - h.decMapstringPtrtoDesiredUpdates((*map[string]*DesiredUpdates)(&x.DesiredTGUpdates), d) - } - } - case "PreemptedAllocs": - if r.TryDecodeAsNil() { - x.PreemptedAllocs = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocListStub((*[]*AllocListStub)(&x.PreemptedAllocs), d) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *PlanAnnotations) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj8 int - var yyb8 bool - var yyhl8 bool = l >= 0 - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DesiredTGUpdates = nil - } else { - if false { - } else { - h.decMapstringPtrtoDesiredUpdates((*map[string]*DesiredUpdates)(&x.DesiredTGUpdates), d) - } - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PreemptedAllocs = nil - } else { - if false { - } else { - h.decSlicePtrtoAllocListStub((*[]*AllocListStub)(&x.PreemptedAllocs), d) - } - } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj8-1, "") - } - r.ReadArrayEnd() -} - -func (x *DesiredUpdates) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(8) - } else { - r.WriteMapStart(8) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Ignore)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Ignore\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Ignore`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Ignore)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Place)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Place\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Place`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Place)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Migrate)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Migrate\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Migrate`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Migrate)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Stop)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Stop\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Stop`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Stop)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.InPlaceUpdate)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"InPlaceUpdate\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `InPlaceUpdate`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.InPlaceUpdate)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.DestructiveUpdate)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"DestructiveUpdate\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `DestructiveUpdate`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.DestructiveUpdate)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Canary)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Canary\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Canary`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Canary)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Preemptions)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Preemptions\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Preemptions`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Preemptions)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *DesiredUpdates) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *DesiredUpdates) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Ignore": - if r.TryDecodeAsNil() { - x.Ignore = 0 - } else { - x.Ignore = (uint64)(r.DecodeUint64()) - } - case "Place": - if r.TryDecodeAsNil() { - x.Place = 0 - } else { - x.Place = (uint64)(r.DecodeUint64()) - } - case "Migrate": - if r.TryDecodeAsNil() { - x.Migrate = 0 - } else { - x.Migrate = (uint64)(r.DecodeUint64()) - } - case "Stop": - if r.TryDecodeAsNil() { - x.Stop = 0 - } else { - x.Stop = (uint64)(r.DecodeUint64()) - } - case "InPlaceUpdate": - if r.TryDecodeAsNil() { - x.InPlaceUpdate = 0 - } else { - x.InPlaceUpdate = (uint64)(r.DecodeUint64()) - } - case "DestructiveUpdate": - if r.TryDecodeAsNil() { - x.DestructiveUpdate = 0 - } else { - x.DestructiveUpdate = (uint64)(r.DecodeUint64()) - } - case "Canary": - if r.TryDecodeAsNil() { - x.Canary = 0 - } else { - x.Canary = (uint64)(r.DecodeUint64()) - } - case "Preemptions": - if r.TryDecodeAsNil() { - x.Preemptions = 0 - } else { - x.Preemptions = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *DesiredUpdates) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Ignore = 0 - } else { - x.Ignore = (uint64)(r.DecodeUint64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Place = 0 - } else { - x.Place = (uint64)(r.DecodeUint64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Migrate = 0 - } else { - x.Migrate = (uint64)(r.DecodeUint64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Stop = 0 - } else { - x.Stop = (uint64)(r.DecodeUint64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.InPlaceUpdate = 0 - } else { - x.InPlaceUpdate = (uint64)(r.DecodeUint64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.DestructiveUpdate = 0 - } else { - x.DestructiveUpdate = (uint64)(r.DecodeUint64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Canary = 0 - } else { - x.Canary = (uint64)(r.DecodeUint64()) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Preemptions = 0 - } else { - x.Preemptions = (uint64)(r.DecodeUint64()) - } - for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj12-1, "") - } - r.ReadArrayEnd() -} - -func (x *KeyringResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(3) - } else { - r.WriteMapStart(3) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Messages == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Messages, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Messages\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Messages`) - } - r.WriteMapElemValue() - if x.Messages == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringStringV(x.Messages, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Keys == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntV(x.Keys, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Keys\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Keys`) - } - r.WriteMapElemValue() - if x.Keys == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncMapStringIntV(x.Keys, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeInt(int64(x.NumNodes)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"NumNodes\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `NumNodes`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeInt(int64(x.NumNodes)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *KeyringResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *KeyringResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Messages": - if r.TryDecodeAsNil() { - x.Messages = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Messages, d) - } - } - case "Keys": - if r.TryDecodeAsNil() { - x.Keys = nil - } else { - if false { - } else { - z.F.DecMapStringIntX(&x.Keys, d) - } - } - case "NumNodes": - if r.TryDecodeAsNil() { - x.NumNodes = 0 - } else { - x.NumNodes = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *KeyringResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Messages = nil - } else { - if false { - } else { - z.F.DecMapStringStringX(&x.Messages, d) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Keys = nil - } else { - if false { - } else { - z.F.DecMapStringIntX(&x.Keys, d) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.NumNodes = 0 - } else { - x.NumNodes = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize100)) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *KeyringRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Key))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Key)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Key\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Key`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Key))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Key)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *KeyringRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *KeyringRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Key": - if r.TryDecodeAsNil() { - x.Key = "" - } else { - x.Key = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *KeyringRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj5 int - var yyb5 bool - var yyhl5 bool = l >= 0 - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Key = "" - } else { - x.Key = (string)(r.DecodeString()) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj5-1, "") - } - r.ReadArrayEnd() -} - -func (x *RecoverableError) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(2) - } else { - r.WriteMapStart(2) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Err))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Err)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Err\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Err`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Err))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Err)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Recoverable)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Recoverable\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Recoverable`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Recoverable)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *RecoverableError) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *RecoverableError) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Err": - if r.TryDecodeAsNil() { - x.Err = "" - } else { - x.Err = (string)(r.DecodeString()) - } - case "Recoverable": - if r.TryDecodeAsNil() { - x.Recoverable = false - } else { - x.Recoverable = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *RecoverableError) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Err = "" - } else { - x.Err = (string)(r.DecodeString()) - } - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Recoverable = false - } else { - x.Recoverable = (bool)(r.DecodeBool()) - } - for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj6-1, "") - } - r.ReadArrayEnd() -} - -func (x *WrappedServerError) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(1) - } else { - r.WriteMapStart(1) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Err == nil { - r.EncodeNil() - } else { - if false { - } else { - z.EncFallback(x.Err) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Err\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Err`) - } - r.WriteMapElemValue() - if x.Err == nil { - r.EncodeNil() - } else { - if false { - } else { - z.EncFallback(x.Err) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *WrappedServerError) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *WrappedServerError) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Err": - if r.TryDecodeAsNil() { - x.Err = nil - } else { - if false { - } else { - z.DecFallback(&x.Err, true) - } - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *WrappedServerError) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj6 int - var yyb6 bool - var yyhl6 bool = l >= 0 - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Err = nil - } else { - if false { - } else { - z.DecFallback(&x.Err, true) - } - } - for { - yyj6++ - if yyhl6 { - yyb6 = yyj6 > l - } else { - yyb6 = r.CheckBreak() - } - if yyb6 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj6-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLPolicy) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(7) - } else { - r.WriteMapStart(7) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Description))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Description)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Description\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Description`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Description))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Description)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Rules))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Rules)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Rules\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Rules`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Rules))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Rules)) - } - } - } - var yyn12 bool - if x.RulesJSON == nil { - yyn12 = true - goto LABEL12 - } - LABEL12: - if yyr2 || yy2arr2 { - if yyn12 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.RulesJSON == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.RulesJSON)); yyxt13 != nil { - z.EncExtension(x.RulesJSON, yyxt13) - } else { - z.EncFallback(x.RulesJSON) - } - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"RulesJSON\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `RulesJSON`) - } - r.WriteMapElemValue() - if yyn12 { - r.EncodeNil() - } else { - if x.RulesJSON == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.RulesJSON)); yyxt14 != nil { - z.EncExtension(x.RulesJSON, yyxt14) - } else { - z.EncFallback(x.RulesJSON) - } - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Hash == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.Hash)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Hash\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Hash`) - } - r.WriteMapElemValue() - if x.Hash == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.Hash)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLPolicy) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ACLPolicy) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Description": - if r.TryDecodeAsNil() { - x.Description = "" - } else { - x.Description = (string)(r.DecodeString()) - } - case "Rules": - if r.TryDecodeAsNil() { - x.Rules = "" - } else { - x.Rules = (string)(r.DecodeString()) - } - case "RulesJSON": - if r.TryDecodeAsNil() { - if true && x.RulesJSON != nil { - x.RulesJSON = nil - } - } else { - if x.RulesJSON == nil { - x.RulesJSON = new(pkg3_acl.Policy) - } - - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.RulesJSON)); yyxt8 != nil { - z.DecExtension(x.RulesJSON, yyxt8) - } else { - z.DecFallback(x.RulesJSON, false) - } - } - case "Hash": - if r.TryDecodeAsNil() { - x.Hash = nil - } else { - if false { - } else { - x.Hash = r.DecodeBytes(([]byte)(x.Hash), false) - } - } - case "CreateIndex": - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - case "ModifyIndex": - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLPolicy) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Description = "" - } else { - x.Description = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Rules = "" - } else { - x.Rules = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.RulesJSON != nil { - x.RulesJSON = nil - } - } else { - if x.RulesJSON == nil { - x.RulesJSON = new(pkg3_acl.Policy) - } - - if false { - } else if yyxt18 := z.Extension(z.I2Rtid(x.RulesJSON)); yyxt18 != nil { - z.DecExtension(x.RulesJSON, yyxt18) - } else { - z.DecFallback(x.RulesJSON, false) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Hash = nil - } else { - if false { - } else { - x.Hash = r.DecodeBytes(([]byte)(x.Hash), false) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLPolicyListStub) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Description))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Description)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Description\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Description`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Description))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Description)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Hash == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.Hash)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Hash\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Hash`) - } - r.WriteMapElemValue() - if x.Hash == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.Hash)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLPolicyListStub) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ACLPolicyListStub) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Description": - if r.TryDecodeAsNil() { - x.Description = "" - } else { - x.Description = (string)(r.DecodeString()) - } - case "Hash": - if r.TryDecodeAsNil() { - x.Hash = nil - } else { - if false { - } else { - x.Hash = r.DecodeBytes(([]byte)(x.Hash), false) - } - } - case "CreateIndex": - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - case "ModifyIndex": - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLPolicyListStub) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Description = "" - } else { - x.Description = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Hash = nil - } else { - if false { - } else { - x.Hash = r.DecodeBytes(([]byte)(x.Hash), false) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLPolicyListRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(8) - } else { - r.WriteMapStart(8) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt13 != nil { - z.EncExtension(x.MaxQueryTime, yyxt13) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt14 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt14 != nil { - z.EncExtension(x.MaxQueryTime, yyxt14) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLPolicyListRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ACLPolicyListRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt8 != nil { - z.DecExtension(x.MaxQueryTime, yyxt8) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLPolicyListRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj13 int - var yyb13 bool - var yyhl13 bool = l >= 0 - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt18 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt18 != nil { - z.DecExtension(x.MaxQueryTime, yyxt18) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj13++ - if yyhl13 { - yyb13 = yyj13 > l - } else { - yyb13 = r.CheckBreak() - } - if yyb13 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj13-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLPolicySpecificRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(9) - } else { - r.WriteMapStart(9) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt16 != nil { - z.EncExtension(x.MaxQueryTime, yyxt16) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt17 != nil { - z.EncExtension(x.MaxQueryTime, yyxt17) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLPolicySpecificRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ACLPolicySpecificRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt9 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt9 != nil { - z.DecExtension(x.MaxQueryTime, yyxt9) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLPolicySpecificRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj14 int - var yyb14 bool - var yyhl14 bool = l >= 0 - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt20 != nil { - z.DecExtension(x.MaxQueryTime, yyxt20) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj14-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLPolicySetRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(9) - } else { - r.WriteMapStart(9) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Names == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Names, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Names\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Names`) - } - r.WriteMapElemValue() - if x.Names == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Names, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt16 != nil { - z.EncExtension(x.MaxQueryTime, yyxt16) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt17 != nil { - z.EncExtension(x.MaxQueryTime, yyxt17) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLPolicySetRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ACLPolicySetRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Names": - if r.TryDecodeAsNil() { - x.Names = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Names, d) - } - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt10 != nil { - z.DecExtension(x.MaxQueryTime, yyxt10) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLPolicySetRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj15 int - var yyb15 bool - var yyhl15 bool = l >= 0 - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Names = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Names, d) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt22 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt22 != nil { - z.DecExtension(x.MaxQueryTime, yyxt22) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj15-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLPolicyListResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Policies == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLPolicyListStub(([]*ACLPolicyListStub)(x.Policies), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Policies\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Policies`) - } - r.WriteMapElemValue() - if x.Policies == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLPolicyListStub(([]*ACLPolicyListStub)(x.Policies), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLPolicyListResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ACLPolicyListResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Policies": - if r.TryDecodeAsNil() { - x.Policies = nil - } else { - if false { - } else { - h.decSlicePtrtoACLPolicyListStub((*[]*ACLPolicyListStub)(&x.Policies), d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.LastContact)); yyxt8 != nil { - z.DecExtension(x.LastContact, yyxt8) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLPolicyListResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Policies = nil - } else { - if false { - } else { - h.decSlicePtrtoACLPolicyListStub((*[]*ACLPolicyListStub)(&x.Policies), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.LastContact)); yyxt15 != nil { - z.DecExtension(x.LastContact, yyxt15) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *SingleACLPolicyResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - var yyn3 bool - if x.Policy == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Policy == nil { - r.EncodeNil() - } else { - x.Policy.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Policy\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Policy`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Policy == nil { - r.EncodeNil() - } else { - x.Policy.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *SingleACLPolicyResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *SingleACLPolicyResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Policy": - if r.TryDecodeAsNil() { - if true && x.Policy != nil { - x.Policy = nil - } - } else { - if x.Policy == nil { - x.Policy = new(ACLPolicy) - } - - x.Policy.CodecDecodeSelf(d) - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.LastContact)); yyxt7 != nil { - z.DecExtension(x.LastContact, yyxt7) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *SingleACLPolicyResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Policy != nil { - x.Policy = nil - } - } else { - if x.Policy == nil { - x.Policy = new(ACLPolicy) - } - - x.Policy.CodecDecodeSelf(d) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.LastContact)); yyxt13 != nil { - z.DecExtension(x.LastContact, yyxt13) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLPolicySetResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Policies == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoACLPolicy((map[string]*ACLPolicy)(x.Policies), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Policies\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Policies`) - } - r.WriteMapElemValue() - if x.Policies == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoACLPolicy((map[string]*ACLPolicy)(x.Policies), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLPolicySetResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ACLPolicySetResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Policies": - if r.TryDecodeAsNil() { - x.Policies = nil - } else { - if false { - } else { - h.decMapstringPtrtoACLPolicy((*map[string]*ACLPolicy)(&x.Policies), d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.LastContact)); yyxt8 != nil { - z.DecExtension(x.LastContact, yyxt8) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLPolicySetResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Policies = nil - } else { - if false { - } else { - h.decMapstringPtrtoACLPolicy((*map[string]*ACLPolicy)(&x.Policies), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.LastContact)); yyxt15 != nil { - z.DecExtension(x.LastContact, yyxt15) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLPolicyDeleteRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Names == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Names, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Names\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Names`) - } - r.WriteMapElemValue() - if x.Names == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Names, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLPolicyDeleteRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ACLPolicyDeleteRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Names": - if r.TryDecodeAsNil() { - x.Names = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Names, d) - } - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLPolicyDeleteRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Names = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Names, d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLPolicyUpsertRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Policies == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLPolicy(([]*ACLPolicy)(x.Policies), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Policies\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Policies`) - } - r.WriteMapElemValue() - if x.Policies == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLPolicy(([]*ACLPolicy)(x.Policies), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLPolicyUpsertRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ACLPolicyUpsertRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Policies": - if r.TryDecodeAsNil() { - x.Policies = nil - } else { - if false { - } else { - h.decSlicePtrtoACLPolicy((*[]*ACLPolicy)(&x.Policies), d) - } - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLPolicyUpsertRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Policies = nil - } else { - if false { - } else { - h.decSlicePtrtoACLPolicy((*[]*ACLPolicy)(&x.Policies), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLToken) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(10) - } else { - r.WriteMapStart(10) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AccessorID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AccessorID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AccessorID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AccessorID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AccessorID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AccessorID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SecretID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SecretID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SecretID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SecretID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SecretID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SecretID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Type))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Type)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Type\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Type`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Type))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Type)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Policies == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Policies, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Policies\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Policies`) - } - r.WriteMapElemValue() - if x.Policies == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Policies, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Global)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Global\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Global`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Global)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Hash == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.Hash)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Hash\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Hash`) - } - r.WriteMapElemValue() - if x.Hash == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.Hash)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.CreateTime) - } else if yyxt25 := z.Extension(z.I2Rtid(x.CreateTime)); yyxt25 != nil { - z.EncExtension(x.CreateTime, yyxt25) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.CreateTime) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.CreateTime) - } else { - z.EncFallback(x.CreateTime) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateTime`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.CreateTime) - } else if yyxt26 := z.Extension(z.I2Rtid(x.CreateTime)); yyxt26 != nil { - z.EncExtension(x.CreateTime, yyxt26) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.CreateTime) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.CreateTime) - } else { - z.EncFallback(x.CreateTime) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLToken) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ACLToken) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "AccessorID": - if r.TryDecodeAsNil() { - x.AccessorID = "" - } else { - x.AccessorID = (string)(r.DecodeString()) - } - case "SecretID": - if r.TryDecodeAsNil() { - x.SecretID = "" - } else { - x.SecretID = (string)(r.DecodeString()) - } - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - case "Policies": - if r.TryDecodeAsNil() { - x.Policies = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Policies, d) - } - } - case "Global": - if r.TryDecodeAsNil() { - x.Global = false - } else { - x.Global = (bool)(r.DecodeBool()) - } - case "Hash": - if r.TryDecodeAsNil() { - x.Hash = nil - } else { - if false { - } else { - x.Hash = r.DecodeBytes(([]byte)(x.Hash), false) - } - } - case "CreateTime": - if r.TryDecodeAsNil() { - x.CreateTime = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.CreateTime = r.DecodeTime() - } else if yyxt14 := z.Extension(z.I2Rtid(x.CreateTime)); yyxt14 != nil { - z.DecExtension(x.CreateTime, yyxt14) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.CreateTime) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.CreateTime) - } else { - z.DecFallback(&x.CreateTime, false) - } - } - case "CreateIndex": - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - case "ModifyIndex": - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLToken) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj17 int - var yyb17 bool - var yyhl17 bool = l >= 0 - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AccessorID = "" - } else { - x.AccessorID = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SecretID = "" - } else { - x.SecretID = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Policies = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Policies, d) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Global = false - } else { - x.Global = (bool)(r.DecodeBool()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Hash = nil - } else { - if false { - } else { - x.Hash = r.DecodeBytes(([]byte)(x.Hash), false) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateTime = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.CreateTime = r.DecodeTime() - } else if yyxt28 := z.Extension(z.I2Rtid(x.CreateTime)); yyxt28 != nil { - z.DecExtension(x.CreateTime, yyxt28) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.CreateTime) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.CreateTime) - } else { - z.DecFallback(&x.CreateTime, false) - } - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - for { - yyj17++ - if yyhl17 { - yyb17 = yyj17 > l - } else { - yyb17 = r.CheckBreak() - } - if yyb17 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj17-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLTokenListStub) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(9) - } else { - r.WriteMapStart(9) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AccessorID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AccessorID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AccessorID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AccessorID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AccessorID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AccessorID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Type))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Type)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Type\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Type`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Type))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Type)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Policies == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Policies, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Policies\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Policies`) - } - r.WriteMapElemValue() - if x.Policies == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.Policies, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Global)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Global\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Global`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Global)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Hash == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.Hash)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Hash\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Hash`) - } - r.WriteMapElemValue() - if x.Hash == nil { - r.EncodeNil() - } else { - if false { - } else { - r.EncodeStringBytesRaw([]byte(x.Hash)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.CreateTime) - } else if yyxt22 := z.Extension(z.I2Rtid(x.CreateTime)); yyxt22 != nil { - z.EncExtension(x.CreateTime, yyxt22) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.CreateTime) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.CreateTime) - } else { - z.EncFallback(x.CreateTime) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateTime`) - } - r.WriteMapElemValue() - if false { - } else if !z.EncBasicHandle().TimeNotBuiltin { - r.EncodeTime(x.CreateTime) - } else if yyxt23 := z.Extension(z.I2Rtid(x.CreateTime)); yyxt23 != nil { - z.EncExtension(x.CreateTime, yyxt23) - } else if z.EncBinary() { - z.EncBinaryMarshal(x.CreateTime) - } else if !z.EncBinary() && z.IsJSONHandle() { - z.EncJSONMarshal(x.CreateTime) - } else { - z.EncFallback(x.CreateTime) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"CreateIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `CreateIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.CreateIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ModifyIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ModifyIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.ModifyIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLTokenListStub) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ACLTokenListStub) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "AccessorID": - if r.TryDecodeAsNil() { - x.AccessorID = "" - } else { - x.AccessorID = (string)(r.DecodeString()) - } - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - case "Policies": - if r.TryDecodeAsNil() { - x.Policies = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Policies, d) - } - } - case "Global": - if r.TryDecodeAsNil() { - x.Global = false - } else { - x.Global = (bool)(r.DecodeBool()) - } - case "Hash": - if r.TryDecodeAsNil() { - x.Hash = nil - } else { - if false { - } else { - x.Hash = r.DecodeBytes(([]byte)(x.Hash), false) - } - } - case "CreateTime": - if r.TryDecodeAsNil() { - x.CreateTime = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.CreateTime = r.DecodeTime() - } else if yyxt13 := z.Extension(z.I2Rtid(x.CreateTime)); yyxt13 != nil { - z.DecExtension(x.CreateTime, yyxt13) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.CreateTime) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.CreateTime) - } else { - z.DecFallback(&x.CreateTime, false) - } - } - case "CreateIndex": - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - case "ModifyIndex": - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLTokenListStub) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj16 int - var yyb16 bool - var yyhl16 bool = l >= 0 - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AccessorID = "" - } else { - x.AccessorID = (string)(r.DecodeString()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Policies = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.Policies, d) - } - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Global = false - } else { - x.Global = (bool)(r.DecodeBool()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Hash = nil - } else { - if false { - } else { - x.Hash = r.DecodeBytes(([]byte)(x.Hash), false) - } - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateTime = time.Time{} - } else { - if false { - } else if !z.DecBasicHandle().TimeNotBuiltin { - x.CreateTime = r.DecodeTime() - } else if yyxt26 := z.Extension(z.I2Rtid(x.CreateTime)); yyxt26 != nil { - z.DecExtension(x.CreateTime, yyxt26) - } else if z.DecBinary() { - z.DecBinaryUnmarshal(&x.CreateTime) - } else if !z.DecBinary() && z.IsJSONHandle() { - z.DecJSONUnmarshal(&x.CreateTime) - } else { - z.DecFallback(&x.CreateTime, false) - } - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.CreateIndex = 0 - } else { - x.CreateIndex = (uint64)(r.DecodeUint64()) - } - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ModifyIndex = 0 - } else { - x.ModifyIndex = (uint64)(r.DecodeUint64()) - } - for { - yyj16++ - if yyhl16 { - yyb16 = yyj16 > l - } else { - yyb16 = r.CheckBreak() - } - if yyb16 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj16-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLTokenListRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(9) - } else { - r.WriteMapStart(9) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.GlobalOnly)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"GlobalOnly\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `GlobalOnly`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.GlobalOnly)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt16 != nil { - z.EncExtension(x.MaxQueryTime, yyxt16) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt17 != nil { - z.EncExtension(x.MaxQueryTime, yyxt17) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLTokenListRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ACLTokenListRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "GlobalOnly": - if r.TryDecodeAsNil() { - x.GlobalOnly = false - } else { - x.GlobalOnly = (bool)(r.DecodeBool()) - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt9 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt9 != nil { - z.DecExtension(x.MaxQueryTime, yyxt9) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLTokenListRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj14 int - var yyb14 bool - var yyhl14 bool = l >= 0 - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.GlobalOnly = false - } else { - x.GlobalOnly = (bool)(r.DecodeBool()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt20 != nil { - z.DecExtension(x.MaxQueryTime, yyxt20) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj14-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLTokenSpecificRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(9) - } else { - r.WriteMapStart(9) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AccessorID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AccessorID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AccessorID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AccessorID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AccessorID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AccessorID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt16 != nil { - z.EncExtension(x.MaxQueryTime, yyxt16) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt17 != nil { - z.EncExtension(x.MaxQueryTime, yyxt17) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLTokenSpecificRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ACLTokenSpecificRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "AccessorID": - if r.TryDecodeAsNil() { - x.AccessorID = "" - } else { - x.AccessorID = (string)(r.DecodeString()) - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt9 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt9 != nil { - z.DecExtension(x.MaxQueryTime, yyxt9) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLTokenSpecificRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj14 int - var yyb14 bool - var yyhl14 bool = l >= 0 - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AccessorID = "" - } else { - x.AccessorID = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt20 != nil { - z.DecExtension(x.MaxQueryTime, yyxt20) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj14-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLTokenSetRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(9) - } else { - r.WriteMapStart(9) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.AccessorIDS == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.AccessorIDS, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AccessorIDS\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AccessorIDS`) - } - r.WriteMapElemValue() - if x.AccessorIDS == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.AccessorIDS, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt16 != nil { - z.EncExtension(x.MaxQueryTime, yyxt16) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt17 != nil { - z.EncExtension(x.MaxQueryTime, yyxt17) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLTokenSetRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ACLTokenSetRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "AccessorIDS": - if r.TryDecodeAsNil() { - x.AccessorIDS = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.AccessorIDS, d) - } - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt10 != nil { - z.DecExtension(x.MaxQueryTime, yyxt10) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLTokenSetRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj15 int - var yyb15 bool - var yyhl15 bool = l >= 0 - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AccessorIDS = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.AccessorIDS, d) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt22 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt22 != nil { - z.DecExtension(x.MaxQueryTime, yyxt22) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj15++ - if yyhl15 { - yyb15 = yyj15 > l - } else { - yyb15 = r.CheckBreak() - } - if yyb15 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj15-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLTokenListResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Tokens == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLTokenListStub(([]*ACLTokenListStub)(x.Tokens), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Tokens\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Tokens`) - } - r.WriteMapElemValue() - if x.Tokens == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLTokenListStub(([]*ACLTokenListStub)(x.Tokens), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLTokenListResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ACLTokenListResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Tokens": - if r.TryDecodeAsNil() { - x.Tokens = nil - } else { - if false { - } else { - h.decSlicePtrtoACLTokenListStub((*[]*ACLTokenListStub)(&x.Tokens), d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.LastContact)); yyxt8 != nil { - z.DecExtension(x.LastContact, yyxt8) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLTokenListResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Tokens = nil - } else { - if false { - } else { - h.decSlicePtrtoACLTokenListStub((*[]*ACLTokenListStub)(&x.Tokens), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.LastContact)); yyxt15 != nil { - z.DecExtension(x.LastContact, yyxt15) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *SingleACLTokenResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - var yyn3 bool - if x.Token == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Token == nil { - r.EncodeNil() - } else { - x.Token.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Token\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Token`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Token == nil { - r.EncodeNil() - } else { - x.Token.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *SingleACLTokenResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *SingleACLTokenResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Token": - if r.TryDecodeAsNil() { - if true && x.Token != nil { - x.Token = nil - } - } else { - if x.Token == nil { - x.Token = new(ACLToken) - } - - x.Token.CodecDecodeSelf(d) - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.LastContact)); yyxt7 != nil { - z.DecExtension(x.LastContact, yyxt7) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *SingleACLTokenResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Token != nil { - x.Token = nil - } - } else { - if x.Token == nil { - x.Token = new(ACLToken) - } - - x.Token.CodecDecodeSelf(d) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.LastContact)); yyxt13 != nil { - z.DecExtension(x.LastContact, yyxt13) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLTokenSetResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Tokens == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoACLToken((map[string]*ACLToken)(x.Tokens), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Tokens\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Tokens`) - } - r.WriteMapElemValue() - if x.Tokens == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encMapstringPtrtoACLToken((map[string]*ACLToken)(x.Tokens), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLTokenSetResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ACLTokenSetResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Tokens": - if r.TryDecodeAsNil() { - x.Tokens = nil - } else { - if false { - } else { - h.decMapstringPtrtoACLToken((*map[string]*ACLToken)(&x.Tokens), d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt8 := z.Extension(z.I2Rtid(x.LastContact)); yyxt8 != nil { - z.DecExtension(x.LastContact, yyxt8) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLTokenSetResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Tokens = nil - } else { - if false { - } else { - h.decMapstringPtrtoACLToken((*map[string]*ACLToken)(&x.Tokens), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt15 := z.Extension(z.I2Rtid(x.LastContact)); yyxt15 != nil { - z.DecExtension(x.LastContact, yyxt15) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *ResolveACLTokenRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(9) - } else { - r.WriteMapStart(9) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SecretID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SecretID)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"SecretID\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `SecretID`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.SecretID))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.SecretID)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MinQueryIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MinQueryIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.MinQueryIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt16 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt16 != nil { - z.EncExtension(x.MaxQueryTime, yyxt16) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"MaxQueryTime\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `MaxQueryTime`) - } - r.WriteMapElemValue() - if false { - } else if yyxt17 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt17 != nil { - z.EncExtension(x.MaxQueryTime, yyxt17) - } else { - r.EncodeInt(int64(x.MaxQueryTime)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AllowStale\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AllowStale`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.AllowStale)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Prefix\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Prefix`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Prefix))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Prefix)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ResolveACLTokenRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ResolveACLTokenRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "SecretID": - if r.TryDecodeAsNil() { - x.SecretID = "" - } else { - x.SecretID = (string)(r.DecodeString()) - } - case "Region": - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "MinQueryIndex": - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - case "MaxQueryTime": - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt9 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt9 != nil { - z.DecExtension(x.MaxQueryTime, yyxt9) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - case "AllowStale": - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - case "Prefix": - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ResolveACLTokenRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj14 int - var yyb14 bool - var yyhl14 bool = l >= 0 - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.SecretID = "" - } else { - x.SecretID = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MinQueryIndex = 0 - } else { - x.MinQueryIndex = (uint64)(r.DecodeUint64()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.MaxQueryTime = 0 - } else { - if false { - } else if yyxt20 := z.Extension(z.I2Rtid(x.MaxQueryTime)); yyxt20 != nil { - z.DecExtension(x.MaxQueryTime, yyxt20) - } else { - x.MaxQueryTime = (time.Duration)(r.DecodeInt64()) - } - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AllowStale = false - } else { - x.AllowStale = (bool)(r.DecodeBool()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.Prefix = "" - } else { - x.Prefix = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryOptions.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj14++ - if yyhl14 { - yyb14 = yyj14 > l - } else { - yyb14 = r.CheckBreak() - } - if yyb14 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj14-1, "") - } - r.ReadArrayEnd() -} - -func (x *ResolveACLTokenResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - var yyn3 bool - if x.Token == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Token == nil { - r.EncodeNil() - } else { - x.Token.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Token\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Token`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Token == nil { - r.EncodeNil() - } else { - x.Token.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else if yyxt10 := z.Extension(z.I2Rtid(x.LastContact)); yyxt10 != nil { - z.EncExtension(x.LastContact, yyxt10) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"LastContact\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `LastContact`) - } - r.WriteMapElemValue() - if false { - } else if yyxt11 := z.Extension(z.I2Rtid(x.LastContact)); yyxt11 != nil { - z.EncExtension(x.LastContact, yyxt11) - } else { - r.EncodeInt(int64(x.LastContact)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"KnownLeader\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `KnownLeader`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.KnownLeader)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ResolveACLTokenResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ResolveACLTokenResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Token": - if r.TryDecodeAsNil() { - if true && x.Token != nil { - x.Token = nil - } - } else { - if x.Token == nil { - x.Token = new(ACLToken) - } - - x.Token.CodecDecodeSelf(d) - } - case "Index": - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - case "LastContact": - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt7 := z.Extension(z.I2Rtid(x.LastContact)); yyxt7 != nil { - z.DecExtension(x.LastContact, yyxt7) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - case "KnownLeader": - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ResolveACLTokenResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj9 int - var yyb9 bool - var yyhl9 bool = l >= 0 - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Token != nil { - x.Token = nil - } - } else { - if x.Token == nil { - x.Token = new(ACLToken) - } - - x.Token.CodecDecodeSelf(d) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.LastContact = 0 - } else { - if false { - } else if yyxt13 := z.Extension(z.I2Rtid(x.LastContact)); yyxt13 != nil { - z.DecExtension(x.LastContact, yyxt13) - } else { - x.LastContact = (time.Duration)(r.DecodeInt64()) - } - } - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.QueryMeta.KnownLeader = false - } else { - x.KnownLeader = (bool)(r.DecodeBool()) - } - for { - yyj9++ - if yyhl9 { - yyb9 = yyj9 > l - } else { - yyb9 = r.CheckBreak() - } - if yyb9 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj9-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLTokenDeleteRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.AccessorIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.AccessorIDs, e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AccessorIDs\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AccessorIDs`) - } - r.WriteMapElemValue() - if x.AccessorIDs == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(x.AccessorIDs, e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLTokenDeleteRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ACLTokenDeleteRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "AccessorIDs": - if r.TryDecodeAsNil() { - x.AccessorIDs = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.AccessorIDs, d) - } - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLTokenDeleteRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.AccessorIDs = nil - } else { - if false { - } else { - z.F.DecSliceStringX(&x.AccessorIDs, d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLTokenBootstrapRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(6) - } else { - r.WriteMapStart(6) - } - var yyn3 bool - if x.Token == nil { - yyn3 = true - goto LABEL3 - } - LABEL3: - if yyr2 || yy2arr2 { - if yyn3 { - r.WriteArrayElem() - r.EncodeNil() - } else { - r.WriteArrayElem() - if x.Token == nil { - r.EncodeNil() - } else { - x.Token.CodecEncodeSelf(e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Token\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Token`) - } - r.WriteMapElemValue() - if yyn3 { - r.EncodeNil() - } else { - if x.Token == nil { - r.EncodeNil() - } else { - x.Token.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.ResetIndex)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ResetIndex\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ResetIndex`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.ResetIndex)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLTokenBootstrapRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ACLTokenBootstrapRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Token": - if r.TryDecodeAsNil() { - if true && x.Token != nil { - x.Token = nil - } - } else { - if x.Token == nil { - x.Token = new(ACLToken) - } - - x.Token.CodecDecodeSelf(d) - } - case "ResetIndex": - if r.TryDecodeAsNil() { - x.ResetIndex = 0 - } else { - x.ResetIndex = (uint64)(r.DecodeUint64()) - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLTokenBootstrapRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - if true && x.Token != nil { - x.Token = nil - } - } else { - if x.Token == nil { - x.Token = new(ACLToken) - } - - x.Token.CodecDecodeSelf(d) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ResetIndex = 0 - } else { - x.ResetIndex = (uint64)(r.DecodeUint64()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLTokenUpsertRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(5) - } else { - r.WriteMapStart(5) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Tokens == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLToken(([]*ACLToken)(x.Tokens), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Tokens\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Tokens`) - } - r.WriteMapElemValue() - if x.Tokens == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLToken(([]*ACLToken)(x.Tokens), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Region\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Region`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Region))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Region)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Namespace\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Namespace`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Namespace))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Namespace)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"AuthToken\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `AuthToken`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.AuthToken))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.AuthToken)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Forwarded\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Forwarded`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.Forwarded)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLTokenUpsertRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ACLTokenUpsertRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Tokens": - if r.TryDecodeAsNil() { - x.Tokens = nil - } else { - if false { - } else { - h.decSlicePtrtoACLToken((*[]*ACLToken)(&x.Tokens), d) - } - } - case "Region": - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - case "Namespace": - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - case "AuthToken": - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - case "Forwarded": - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLTokenUpsertRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Tokens = nil - } else { - if false { - } else { - h.decSlicePtrtoACLToken((*[]*ACLToken)(&x.Tokens), d) - } - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Region = "" - } else { - x.Region = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.Namespace = "" - } else { - x.Namespace = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.AuthToken = "" - } else { - x.AuthToken = (string)(r.DecodeString()) - } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteRequest.InternalRpcInfo.Forwarded = false - } else { - x.Forwarded = (bool)(r.DecodeBool()) - } - for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l - } else { - yyb10 = r.CheckBreak() - } - if yyb10 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj10-1, "") - } - r.ReadArrayEnd() -} - -func (x *ACLTokenUpsertResponse) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(2) - } else { - r.WriteMapStart(2) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if x.Tokens == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLToken(([]*ACLToken)(x.Tokens), e) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Tokens\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Tokens`) - } - r.WriteMapElemValue() - if x.Tokens == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoACLToken(([]*ACLToken)(x.Tokens), e) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Index\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Index`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeUint(uint64(x.Index)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ACLTokenUpsertResponse) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ACLTokenUpsertResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Tokens": - if r.TryDecodeAsNil() { - x.Tokens = nil - } else { - if false { - } else { - h.decSlicePtrtoACLToken((*[]*ACLToken)(&x.Tokens), d) - } - } - case "Index": - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ACLTokenUpsertResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj7 int - var yyb7 bool - var yyhl7 bool = l >= 0 - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Tokens = nil - } else { - if false { - } else { - h.decSlicePtrtoACLToken((*[]*ACLToken)(&x.Tokens), d) - } - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.WriteMeta.Index = 0 - } else { - x.Index = (uint64)(r.DecodeUint64()) - } - for { - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj7-1, "") - } - r.ReadArrayEnd() -} - -func (x *ClientHostVolumeConfig) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(3) - } else { - r.WriteMapStart(3) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Path))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Path)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Path\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Path`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Path))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Path)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.ReadOnly)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ReadOnly\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ReadOnly`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.ReadOnly)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *ClientHostVolumeConfig) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *ClientHostVolumeConfig) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Path": - if r.TryDecodeAsNil() { - x.Path = "" - } else { - x.Path = (string)(r.DecodeString()) - } - case "ReadOnly": - if r.TryDecodeAsNil() { - x.ReadOnly = false - } else { - x.ReadOnly = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *ClientHostVolumeConfig) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj7 int - var yyb7 bool - var yyhl7 bool = l >= 0 - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Path = "" - } else { - x.Path = (string)(r.DecodeString()) - } - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ReadOnly = false - } else { - x.ReadOnly = (bool)(r.DecodeBool()) - } - for { - yyj7++ - if yyhl7 { - yyb7 = yyj7 > l - } else { - yyb7 = r.CheckBreak() - } - if yyb7 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj7-1, "") - } - r.ReadArrayEnd() -} - -func (x *VolumeRequest) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Name\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Name`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Name))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Name)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Type))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Type)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Type\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Type`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Type))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Type)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Source))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Source)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Source\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Source`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Source))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Source)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.ReadOnly)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ReadOnly\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ReadOnly`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.ReadOnly)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *VolumeRequest) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *VolumeRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Name": - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - case "Type": - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - case "Source": - if r.TryDecodeAsNil() { - x.Source = "" - } else { - x.Source = (string)(r.DecodeString()) - } - case "ReadOnly": - if r.TryDecodeAsNil() { - x.ReadOnly = false - } else { - x.ReadOnly = (bool)(r.DecodeBool()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *VolumeRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj8 int - var yyb8 bool - var yyhl8 bool = l >= 0 - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Name = "" - } else { - x.Name = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Type = "" - } else { - x.Type = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Source = "" - } else { - x.Source = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ReadOnly = false - } else { - x.ReadOnly = (bool)(r.DecodeBool()) - } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj8-1, "") - } - r.ReadArrayEnd() -} - -func (x *VolumeMount) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.EncExtension(x, yyxt1) - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - _, _ = yysep2, yy2arr2 - const yyr2 bool = false // struct tag has 'toArray' - if yyr2 || yy2arr2 { - r.WriteArrayStart(4) - } else { - r.WriteMapStart(4) - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Volume))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Volume)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Volume\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Volume`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Volume))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Volume)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Destination))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Destination)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"Destination\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `Destination`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.Destination))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.Destination)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - r.EncodeBool(bool(x.ReadOnly)) - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"ReadOnly\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `ReadOnly`) - } - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(x.ReadOnly)) - } - } - if yyr2 || yy2arr2 { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PropagationMode))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PropagationMode)) - } - } - } else { - r.WriteMapElemKey() - if z.IsJSONHandle() { - z.WriteStr("\"PropagationMode\"") - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, `PropagationMode`) - } - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(x.PropagationMode))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(x.PropagationMode)) - } - } - } - if yyr2 || yy2arr2 { - r.WriteArrayEnd() - } else { - r.WriteMapEnd() - } - } - } -} - -func (x *VolumeMount) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - if false { - } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { - z.DecExtension(x, yyxt1) - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap100 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - r.ReadMapEnd() - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray100 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - r.ReadArrayEnd() - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(errCodecSelferOnlyMapOrArrayEncodeToStruct100) - } - } -} - -func (x *VolumeMount) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - r.ReadMapElemKey() - yys3 := z.StringView(r.DecodeStringAsBytes()) - r.ReadMapElemValue() - switch yys3 { - case "Volume": - if r.TryDecodeAsNil() { - x.Volume = "" - } else { - x.Volume = (string)(r.DecodeString()) - } - case "Destination": - if r.TryDecodeAsNil() { - x.Destination = "" - } else { - x.Destination = (string)(r.DecodeString()) - } - case "ReadOnly": - if r.TryDecodeAsNil() { - x.ReadOnly = false - } else { - x.ReadOnly = (bool)(r.DecodeBool()) - } - case "PropagationMode": - if r.TryDecodeAsNil() { - x.PropagationMode = "" - } else { - x.PropagationMode = (string)(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - r.ReadMapEnd() -} - -func (x *VolumeMount) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj8 int - var yyb8 bool - var yyhl8 bool = l >= 0 - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Volume = "" - } else { - x.Volume = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.Destination = "" - } else { - x.Destination = (string)(r.DecodeString()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.ReadOnly = false - } else { - x.ReadOnly = (bool)(r.DecodeBool()) - } - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - r.ReadArrayEnd() - return - } - r.ReadArrayElem() - if r.TryDecodeAsNil() { - x.PropagationMode = "" - } else { - x.PropagationMode = (string)(r.DecodeString()) - } - for { - yyj8++ - if yyhl8 { - yyb8 = yyj8 > l - } else { - yyb8 = r.CheckBreak() - } - if yyb8 { - break - } - r.ReadArrayElem() - z.DecStructFieldNotFound(yyj8-1, "") - } - r.ReadArrayEnd() -} - -func (x codecSelfer100) encBitmap(v Bitmap, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeStringBytesRaw([]byte(v)) -} - -func (x codecSelfer100) decBitmap(v *Bitmap, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - *v = r.DecodeBytes(*((*[]byte)(v)), false) -} - -func (x codecSelfer100) encMapDeviceIdTuplePtrtoDeviceAccounterInstance(v map[DeviceIdTuple]*DeviceAccounterInstance, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - yy2 := &yyk1 - yy2.CodecEncodeSelf(e) - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapDeviceIdTuplePtrtoDeviceAccounterInstance(v *map[DeviceIdTuple]*DeviceAccounterInstance, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 56) - yyv1 = make(map[DeviceIdTuple]*DeviceAccounterInstance, yyrl1) - *v = yyv1 - } - var yymk1 DeviceIdTuple - var yymv1 *DeviceAccounterInstance - var yymg1, yymdn1, yyms1, yymok1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = DeviceIdTuple{} - } else { - yymk1.CodecDecodeSelf(d) - } - - yyms1 = true - if yymg1 { - yymv1, yymok1 = yyv1[yymk1] - if yymok1 { - yyms1 = false - } - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - if yymv1 == nil { - yymv1 = new(DeviceAccounterInstance) - } - yymv1.CodecDecodeSelf(d) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyms1 && yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encSlicePtrtoFieldDiff(v []*FieldDiff, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoFieldDiff(v *[]*FieldDiff, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*FieldDiff{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*FieldDiff, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*FieldDiff, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(FieldDiff) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*FieldDiff, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoObjectDiff(v []*ObjectDiff, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoObjectDiff(v *[]*ObjectDiff, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*ObjectDiff{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*ObjectDiff, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*ObjectDiff, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(ObjectDiff) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ObjectDiff, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoTaskGroupDiff(v []*TaskGroupDiff, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoTaskGroupDiff(v *[]*TaskGroupDiff, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*TaskGroupDiff{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*TaskGroupDiff, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*TaskGroupDiff, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(TaskGroupDiff) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*TaskGroupDiff, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoTaskDiff(v []*TaskDiff, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoTaskDiff(v *[]*TaskDiff, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*TaskDiff{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*TaskDiff, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*TaskDiff, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(TaskDiff) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*TaskDiff, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encTaskGroupDiffs(v TaskGroupDiffs, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decTaskGroupDiffs(v *TaskGroupDiffs, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*TaskGroupDiff{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*TaskGroupDiff, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*TaskGroupDiff, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(TaskGroupDiff) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*TaskGroupDiff, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encTaskDiffs(v TaskDiffs, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decTaskDiffs(v *TaskDiffs, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*TaskDiff{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*TaskDiff, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*TaskDiff, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(TaskDiff) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*TaskDiff, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encObjectDiffs(v ObjectDiffs, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decObjectDiffs(v *ObjectDiffs, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*ObjectDiff{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*ObjectDiff, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*ObjectDiff, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(ObjectDiff) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ObjectDiff, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encFieldDiffs(v FieldDiffs, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decFieldDiffs(v *FieldDiffs, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*FieldDiff{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*FieldDiff, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*FieldDiff, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(FieldDiff) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*FieldDiff, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoNetworkResource(v []*NetworkResource, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoNetworkResource(v *[]*NetworkResource, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*NetworkResource{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*NetworkResource, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*NetworkResource, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(NetworkResource) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*NetworkResource, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringBitmap(v map[string]Bitmap, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyk1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyk1)) - } - } - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringBitmap(v *map[string]Bitmap, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 40) - yyv1 = make(map[string]Bitmap, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 Bitmap - var yymg1, yymdn1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - if yymg1 { - yymv1 = yyv1[yymk1] - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - yymv1.CodecDecodeSelf(d) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encSlicePtrtoRaftServer(v []*RaftServer, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoRaftServer(v *[]*RaftServer, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*RaftServer{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*RaftServer, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*RaftServer, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(RaftServer) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*RaftServer, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringSlicestring(v map[string][]string, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyk1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyk1)) - } - } - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(yyv1, e) - } - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringSlicestring(v *map[string][]string, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 40) - yyv1 = make(map[string][]string, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 []string - var yymg1, yymdn1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - if yymg1 { - yymv1 = yyv1[yymk1] - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - if false { - } else { - z.F.DecSliceStringX(&yymv1, d) - } - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encSlicestring(v []string, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyv1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyv1)) - } - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicestring(v *[]string, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []string{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]string, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 16) - } else { - yyrl1 = 8 - } - yyv1 = make([]string, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, "") - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = "" - } else { - yyv1[yyj1] = (string)(r.DecodeString()) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]string, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoServiceCheck(v []*ServiceCheck, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoServiceCheck(v *[]*ServiceCheck, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*ServiceCheck{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*ServiceCheck, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*ServiceCheck, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(ServiceCheck) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ServiceCheck, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSliceConsulUpstream(v []ConsulUpstream, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - yy2 := &yyv1 - yy2.CodecEncodeSelf(e) - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSliceConsulUpstream(v *[]ConsulUpstream, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []ConsulUpstream{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 24) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]ConsulUpstream, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 24) - } else { - yyrl1 = 8 - } - yyv1 = make([]ConsulUpstream, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, ConsulUpstream{}) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = ConsulUpstream{} - } else { - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]ConsulUpstream, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringPtrtoDrainUpdate(v map[string]*DrainUpdate, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyk1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyk1)) - } - } - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringPtrtoDrainUpdate(v *map[string]*DrainUpdate, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 24) - yyv1 = make(map[string]*DrainUpdate, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *DrainUpdate - var yymg1, yymdn1, yyms1, yymok1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - yyms1 = true - if yymg1 { - yymv1, yymok1 = yyv1[yymk1] - if yymok1 { - yyms1 = false - } - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - if yymv1 == nil { - yymv1 = new(DrainUpdate) - } - yymv1.CodecDecodeSelf(d) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyms1 && yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encMapstringPtrtoNodeEvent(v map[string]*NodeEvent, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyk1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyk1)) - } - } - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringPtrtoNodeEvent(v *map[string]*NodeEvent, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 24) - yyv1 = make(map[string]*NodeEvent, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *NodeEvent - var yymg1, yymdn1, yyms1, yymok1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - yyms1 = true - if yymg1 { - yymv1, yymok1 = yyv1[yymk1] - if yymok1 { - yyms1 = false - } - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - if yymv1 == nil { - yymv1 = new(NodeEvent) - } - yymv1.CodecDecodeSelf(d) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyms1 && yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encMapContextSlicestring(v map[Context][]string, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - yyk1.CodecEncodeSelf(e) - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - if false { - } else { - z.F.EncSliceStringV(yyv1, e) - } - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapContextSlicestring(v *map[Context][]string, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 40) - yyv1 = make(map[Context][]string, yyrl1) - *v = yyv1 - } - var yymk1 Context - var yymv1 []string - var yymg1, yymdn1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1.CodecDecodeSelf(d) - } - - if yymg1 { - yymv1 = yyv1[yymk1] - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - if false { - } else { - z.F.DecSliceStringX(&yymv1, d) - } - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encMapContextbool(v map[Context]bool, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - yyk1.CodecEncodeSelf(e) - r.WriteMapElemValue() - if false { - } else { - r.EncodeBool(bool(yyv1)) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapContextbool(v *map[Context]bool, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 17) - yyv1 = make(map[Context]bool, yyrl1) - *v = yyv1 - } - var yymk1 Context - var yymv1 bool - var yymg1, yymdn1 bool - if yybh1.MapValueReset { - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1.CodecDecodeSelf(d) - } - - if yymg1 { - yymv1 = yyv1[yymk1] - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - yymv1 = (bool)(r.DecodeBool()) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = false - } - } else if yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encMapNamespacedIDPtrtoJobDeregisterOptions(v map[NamespacedID]*JobDeregisterOptions, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - yy2 := &yyk1 - yy2.CodecEncodeSelf(e) - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapNamespacedIDPtrtoJobDeregisterOptions(v *map[NamespacedID]*JobDeregisterOptions, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 40) - yyv1 = make(map[NamespacedID]*JobDeregisterOptions, yyrl1) - *v = yyv1 - } - var yymk1 NamespacedID - var yymv1 *JobDeregisterOptions - var yymg1, yymdn1, yyms1, yymok1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = NamespacedID{} - } else { - yymk1.CodecDecodeSelf(d) - } - - yyms1 = true - if yymg1 { - yymv1, yymok1 = yyv1[yymk1] - if yymok1 { - yyms1 = false - } - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - if yymv1 == nil { - yymv1 = new(JobDeregisterOptions) - } - yymv1.CodecDecodeSelf(d) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyms1 && yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encSlicePtrtoEvaluation(v []*Evaluation, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoEvaluation(v *[]*Evaluation, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*Evaluation{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*Evaluation, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*Evaluation, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(Evaluation) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*Evaluation, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoAllocation(v []*Allocation, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoAllocation(v *[]*Allocation, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*Allocation{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*Allocation, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*Allocation, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(Allocation) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*Allocation, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoAllocationDiff(v []*AllocationDiff, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoAllocationDiff(v *[]*AllocationDiff, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*AllocationDiff{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*AllocationDiff, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*AllocationDiff, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(AllocationDiff) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*AllocationDiff, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoDeploymentStatusUpdate(v []*DeploymentStatusUpdate, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoDeploymentStatusUpdate(v *[]*DeploymentStatusUpdate, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*DeploymentStatusUpdate{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*DeploymentStatusUpdate, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*DeploymentStatusUpdate, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(DeploymentStatusUpdate) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*DeploymentStatusUpdate, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringPtrtoDesiredTransition(v map[string]*DesiredTransition, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyk1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyk1)) - } - } - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringPtrtoDesiredTransition(v *map[string]*DesiredTransition, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 24) - yyv1 = make(map[string]*DesiredTransition, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *DesiredTransition - var yymg1, yymdn1, yyms1, yymok1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - yyms1 = true - if yymg1 { - yymv1, yymok1 = yyv1[yymk1] - if yymok1 { - yyms1 = false - } - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - if yymv1 == nil { - yymv1 = new(DesiredTransition) - } - yymv1.CodecDecodeSelf(d) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyms1 && yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encSlicePtrtoServerMember(v []*ServerMember, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoServerMember(v *[]*ServerMember, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*ServerMember{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*ServerMember, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*ServerMember, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(ServerMember) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ServerMember, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encnet_IP(v net.IP, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.EncodeStringBytesRaw([]byte(v)) -} - -func (x codecSelfer100) decnet_IP(v *net.IP, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - *v = r.DecodeBytes(*((*[]byte)(v)), false) -} - -func (x codecSelfer100) encSlicePtrtoVaultAccessor(v []*VaultAccessor, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoVaultAccessor(v *[]*VaultAccessor, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*VaultAccessor{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*VaultAccessor, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*VaultAccessor, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(VaultAccessor) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*VaultAccessor, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapNamespacedIDstring(v map[NamespacedID]string, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - yy2 := &yyk1 - yy2.CodecEncodeSelf(e) - r.WriteMapElemValue() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyv1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyv1)) - } - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapNamespacedIDstring(v *map[NamespacedID]string, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 48) - yyv1 = make(map[NamespacedID]string, yyrl1) - *v = yyv1 - } - var yymk1 NamespacedID - var yymv1 string - var yymg1, yymdn1 bool - if yybh1.MapValueReset { - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = NamespacedID{} - } else { - yymk1.CodecDecodeSelf(d) - } - - if yymg1 { - yymv1 = yyv1[yymk1] - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - yymv1 = (string)(r.DecodeString()) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = "" - } - } else if yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encSlicePtrtoNodeServerInfo(v []*NodeServerInfo, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoNodeServerInfo(v *[]*NodeServerInfo, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*NodeServerInfo{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*NodeServerInfo, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*NodeServerInfo, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(NodeServerInfo) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*NodeServerInfo, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoNodeListStub(v []*NodeListStub, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoNodeListStub(v *[]*NodeListStub, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*NodeListStub{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*NodeListStub, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*NodeListStub, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(NodeListStub) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*NodeListStub, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoJobListStub(v []*JobListStub, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoJobListStub(v *[]*JobListStub, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*JobListStub{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*JobListStub, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*JobListStub, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(JobListStub) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*JobListStub, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoJob(v []*Job, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoJob(v *[]*Job, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*Job{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*Job, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*Job, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(Job) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*Job, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoJobDiff(v []*JobDiff, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoJobDiff(v *[]*JobDiff, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*JobDiff{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*JobDiff, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*JobDiff, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(JobDiff) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*JobDiff, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringPtrtoAllocMetric(v map[string]*AllocMetric, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyk1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyk1)) - } - } - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringPtrtoAllocMetric(v *map[string]*AllocMetric, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 24) - yyv1 = make(map[string]*AllocMetric, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *AllocMetric - var yymg1, yymdn1, yyms1, yymok1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - yyms1 = true - if yymg1 { - yymv1, yymok1 = yyv1[yymk1] - if yymok1 { - yyms1 = false - } - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - if yymv1 == nil { - yymv1 = new(AllocMetric) - } - yymv1.CodecDecodeSelf(d) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyms1 && yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encSlicePtrtoAllocListStub(v []*AllocListStub, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoAllocListStub(v *[]*AllocListStub, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*AllocListStub{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*AllocListStub, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*AllocListStub, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(AllocListStub) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*AllocListStub, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoDeployment(v []*Deployment, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoDeployment(v *[]*Deployment, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*Deployment{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*Deployment, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*Deployment, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(Deployment) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*Deployment, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringSlicePtrtoNodeEvent(v map[string][]*NodeEvent, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyk1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyk1)) - } - } - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoNodeEvent(([]*NodeEvent)(yyv1), e) - } - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringSlicePtrtoNodeEvent(v *map[string][]*NodeEvent, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 40) - yyv1 = make(map[string][]*NodeEvent, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 []*NodeEvent - var yymg1, yymdn1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - if yymg1 { - yymv1 = yyv1[yymk1] - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - if false { - } else { - h.decSlicePtrtoNodeEvent((*[]*NodeEvent)(&yymv1), d) - } - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encSlicePtrtoNodeEvent(v []*NodeEvent, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoNodeEvent(v *[]*NodeEvent, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*NodeEvent{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*NodeEvent, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*NodeEvent, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(NodeEvent) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*NodeEvent, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringPtrtoDriverInfo(v map[string]*DriverInfo, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyk1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyk1)) - } - } - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringPtrtoDriverInfo(v *map[string]*DriverInfo, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 24) - yyv1 = make(map[string]*DriverInfo, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *DriverInfo - var yymg1, yymdn1, yyms1, yymok1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - yyms1 = true - if yymg1 { - yymv1, yymok1 = yyv1[yymk1] - if yymok1 { - yyms1 = false - } - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - if yymv1 == nil { - yymv1 = new(DriverInfo) - } - yymv1.CodecDecodeSelf(d) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyms1 && yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encMapstringPtrtoClientHostVolumeConfig(v map[string]*ClientHostVolumeConfig, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyk1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyk1)) - } - } - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringPtrtoClientHostVolumeConfig(v *map[string]*ClientHostVolumeConfig, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 24) - yyv1 = make(map[string]*ClientHostVolumeConfig, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *ClientHostVolumeConfig - var yymg1, yymdn1, yyms1, yymok1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - yyms1 = true - if yymg1 { - yymv1, yymok1 = yyv1[yymk1] - if yymok1 { - yyms1 = false - } - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - if yymv1 == nil { - yymv1 = new(ClientHostVolumeConfig) - } - yymv1.CodecDecodeSelf(d) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyms1 && yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encResourceDevices(v ResourceDevices, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decResourceDevices(v *ResourceDevices, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*RequestedDevice{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*RequestedDevice, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*RequestedDevice, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(RequestedDevice) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*RequestedDevice, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePort(v []Port, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - yy2 := &yyv1 - yy2.CodecEncodeSelf(e) - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePort(v *[]Port, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []Port{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 32) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]Port, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 32) - } else { - yyrl1 = 8 - } - yyv1 = make([]Port, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, Port{}) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = Port{} - } else { - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]Port, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encNetworks(v Networks, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decNetworks(v *Networks, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*NetworkResource{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*NetworkResource, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*NetworkResource, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(NetworkResource) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*NetworkResource, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoNodeDeviceResource(v []*NodeDeviceResource, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoNodeDeviceResource(v *[]*NodeDeviceResource, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*NodeDeviceResource{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*NodeDeviceResource, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*NodeDeviceResource, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(NodeDeviceResource) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*NodeDeviceResource, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoNodeDevice(v []*NodeDevice, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoNodeDevice(v *[]*NodeDevice, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*NodeDevice{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*NodeDevice, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*NodeDevice, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(NodeDevice) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*NodeDevice, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringPtrtostructs_Attribute(v map[string]*pkg1_structs.Attribute, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyk1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyk1)) - } - } - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - if false { - } else if yyxt3 := z.Extension(z.I2Rtid(yyv1)); yyxt3 != nil { - z.EncExtension(yyv1, yyxt3) - } else { - z.EncFallback(yyv1) - } - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringPtrtostructs_Attribute(v *map[string]*pkg1_structs.Attribute, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 24) - yyv1 = make(map[string]*pkg1_structs.Attribute, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *pkg1_structs.Attribute - var yymg1, yymdn1, yyms1, yymok1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - yyms1 = true - if yymg1 { - yymv1, yymok1 = yyv1[yymk1] - if yymok1 { - yyms1 = false - } - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - if yymv1 == nil { - yymv1 = new(pkg1_structs.Attribute) - } - if false { - } else if yyxt4 := z.Extension(z.I2Rtid(yymv1)); yyxt4 != nil { - z.DecExtension(yymv1, yyxt4) - } else { - z.DecFallback(yymv1, false) - } - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyms1 && yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encMapstringPtrtoAllocatedTaskResources(v map[string]*AllocatedTaskResources, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyk1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyk1)) - } - } - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringPtrtoAllocatedTaskResources(v *map[string]*AllocatedTaskResources, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 24) - yyv1 = make(map[string]*AllocatedTaskResources, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *AllocatedTaskResources - var yymg1, yymdn1, yyms1, yymok1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - yyms1 = true - if yymg1 { - yymv1, yymok1 = yyv1[yymk1] - if yymok1 { - yyms1 = false - } - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - if yymv1 == nil { - yymv1 = new(AllocatedTaskResources) - } - yymv1.CodecDecodeSelf(d) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyms1 && yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encSlicePtrtoAllocatedDeviceResource(v []*AllocatedDeviceResource, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoAllocatedDeviceResource(v *[]*AllocatedDeviceResource, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*AllocatedDeviceResource{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*AllocatedDeviceResource, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*AllocatedDeviceResource, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(AllocatedDeviceResource) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*AllocatedDeviceResource, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encAllocatedDevices(v AllocatedDevices, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decAllocatedDevices(v *AllocatedDevices, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*AllocatedDeviceResource{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*AllocatedDeviceResource, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*AllocatedDeviceResource, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(AllocatedDeviceResource) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*AllocatedDeviceResource, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoConstraint(v []*Constraint, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoConstraint(v *[]*Constraint, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*Constraint{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*Constraint, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*Constraint, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(Constraint) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*Constraint, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoAffinity(v []*Affinity, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoAffinity(v *[]*Affinity, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*Affinity{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*Affinity, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*Affinity, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(Affinity) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*Affinity, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoSpread(v []*Spread, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoSpread(v *[]*Spread, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*Spread{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*Spread, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*Spread, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(Spread) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*Spread, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoTaskGroup(v []*TaskGroup, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoTaskGroup(v *[]*TaskGroup, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*TaskGroup{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*TaskGroup, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*TaskGroup, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(TaskGroup) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*TaskGroup, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringTaskGroupSummary(v map[string]TaskGroupSummary, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyk1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyk1)) - } - } - r.WriteMapElemValue() - yy3 := &yyv1 - yy3.CodecEncodeSelf(e) - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringTaskGroupSummary(v *map[string]TaskGroupSummary, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 64) - yyv1 = make(map[string]TaskGroupSummary, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 TaskGroupSummary - var yymg1, yymdn1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - if yymg1 { - yymv1 = yyv1[yymk1] - } else { - yymv1 = TaskGroupSummary{} - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - yymv1.CodecDecodeSelf(d) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = TaskGroupSummary{} - } - } else if yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encSlicePtrtoTask(v []*Task, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoTask(v *[]*Task, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*Task{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*Task, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*Task, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(Task) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*Task, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoService(v []*Service, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoService(v *[]*Service, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*Service{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*Service, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*Service, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(Service) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*Service, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringPtrtoVolumeRequest(v map[string]*VolumeRequest, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyk1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyk1)) - } - } - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringPtrtoVolumeRequest(v *map[string]*VolumeRequest, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 24) - yyv1 = make(map[string]*VolumeRequest, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *VolumeRequest - var yymg1, yymdn1, yyms1, yymok1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - yyms1 = true - if yymg1 { - yymv1, yymok1 = yyv1[yymk1] - if yymok1 { - yyms1 = false - } - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - if yymv1 == nil { - yymv1 = new(VolumeRequest) - } - yymv1.CodecDecodeSelf(d) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyms1 && yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encSlicePtrtoTemplate(v []*Template, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoTemplate(v *[]*Template, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*Template{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*Template, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*Template, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(Template) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*Template, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoTaskArtifact(v []*TaskArtifact, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoTaskArtifact(v *[]*TaskArtifact, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*TaskArtifact{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*TaskArtifact, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*TaskArtifact, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(TaskArtifact) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*TaskArtifact, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoVolumeMount(v []*VolumeMount, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoVolumeMount(v *[]*VolumeMount, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*VolumeMount{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*VolumeMount, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*VolumeMount, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(VolumeMount) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*VolumeMount, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoTaskEvent(v []*TaskEvent, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoTaskEvent(v *[]*TaskEvent, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*TaskEvent{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*TaskEvent, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*TaskEvent, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(TaskEvent) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*TaskEvent, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encConstraints(v Constraints, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decConstraints(v *Constraints, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*Constraint{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*Constraint, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*Constraint, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(Constraint) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*Constraint, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoSpreadTarget(v []*SpreadTarget, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoSpreadTarget(v *[]*SpreadTarget, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*SpreadTarget{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*SpreadTarget, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*SpreadTarget, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(SpreadTarget) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*SpreadTarget, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encAffinities(v Affinities, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decAffinities(v *Affinities, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*Affinity{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*Affinity, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*Affinity, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(Affinity) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*Affinity, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringPtrtoDeploymentState(v map[string]*DeploymentState, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyk1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyk1)) - } - } - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringPtrtoDeploymentState(v *map[string]*DeploymentState, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 24) - yyv1 = make(map[string]*DeploymentState, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *DeploymentState - var yymg1, yymdn1, yyms1, yymok1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - yyms1 = true - if yymg1 { - yymv1, yymok1 = yyv1[yymk1] - if yymok1 { - yyms1 = false - } - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - if yymv1 == nil { - yymv1 = new(DeploymentState) - } - yymv1.CodecDecodeSelf(d) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyms1 && yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encSlicePtrtoRescheduleEvent(v []*RescheduleEvent, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoRescheduleEvent(v *[]*RescheduleEvent, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*RescheduleEvent{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*RescheduleEvent, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*RescheduleEvent, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(RescheduleEvent) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*RescheduleEvent, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringPtrtoResources(v map[string]*Resources, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyk1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyk1)) - } - } - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringPtrtoResources(v *map[string]*Resources, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 24) - yyv1 = make(map[string]*Resources, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *Resources - var yymg1, yymdn1, yyms1, yymok1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - yyms1 = true - if yymg1 { - yymv1, yymok1 = yyv1[yymk1] - if yymok1 { - yyms1 = false - } - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - if yymv1 == nil { - yymv1 = new(Resources) - } - yymv1.CodecDecodeSelf(d) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyms1 && yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encMapstringPtrtoTaskState(v map[string]*TaskState, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyk1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyk1)) - } - } - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringPtrtoTaskState(v *map[string]*TaskState, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 24) - yyv1 = make(map[string]*TaskState, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *TaskState - var yymg1, yymdn1, yyms1, yymok1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - yyms1 = true - if yymg1 { - yymv1, yymok1 = yyv1[yymk1] - if yymok1 { - yyms1 = false - } - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - if yymv1 == nil { - yymv1 = new(TaskState) - } - yymv1.CodecDecodeSelf(d) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyms1 && yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encSlicePtrtoNodeScoreMeta(v []*NodeScoreMeta, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoNodeScoreMeta(v *[]*NodeScoreMeta, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*NodeScoreMeta{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*NodeScoreMeta, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*NodeScoreMeta, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(NodeScoreMeta) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*NodeScoreMeta, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringSlicePtrtoAllocation(v map[string][]*Allocation, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyk1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyk1)) - } - } - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - if false { - } else { - h.encSlicePtrtoAllocation(([]*Allocation)(yyv1), e) - } - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringSlicePtrtoAllocation(v *map[string][]*Allocation, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 40) - yyv1 = make(map[string][]*Allocation, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 []*Allocation - var yymg1, yymdn1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - if yymg1 { - yymv1 = yyv1[yymk1] - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - if false { - } else { - h.decSlicePtrtoAllocation((*[]*Allocation)(&yymv1), d) - } - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encMapstringPtrtoDesiredUpdates(v map[string]*DesiredUpdates, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyk1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyk1)) - } - } - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringPtrtoDesiredUpdates(v *map[string]*DesiredUpdates, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 24) - yyv1 = make(map[string]*DesiredUpdates, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *DesiredUpdates - var yymg1, yymdn1, yyms1, yymok1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - yyms1 = true - if yymg1 { - yymv1, yymok1 = yyv1[yymk1] - if yymok1 { - yyms1 = false - } - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - if yymv1 == nil { - yymv1 = new(DesiredUpdates) - } - yymv1.CodecDecodeSelf(d) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyms1 && yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encSlicePtrtoACLPolicyListStub(v []*ACLPolicyListStub, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoACLPolicyListStub(v *[]*ACLPolicyListStub, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*ACLPolicyListStub{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*ACLPolicyListStub, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*ACLPolicyListStub, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(ACLPolicyListStub) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ACLPolicyListStub, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringPtrtoACLPolicy(v map[string]*ACLPolicy, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyk1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyk1)) - } - } - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringPtrtoACLPolicy(v *map[string]*ACLPolicy, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 24) - yyv1 = make(map[string]*ACLPolicy, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *ACLPolicy - var yymg1, yymdn1, yyms1, yymok1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - yyms1 = true - if yymg1 { - yymv1, yymok1 = yyv1[yymk1] - if yymok1 { - yyms1 = false - } - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - if yymv1 == nil { - yymv1 = new(ACLPolicy) - } - yymv1.CodecDecodeSelf(d) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyms1 && yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encSlicePtrtoACLPolicy(v []*ACLPolicy, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoACLPolicy(v *[]*ACLPolicy, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*ACLPolicy{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*ACLPolicy, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*ACLPolicy, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(ACLPolicy) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ACLPolicy, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encSlicePtrtoACLTokenListStub(v []*ACLTokenListStub, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoACLTokenListStub(v *[]*ACLTokenListStub, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*ACLTokenListStub{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*ACLTokenListStub, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*ACLTokenListStub, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(ACLTokenListStub) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ACLTokenListStub, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -} - -func (x codecSelfer100) encMapstringPtrtoACLToken(v map[string]*ACLToken, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteMapStart(len(v)) - for yyk1, yyv1 := range v { - r.WriteMapElemKey() - if false { - } else { - if z.EncBasicHandle().StringToRaw { - r.EncodeStringBytesRaw(z.BytesView(string(yyk1))) - } else { - r.EncodeStringEnc(codecSelferCcUTF8100, string(yyk1)) - } - } - r.WriteMapElemValue() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteMapEnd() -} - -func (x codecSelfer100) decMapstringPtrtoACLToken(v *map[string]*ACLToken, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyl1 := r.ReadMapStart() - yybh1 := z.DecBasicHandle() - if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 24) - yyv1 = make(map[string]*ACLToken, yyrl1) - *v = yyv1 - } - var yymk1 string - var yymv1 *ACLToken - var yymg1, yymdn1, yyms1, yymok1 bool - if yybh1.MapValueReset { - yymg1 = true - } - if yyl1 != 0 { - yyhl1 := yyl1 > 0 - for yyj1 := 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { - r.ReadMapElemKey() - if r.TryDecodeAsNil() { - yymk1 = "" - } else { - yymk1 = (string)(r.DecodeString()) - } - - yyms1 = true - if yymg1 { - yymv1, yymok1 = yyv1[yymk1] - if yymok1 { - yyms1 = false - } - } else { - yymv1 = nil - } - r.ReadMapElemValue() - yymdn1 = false - if r.TryDecodeAsNil() { - yymdn1 = true - } else { - if yymv1 == nil { - yymv1 = new(ACLToken) - } - yymv1.CodecDecodeSelf(d) - } - - if yymdn1 { - if yybh1.DeleteOnNilMapValue { - delete(yyv1, yymk1) - } else { - yyv1[yymk1] = nil - } - } else if yyms1 && yyv1 != nil { - yyv1[yymk1] = yymv1 - } - } - } // else len==0: TODO: Should we clear map entries? - r.ReadMapEnd() -} - -func (x codecSelfer100) encSlicePtrtoACLToken(v []*ACLToken, e *codec1978.Encoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - r.WriteArrayStart(len(v)) - for _, yyv1 := range v { - r.WriteArrayElem() - if yyv1 == nil { - r.EncodeNil() - } else { - yyv1.CodecEncodeSelf(e) - } - } - r.WriteArrayEnd() -} - -func (x codecSelfer100) decSlicePtrtoACLToken(v *[]*ACLToken, d *codec1978.Decoder) { - var h codecSelfer100 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - - yyv1 := *v - yyh1, yyl1 := z.DecSliceHelperStart() - var yyc1 bool - _ = yyc1 - if yyl1 == 0 { - if yyv1 == nil { - yyv1 = []*ACLToken{} - yyc1 = true - } else if len(yyv1) != 0 { - yyv1 = yyv1[:0] - yyc1 = true - } - } else { - yyhl1 := yyl1 > 0 - var yyrl1 int - _ = yyrl1 - if yyhl1 { - if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - if yyrl1 <= cap(yyv1) { - yyv1 = yyv1[:yyrl1] - } else { - yyv1 = make([]*ACLToken, yyrl1) - } - yyc1 = true - } else if yyl1 != len(yyv1) { - yyv1 = yyv1[:yyl1] - yyc1 = true - } - } - var yyj1 int - // var yydn1 bool - for yyj1 = 0; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { // bounds-check-elimination - if yyj1 == 0 && yyv1 == nil { - if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8) - } else { - yyrl1 = 8 - } - yyv1 = make([]*ACLToken, yyrl1) - yyc1 = true - } - yyh1.ElemContainerState(yyj1) - - var yydb1 bool - if yyj1 >= len(yyv1) { - yyv1 = append(yyv1, nil) - yyc1 = true - - } - if yydb1 { - z.DecSwallow() - } else { - if r.TryDecodeAsNil() { - yyv1[yyj1] = nil - } else { - if yyv1[yyj1] == nil { - yyv1[yyj1] = new(ACLToken) - } - yyv1[yyj1].CodecDecodeSelf(d) - } - - } - - } - if yyj1 < len(yyv1) { - yyv1 = yyv1[:yyj1] - yyc1 = true - } else if yyj1 == 0 && yyv1 == nil { - yyv1 = make([]*ACLToken, 0) - yyc1 = true - } - } - yyh1.End() - if yyc1 { - *v = yyv1 - } -}